ug4
|
Nonlinear Jacobi-method. More...
#include <nl_jacobi.h>
Public Types | |
typedef TAlgebra | algebra_type |
Algebra type. More... | |
typedef TAlgebra::matrix_type | matrix_type |
Matrix type. More... | |
typedef TAlgebra::vector_type | vector_type |
Vector type. More... | |
Public Types inherited from ug::IOperatorInverse< TAlgebra::vector_type > | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. More... | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. More... | |
Public Types inherited from ug::DebugWritingObject< TAlgebra > | |
typedef TAlgebra | algebra_type |
type of algebra More... | |
typedef TAlgebra::matrix_type | matrix_type |
type of matrix More... | |
typedef TAlgebra::vector_type | vector_type |
type of vector More... | |
Public Types inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
typedef TAlgebra::vector_type | vector_type |
type of vector More... | |
Public Member Functions | |
virtual bool | apply (vector_type &u) |
apply Operator, i.e. op^{-1}(0) = u More... | |
virtual std::string | config_string () const |
returns information about configuration parameters More... | |
virtual bool | init (SmartPtr< IOperator< vector_type > > op) |
This operator inverts the Operator op: Y -> X. More... | |
NLJacobiSolver () | |
default constructor More... | |
NLJacobiSolver (SmartPtr< IConvergenceCheck< vector_type > > spConvCheck) | |
constructor More... | |
virtual bool | prepare (vector_type &u) |
prepare Operator More... | |
void | set_convergence_check (SmartPtr< IConvergenceCheck< vector_type > > spConvCheck) |
void | set_damp (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 More... | |
virtual | ~IOperatorInverse () |
virtual destructor More... | |
Public Member Functions inherited from ug::DebugWritingObject< TAlgebra > | |
SmartPtr< IDebugWriter< algebra_type > > | debug_writer () |
returns the debug writer More... | |
ConstSmartPtr< IDebugWriter< algebra_type > > | debug_writer () const |
bool | debug_writer_valid () const |
returns true if the debug writer is set More... | |
DebugWritingObject () | |
DebugWritingObject (const DebugWritingObject< algebra_type > &parent) | |
clone constructor More... | |
DebugWritingObject (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) | |
virtual void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
set debug writer More... | |
virtual | ~DebugWritingObject () |
virtual destructor More... | |
Public Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
virtual void | set_debug (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) |
set debug writer More... | |
SmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () |
returns the debug writer More... | |
ConstSmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () const |
bool | vector_debug_writer_valid () const |
returns true if the debug writer is set More... | |
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) More... | |
virtual | ~VectorDebugWritingObject () |
virtual destructor More... | |
Protected Types | |
typedef DebugWritingObject< TAlgebra > | base_writer_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 | |
number | m_damp |
damping factor More... | |
int | m_dgbCall |
call counter More... | |
SmartPtr< IAssemble< TAlgebra > > | m_spAss |
SmartPtr< AssembledOperator< algebra_type > > | m_spAssOp |
SmartPtr< IConvergenceCheck< vector_type > > | m_spConvCheck |
SmartPtr< AssembledLinearOperator< algebra_type > > | m_spJ |
Additional Inherited Members | |
Protected Member Functions inherited from ug::DebugWritingObject< TAlgebra > | |
void | enter_debug_writer_section (const char *secDir) |
enters a debugging section More... | |
void | enter_debug_writer_section (std::string secDir) |
enters a debugging section More... | |
void | leave_debug_writer_section () |
leaves a debugging section More... | |
void | write_debug (const matrix_type &mat, const char *filename) |
write debug output for a matrix (if debug writer set) More... | |
void | write_debug (const matrix_type &mat, std::string name) |
write debug output for a matrix (if debug writer set) More... | |
Protected Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
void | enter_vector_debug_writer_section (const char *secDir) |
enters a debugging section More... | |
void | enter_vector_debug_writer_section (std::string secDir) |
enters a debugging section More... | |
void | leave_vector_debug_writer_section () |
leaves a debugging section More... | |
void | print_debugger_message (const char *msg) |
prints a debugger message (listing all the sections) More... | |
void | print_debugger_message (std::string msg) |
prints a debugger message (listing all the sections) More... | |
virtual void | write_debug (const vector_type &vec, std::string name) |
writing debug output for a vector (if debug writer set) More... | |
Protected Attributes inherited from ug::DebugWritingObject< TAlgebra > | |
SmartPtr< IDebugWriter< algebra_type > > | m_spDebugWriter |
Debug Writer. More... | |
Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
Debug Writer. More... | |
Nonlinear Jacobi-method.
Let L(u) denote a nonlinear functional of n components (l_1,...,l_n). Then the basic step of the nonlinear Jacobi method is to solve the i-th equation
l_i(u_1^{k},...,u_{i-1}^{k},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. 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 jacobi method results in the following update of the variables
u_i^{k+1} = u_i^k + damp * (u_i -u_i^k).
References:
TAlgebra | Algebra type |
typedef TAlgebra ug::NLJacobiSolver< TAlgebra >::algebra_type |
Algebra type.
|
protected |
typedef TAlgebra::matrix_type ug::NLJacobiSolver< TAlgebra >::matrix_type |
Matrix type.
typedef TAlgebra::vector_type ug::NLJacobiSolver< TAlgebra >::vector_type |
Vector type.
ug::NLJacobiSolver< TAlgebra >::NLJacobiSolver |
default constructor
References new().
ug::NLJacobiSolver< TAlgebra >::NLJacobiSolver | ( | 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_JACOBI_PROFILE_BEGIN, NL_JACOBI_PROFILE_END, and UG_CATCH_THROW.
|
inlinevirtual |
returns information about configuration parameters
Implements ug::IOperatorInverse< TAlgebra::vector_type >.
References ug::ConfigShift(), ug::NLJacobiSolver< TAlgebra >::m_damp, and ug::NLJacobiSolver< TAlgebra >::m_spConvCheck.
|
virtual |
This operator inverts the Operator op: Y -> X.
References NL_JACOBI_PROFILE_BEGIN, and UG_THROW.
|
virtual |
prepare Operator
Implements ug::IOperatorInverse< TAlgebra::vector_type >.
void ug::NLJacobiSolver< TAlgebra >::set_convergence_check | ( | SmartPtr< IConvergenceCheck< vector_type > > | spConvCheck | ) |
|
inline |
References ug::NLJacobiSolver< TAlgebra >::m_damp.
|
private |
help functions for debug output
References name.
|
private |
help functions for debug output
References name.
|
private |
damping factor
Referenced by ug::NLJacobiSolver< TAlgebra >::config_string(), and ug::NLJacobiSolver< TAlgebra >::set_damp().
|
private |
call counter
|
private |
|
private |
|
private |
Referenced by ug::NLJacobiSolver< TAlgebra >::config_string().
|
private |