|
ug4
|
Nonlinear GaussSeidel-method. More...
#include <nl_gauss_seidel.h>
Inheritance diagram for ug::NLGaussSeidelSolver< TDomain, TAlgebra >:Public Types | |
| typedef TAlgebra | algebra_type |
| Algebra type. | |
| typedef ApproximationSpace< domain_type > | approx_space_type |
| Type of approximation space. | |
| typedef TDomain | domain_type |
| Domain type. | |
| typedef domain_traits< TDomain::dim >::grid_base_object | grid_base_object |
| Type of geometric base object. | |
| typedef TAlgebra::matrix_type | matrix_type |
| Matrix type. | |
| typedef vector_type::value_type | value_type |
| Value type. | |
| typedef TAlgebra::vector_type | vector_type |
| Vector type. | |
Public Types inherited from ug::IOperatorInverse< TAlgebra::vector_type > | |
| typedef TAlgebra::vector_type | codomain_function_type |
| Range space. | |
| typedef TAlgebra::vector_type | domain_function_type |
| Domain space. | |
Public Types inherited from ug::DebugWritingObject< TAlgebra > | |
| typedef TAlgebra | algebra_type |
| type of algebra | |
| typedef TAlgebra::matrix_type | matrix_type |
| type of matrix | |
| typedef TAlgebra::vector_type | vector_type |
| type of vector | |
Public Types inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| typedef TAlgebra::vector_type | vector_type |
| type of vector | |
Public Member Functions | |
| virtual bool | apply (vector_type &u) |
| apply Operator, i.e. op^{-1}(0) = u | |
| virtual std::string | config_string () const |
| returns information about configuration parameters | |
| virtual bool | init (SmartPtr< IOperator< vector_type > > op) |
| This operator inverts the Operator op: Y -> X. | |
| NLGaussSeidelSolver () | |
| constructor | |
| NLGaussSeidelSolver (SmartPtr< approx_space_type > spApproxSpace, SmartPtr< IConvergenceCheck< vector_type > > spConvCheck) | |
| constructor | |
| virtual bool | prepare (vector_type &u) |
| prepare Operator | |
| void | set_approximation_space (SmartPtr< approx_space_type > spApproxSpace) |
| void | set_constraint (const vector_type &cons) |
| void | set_convergence_check (SmartPtr< IConvergenceCheck< vector_type > > spConvCheck) |
| void | set_damp (const number damp) |
Public Member Functions inherited from ug::IOperatorInverse< TAlgebra::vector_type > | |
| virtual bool | init (SmartPtr< IOperator< TAlgebra::vector_type, TAlgebra::vector_type > > N)=0 |
| initializes the operator for the inversion of the operator N: Y -> X | |
| virtual | ~IOperatorInverse () |
| virtual destructor | |
Public Member Functions inherited from ug::DebugWritingObject< TAlgebra > | |
| SmartPtr< IDebugWriter< algebra_type > > | debug_writer () |
| returns the debug writer | |
| ConstSmartPtr< IDebugWriter< algebra_type > > | debug_writer () const |
| bool | debug_writer_valid () const |
| returns true if the debug writer is set | |
| DebugWritingObject () | |
| DebugWritingObject (const DebugWritingObject< algebra_type > &parent) | |
| clone constructor | |
| DebugWritingObject (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) | |
| virtual void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
| set debug writer | |
| virtual | ~DebugWritingObject () |
| virtual destructor | |
Public Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| virtual void | set_debug (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) |
| set debug writer | |
| SmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () |
| returns the debug writer | |
| ConstSmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () const |
| bool | vector_debug_writer_valid () const |
| returns true if the debug writer is set | |
| VectorDebugWritingObject () | |
| VectorDebugWritingObject (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) | |
| void | write_debug (const vector_type &vec, const char *filename) |
| writing debug output for a vector (if debug writer set) | |
| virtual | ~VectorDebugWritingObject () |
| virtual destructor | |
Protected Types | |
| typedef DebugWritingObject< TAlgebra > | base_writer_type |
Private Types | |
| typedef std::vector< grid_base_object * > | elemList |
| typedef NLGaussSeidelSolver< TDomain, TAlgebra > | this_type |
| own type | |
Private Member Functions | |
| void | write_debug (const vector_type &vec, const char *filename) |
| void | write_debug (const matrix_type &mat, const char *filename) |
Private Attributes | |
| bool | m_bProjectedGS |
| vector_type | m_ConsVec |
| vector describing a constraint | |
| number | m_damp |
| damping factor | |
| int | m_dgbCall |
| call counter | |
| GridLevel | m_gridLevel |
| DoF Distribution used. | |
| LocalToGlobalMapperNLGS< TAlgebra > | m_map |
| LocalToGlobal-Mapper which accounts for index-wise assembling. | |
| Selector | m_sel |
| selector of elements with contributions to a specific DoF | |
| SmartPtr< approx_space_type > | m_spApproxSpace |
| Approximation Space. | |
| SmartPtr< IAssemble< TAlgebra > > | m_spAss |
| SmartPtr< AssembledOperator< algebra_type > > | m_spAssOp |
| SmartPtr< IConvergenceCheck< vector_type > > | m_spConvCheck |
| SmartPtr< AssembledLinearOperator< algebra_type > > | m_spJBlock |
| ConstSmartPtr< DoFDistribution > | m_spLevDD |
| DoF distribution pointer. | |
| ConstSmartPtr< DoFDistribution > | m_spSurfDD |
| std::vector< elemList > | m_vElemList |
Additional Inherited Members | |
Protected Member Functions inherited from ug::DebugWritingObject< TAlgebra > | |
| void | enter_debug_writer_section (const char *secDir) |
| enters a debugging section | |
| void | enter_debug_writer_section (std::string secDir) |
| enters a debugging section | |
| void | leave_debug_writer_section () |
| leaves a debugging section | |
| void | write_debug (const matrix_type &mat, const char *filename) |
| write debug output for a matrix (if debug writer set) | |
| void | write_debug (const matrix_type &mat, std::string name) |
| write debug output for a matrix (if debug writer set) | |
Protected Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| void | enter_vector_debug_writer_section (const char *secDir) |
| enters a debugging section | |
| void | enter_vector_debug_writer_section (std::string secDir) |
| enters a debugging section | |
| void | leave_vector_debug_writer_section () |
| leaves a debugging section | |
| void | print_debugger_message (const char *msg) |
| prints a debugger message (listing all the sections) | |
| void | print_debugger_message (std::string msg) |
| prints a debugger message (listing all the sections) | |
| virtual void | write_debug (const vector_type &vec, std::string name) |
| writing debug output for a vector (if debug writer set) | |
Protected Attributes inherited from ug::DebugWritingObject< TAlgebra > | |
| SmartPtr< IDebugWriter< algebra_type > > | m_spDebugWriter |
| Debug Writer. | |
Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
| SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
| Debug Writer. | |
Nonlinear GaussSeidel-method.
Let L(u) denote a nonlinear functional of n components (l_1,...,l_n). Then the basic step of the nonlinear GaussSeidel method is to solve the i-th equation
l_i(u_1^{k+1},...,u_{i-1}^{k+1},u_i,u_{i+1}^{k},...,u_{n}^{k}) = 0
for u_i and to set u_i^{k+1} = u_i. Here k denotes the iteration-index. Note, that the already computed, updated values (.)^{k+1} are used in this method. Thus, in order to obtain u^{k+1} from u^k, we solve successively the n dimensional nonlinear equations for i = 1,...,n. Here this is done by a scalar newton step for every i. But every other scalar nonlinear method could be applied as well.
Using a damped version of the nonlinear GaussSeidel method (= nonlinear SOR-method) results in the following update of the variables
u_i^{k+1} = u_i^k + damp * (u_i -u_i^k).
References:
| TDomain | Domain type |
| TAlgebra | Algebra type |
| typedef TAlgebra ug::NLGaussSeidelSolver< TDomain, TAlgebra >::algebra_type |
Algebra type.
| typedef ApproximationSpace<domain_type> ug::NLGaussSeidelSolver< TDomain, TAlgebra >::approx_space_type |
Type of approximation space.
|
protected |
| typedef TDomain ug::NLGaussSeidelSolver< TDomain, TAlgebra >::domain_type |
Domain type.
|
private |
| typedef domain_traits<TDomain::dim>::grid_base_object ug::NLGaussSeidelSolver< TDomain, TAlgebra >::grid_base_object |
Type of geometric base object.
| typedef TAlgebra::matrix_type ug::NLGaussSeidelSolver< TDomain, TAlgebra >::matrix_type |
Matrix type.
|
private |
own type
| typedef vector_type::value_type ug::NLGaussSeidelSolver< TDomain, TAlgebra >::value_type |
Value type.
| typedef TAlgebra::vector_type ug::NLGaussSeidelSolver< TDomain, TAlgebra >::vector_type |
Vector type.
| ug::NLGaussSeidelSolver< TDomain, TAlgebra >::NLGaussSeidelSolver | ( | ) |
constructor
| ug::NLGaussSeidelSolver< TDomain, TAlgebra >::NLGaussSeidelSolver | ( | SmartPtr< approx_space_type > | spApproxSpace, |
| SmartPtr< IConvergenceCheck< vector_type > > | spConvCheck | ||
| ) |
constructor
|
virtual |
apply Operator, i.e. op^{-1}(0) = u
Implements ug::IOperatorInverse< TAlgebra::vector_type >.
References ug::InverseMatMult(), make_sp(), name, NL_GAUSSSEIDEL_PROFILE_BEGIN, NL_GAUSSSEIDEL_PROFILE_END, UG_CATCH_THROW, and UG_THROW.
|
inlinevirtual |
returns information about configuration parameters
Implements ug::IOperatorInverse< TAlgebra::vector_type >.
References ug::ConfigShift(), ug::NLGaussSeidelSolver< TDomain, TAlgebra >::m_damp, and ug::NLGaussSeidelSolver< TDomain, TAlgebra >::m_spConvCheck.
|
virtual |
This operator inverts the Operator op: Y -> X.
References ug::GridLevel::LEVEL, NL_GAUSSSEIDEL_PROFILE_BEGIN, ug::GridLevel::SURFACE, and UG_THROW.
|
virtual |
prepare Operator
Implements ug::IOperatorInverse< TAlgebra::vector_type >.
References ug::LocalIndices::index(), ug::GridLevel::LEVEL, ug::LocalVector::num_all_dof(), ug::LocalVector::num_all_fct(), ug::LocalVector::resize(), ug::GridLevel::SURFACE, and UG_THROW.
|
inline |
|
inline |
| void ug::NLGaussSeidelSolver< TDomain, TAlgebra >::set_convergence_check | ( | SmartPtr< IConvergenceCheck< vector_type > > | spConvCheck | ) |
|
inline |
|
private |
help functions for debug output
References name.
|
private |
help functions for debug output
References name.
|
private |
|
private |
vector describing a constraint
Referenced by ug::NLGaussSeidelSolver< TDomain, TAlgebra >::set_constraint().
|
private |
damping factor
Referenced by ug::NLGaussSeidelSolver< TDomain, TAlgebra >::config_string(), and ug::NLGaussSeidelSolver< TDomain, TAlgebra >::set_damp().
|
private |
call counter
|
private |
DoF Distribution used.
|
private |
LocalToGlobal-Mapper which accounts for index-wise assembling.
|
private |
selector of elements with contributions to a specific DoF
|
private |
Approximation Space.
Referenced by ug::NLGaussSeidelSolver< TDomain, TAlgebra >::set_approximation_space().
|
private |
|
private |
|
private |
|
private |
|
private |
DoF distribution pointer.
|
private |
|
private |