ug4
|
#include <uzawa.h>
Public Types | |
typedef TGridFunction::element_type | TElement |
typedef GridFunction< TDomain, TAlgebra > | TGridFunction |
typedef TGridFunction::side_type | TSide |
typedef TAlgebra | algebra_type |
typedef TAlgebra::vector_type | vector_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef MatrixOperator< matrix_type, vector_type > | matrix_operator_type |
![]() | |
typedef TAlgebra | algebra_type |
Algebra type. | |
typedef MatrixOperator< matrix_type, vector_type > | matrix_operator_type |
Matrix Operator type. | |
typedef TAlgebra::matrix_type | matrix_type |
Matrix type. | |
typedef TAlgebra::vector_type | vector_type |
Vector type. | |
![]() | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. | |
![]() | |
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 | |
![]() | |
typedef TAlgebra::vector_type | vector_type |
type of vector | |
Public Member Functions | |
SmartPtr< ILinearIterator< typename TAlgebra::vector_type > > | clone () |
clone | |
void | extract_schur_update (const matrix_type &K, const TGridFunction &c) |
Update C22 block by matrix. | |
void | extract_sub_matrices (const matrix_type &K, const TGridFunction &c) |
extract block matrix operators (called once) | |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u) |
Overriding base type. | |
void | init_block_iterations () |
void | init_block_operators () |
allocate block matrix operators | |
void | postprocess_block_iterations () |
void | set_backward_iter (SmartPtr< ILinearIterator< vector_type > > iter) |
void | set_forward_iter (SmartPtr< ILinearIterator< vector_type > > iter) |
void | set_schur_iter (SmartPtr< ILinearIterator< vector_type > > iter) |
void | set_schur_operator_update (SmartPtr< AssembledLinearOperator< TAlgebra > > spSchurUpdateOp, double theta=0.0) |
virtual bool | supports_parallel () const |
returns if parallel solving is supported | |
UzawaBase (const char *sSchurCmp) | |
UzawaBase (const std::vector< std::string > &vSchurCmp) | |
default constructor | |
virtual | ~UzawaBase () |
![]() | |
virtual bool | apply (vector_type &c, const vector_type &d) |
compute new correction c = B*d | |
virtual bool | apply_update_defect (vector_type &c, vector_type &d) |
compute new correction c = B*d and update defect d:= d - L*c | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | approx_operator () |
underlying matrix based operator used for the preconditioner | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | defect_operator () |
underlying matrix based operator for calculation of defect | |
bool | init (SmartPtr< ILinearOperator< vector_type > > L) |
implements the ILinearIterator-interface for matrix based preconditioner | |
bool | init (SmartPtr< MatrixOperator< matrix_type, vector_type > > Op) |
initializes the preconditioner for a matrix based operator | |
IPreconditioner () | |
default constructor | |
IPreconditioner (const IPreconditioner< TAlgebra > &parent) | |
clone constructor | |
IPreconditioner (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) | |
constructor setting debug writer | |
virtual void | set_approximation (SmartPtr< MatrixOperator< matrix_type, vector_type > > approx) |
virtual | ~IPreconditioner () |
virtual destructor | |
![]() | |
virtual std::string | config_string () const |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | damping () |
returns the scaling | |
ILinearIterator () | |
constructor | |
ILinearIterator (const ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > &parent) | |
copy constructor | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > J, const TAlgebra::vector_type &u)=0 |
initialize for operator J(u) and linearization point u | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > L)=0 |
initialize for linear operator L | |
void | set_damp (number factor) |
sets the damping to a constant factor | |
void | set_damp (SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > spScaling) |
sets a scaling for the correction | |
virtual | ~ILinearIterator () |
virtual destructor | |
![]() | |
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 | ~DebugWritingObject () |
virtual destructor | |
![]() | |
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 | |
Static Public Attributes | |
static const int | dim = TDomain::dim |
World dimension. | |
Protected Types | |
typedef IPreconditioner< TAlgebra > | base_type |
enum | BLOCK { AUX_A11 , B12 , B21 , AUX_C22 , AUX_M22 , AUX_ARRAY_SIZE } |
Protected Member Functions | |
void | create_slice_debug_writers () |
void | init_in_first_step (const matrix_type &pMat, const TGridFunction &pC) |
void | my_write_debug (const matrix_type &mat, std::string name, const GridLevel &glTo, const GridLevel &glFrom) |
void | my_write_debug (const matrix_type &mat, std::string name, const TGridFunction &rTo, const TGridFunction &rFrom) |
auxiliary matrices (not cloned!) | |
virtual void | my_write_debug (const TGridFunction &rGF, std::string name) |
virtual const char * | name () const |
name | |
virtual bool | postprocess () |
cleans the operator | |
virtual bool | preprocess (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp) |
initializes the preconditioner | |
template<int d> | |
void | reset_slice_debug_writers () |
void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
set debug writer | |
virtual bool | step (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp, vector_type &c, const vector_type &d) |
computes a new correction c = B*d | |
![]() | |
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) | |
![]() | |
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 | |
matrix_type | m_A |
SmartPtr< matrix_operator_type > | m_auxMat [AUX_ARRAY_SIZE] |
bool | m_bInit |
flag indicating, whether operator must be initialized | |
double | m_dSchurUpdateWeight |
scaling factor for (additive) Schur complement update | |
UzawaSlicing< TGridFunction > | m_slicing |
object for slicing routines | |
SmartPtr< ILinearIterator< vector_type > > | m_spBackwardInverse |
iteration for forward system | |
SmartPtr< ILinearIterator< vector_type > > | m_spForwardInverse |
iteration for forward system | |
SmartPtr< GridFunctionDebugWriter< TDomain, TAlgebra > > | m_spGridFunctionDebugWriter |
SmartPtr< ILinearIterator< vector_type > > | m_SpSchurComplementInverse |
iteration for forward system | |
SmartPtr< AssembledLinearOperator< TAlgebra > > | m_spSchurUpdateOp |
assembly for (additive) Schur complement update | |
SmartPtr< IDebugWriter< algebra_type > > | m_spSliceDebugWriter [2] |
std::vector< std::string > | m_vSchurCmp |
vector of strings identifying components used for Schur complement | |
![]() | |
bool | m_bInit |
init flag indicating if init has been called | |
bool | m_bOtherApproxOperator |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | m_spApproxOperator |
underlying matrix based operator used for the preconditioner | |
SmartPtr< ILinearOperator< vector_type > > | m_spDefectOperator |
underlying matrix based operator for calculation of defect | |
![]() | |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | m_spDamping |
the scaling | |
![]() | |
SmartPtr< IDebugWriter< algebra_type > > | m_spDebugWriter |
Debug Writer. | |
![]() | |
SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
Debug Writer. | |
Static Private Attributes | |
static const bool | UZAWA_CMP_DEFAULT = false |
static const bool | UZAWA_CMP_SCHUR = true |
Base class for an Uzawa iteration
typedef TAlgebra ug::UzawaBase< TDomain, TAlgebra >::algebra_type |
Algebra types
|
protected |
typedef MatrixOperator<matrix_type, vector_type> ug::UzawaBase< TDomain, TAlgebra >::matrix_operator_type |
Algebra types
typedef TAlgebra::matrix_type ug::UzawaBase< TDomain, TAlgebra >::matrix_type |
Algebra types
typedef TGridFunction::element_type ug::UzawaBase< TDomain, TAlgebra >::TElement |
typedef GridFunction<TDomain, TAlgebra> ug::UzawaBase< TDomain, TAlgebra >::TGridFunction |
typedef TGridFunction::side_type ug::UzawaBase< TDomain, TAlgebra >::TSide |
typedef TAlgebra::vector_type ug::UzawaBase< TDomain, TAlgebra >::vector_type |
Algebra types
|
protected |
|
inline |
default constructor
References ug::UzawaBase< TDomain, TAlgebra >::init_block_operators().
|
inline |
|
inlinevirtual |
|
virtual |
|
protected |
References make_sp().
|
inline |
Update C22 block by matrix.
References ug::UzawaBase< TDomain, TAlgebra >::AUX_C22, ug::UzawaBase< TDomain, TAlgebra >::AUX_M22, ug::CheckRowIterators(), ug::GridFunction< TDomain, TAlgebra >::grid_level(), ug::UzawaBase< TDomain, TAlgebra >::m_auxMat, ug::UzawaBase< TDomain, TAlgebra >::m_dSchurUpdateWeight, ug::UzawaBase< TDomain, TAlgebra >::m_slicing, ug::UzawaBase< TDomain, TAlgebra >::m_spSchurUpdateOp, ug::UzawaBase< TDomain, TAlgebra >::m_spSliceDebugWriter, ug::UzawaBase< TDomain, TAlgebra >::my_write_debug(), ug::SchurDebug, UG_DLOG, and ug::UzawaBase< TDomain, TAlgebra >::UZAWA_CMP_SCHUR.
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step().
void ug::UzawaBase< TDomain, TAlgebra >::extract_sub_matrices | ( | const matrix_type & | K, |
const TGridFunction & | c | ||
) |
extract block matrix operators (called once)
References ug::SchurDebug, and UG_DLOG.
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step().
|
inlinevirtual |
Overriding base type.
Reimplemented from ug::IPreconditioner< TAlgebra >.
References ug::IPreconditioner< TAlgebra >::init(), ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step(), ug::UzawaBase< TDomain, TAlgebra >::m_bInit, ug::SchurDebug, UG_ASSERT, UG_DLOG, and SmartPtr< T, FreePolicy >::valid().
|
inline |
References ug::UzawaBase< TDomain, TAlgebra >::AUX_A11, ug::UzawaBase< TDomain, TAlgebra >::AUX_C22, ug::UzawaBase< TDomain, TAlgebra >::m_auxMat, ug::UzawaBase< TDomain, TAlgebra >::m_spBackwardInverse, ug::UzawaBase< TDomain, TAlgebra >::m_spForwardInverse, and ug::UzawaBase< TDomain, TAlgebra >::m_SpSchurComplementInverse.
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step().
|
inline |
allocate block matrix operators
References ug::UzawaBase< TDomain, TAlgebra >::AUX_A11, ug::UzawaBase< TDomain, TAlgebra >::AUX_C22, ug::UzawaBase< TDomain, TAlgebra >::AUX_M22, ug::UzawaBase< TDomain, TAlgebra >::B12, ug::UzawaBase< TDomain, TAlgebra >::B21, ug::UzawaBase< TDomain, TAlgebra >::m_auxMat, and make_sp().
Referenced by ug::UzawaBase< TDomain, TAlgebra >::UzawaBase(), and ug::UzawaBase< TDomain, TAlgebra >::UzawaBase().
|
inlineprotected |
References ug::DebugWritingObject< TAlgebra >::debug_writer(), ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update(), ug::UzawaBase< TDomain, TAlgebra >::extract_sub_matrices(), ug::GridFunction< TDomain, TAlgebra >::grid_level(), ug::UzawaBase< TDomain, TAlgebra >::init_block_iterations(), ug::UzawaBase< TDomain, TAlgebra >::m_slicing, ug::UzawaBase< TDomain, TAlgebra >::m_spGridFunctionDebugWriter, ug::UzawaBase< TDomain, TAlgebra >::m_vSchurCmp, ug::SchurDebug, UG_DLOG, and UG_LOG.
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init().
|
inlineprotected |
|
inlineprotected |
auxiliary matrices (not cloned!)
References ug::GridFunction< TDomain, TAlgebra >::grid_level(), ug::UzawaBase< TDomain, TAlgebra >::my_write_debug(), and ug::UzawaBase< TDomain, TAlgebra >::name().
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update(), and ug::UzawaBase< TDomain, TAlgebra >::my_write_debug().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
protectedvirtual |
cleans the operator
Implements ug::IPreconditioner< TAlgebra >.
|
inline |
|
protectedvirtual |
initializes the preconditioner
Implements ug::IPreconditioner< TAlgebra >.
References ug::MakeConsistent(), pcl::NumProcs(), and ug::SetDirichletRow().
|
protected |
References UG_LOG.
|
inline |
|
protectedvirtual |
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
computes a new correction c = B*d
Single step of an (inexact) Uzawa iteration.
Implements ug::IPreconditioner< TAlgebra >.
References SmartPtr< T, FreePolicy >::get(), pcl::NumProcs(), ug::PST_UNIQUE, and UG_THROW.
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearIterator< TAlgebra::vector_type >.
References ug::UzawaBase< TDomain, TAlgebra >::m_spForwardInverse, ug::UzawaBase< TDomain, TAlgebra >::m_SpSchurComplementInverse, and UG_ASSERT.
|
static |
World dimension.
|
protected |
|
protected |
|
protected |
flag indicating, whether operator must be initialized
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init().
|
protected |
scaling factor for (additive) Schur complement update
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update(), and ug::UzawaBase< TDomain, TAlgebra >::set_schur_operator_update().
|
protected |
object for slicing routines
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update(), and ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step().
|
protected |
iteration for forward system
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_block_iterations(), and ug::UzawaBase< TDomain, TAlgebra >::set_backward_iter().
|
protected |
iteration for forward system
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_block_iterations(), ug::UzawaBase< TDomain, TAlgebra >::set_forward_iter(), and ug::UzawaBase< TDomain, TAlgebra >::supports_parallel().
|
protected |
|
protected |
iteration for forward system
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_block_iterations(), ug::UzawaBase< TDomain, TAlgebra >::set_schur_iter(), and ug::UzawaBase< TDomain, TAlgebra >::supports_parallel().
|
protected |
assembly for (additive) Schur complement update
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update(), and ug::UzawaBase< TDomain, TAlgebra >::set_schur_operator_update().
|
protected |
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update().
|
protected |
vector of strings identifying components used for Schur complement
Referenced by ug::UzawaBase< TDomain, TAlgebra >::init_in_first_step().
|
staticprivate |
|
staticprivate |
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update().