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 |
Public Types inherited from ug::IPreconditioner< TAlgebra > | |
typedef TAlgebra | algebra_type |
Algebra type. More... | |
typedef MatrixOperator< matrix_type, vector_type > | matrix_operator_type |
Matrix Operator 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::ILinearIterator< 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 | |
SmartPtr< ILinearIterator< typename TAlgebra::vector_type > > | clone () |
clone More... | |
void | extract_schur_update (const matrix_type &K, const TGridFunction &c) |
Update C22 block by matrix. More... | |
void | extract_sub_matrices (const matrix_type &K, const TGridFunction &c) |
extract block matrix operators (called once) More... | |
virtual bool | init (SmartPtr< ILinearOperator< vector_type > > J, const vector_type &u) |
Overriding base type. More... | |
void | init_block_iterations () |
void | init_block_operators () |
allocate block matrix operators More... | |
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 More... | |
UzawaBase (const char *sSchurCmp) | |
UzawaBase (const std::vector< std::string > &vSchurCmp) | |
default constructor More... | |
virtual | ~UzawaBase () |
Public Member Functions inherited from ug::IPreconditioner< TAlgebra > | |
virtual bool | apply (vector_type &c, const vector_type &d) |
compute new correction c = B*d More... | |
virtual bool | apply_update_defect (vector_type &c, vector_type &d) |
compute new correction c = B*d and update defect d:= d - L*c More... | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | approx_operator () |
underlying matrix based operator used for the preconditioner More... | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | defect_operator () |
underlying matrix based operator for calculation of defect More... | |
bool | init (SmartPtr< ILinearOperator< vector_type > > L) |
implements the ILinearIterator-interface for matrix based preconditioner More... | |
bool | init (SmartPtr< MatrixOperator< matrix_type, vector_type > > Op) |
initializes the preconditioner for a matrix based operator More... | |
IPreconditioner () | |
default constructor More... | |
IPreconditioner (const IPreconditioner< TAlgebra > &parent) | |
clone constructor More... | |
IPreconditioner (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) | |
constructor setting debug writer More... | |
virtual void | set_approximation (SmartPtr< MatrixOperator< matrix_type, vector_type > > approx) |
virtual | ~IPreconditioner () |
virtual destructor More... | |
Public Member Functions inherited from ug::ILinearIterator< TAlgebra::vector_type > | |
virtual std::string | config_string () const |
SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > | damping () |
returns the scaling More... | |
ILinearIterator () | |
constructor More... | |
ILinearIterator (const ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > &parent) | |
copy constructor More... | |
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 More... | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > L)=0 |
initialize for linear operator L More... | |
void | set_damp (number factor) |
sets the damping to a constant factor More... | |
void | set_damp (SmartPtr< IDamping< TAlgebra::vector_type, TAlgebra::vector_type > > spScaling) |
sets a scaling for the correction More... | |
virtual | ~ILinearIterator () |
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 | ~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... | |
Static Public Attributes | |
static const int | dim = TDomain::dim |
World dimension. More... | |
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!) More... | |
virtual void | my_write_debug (const TGridFunction &rGF, std::string name) |
virtual const char * | name () const |
name More... | |
virtual bool | postprocess () |
cleans the operator More... | |
virtual bool | preprocess (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp) |
initializes the preconditioner More... | |
template<int d> | |
void | reset_slice_debug_writers () |
void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
set debug writer More... | |
virtual bool | step (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp, vector_type &c, const vector_type &d) |
computes a new correction c = B*d More... | |
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... | |
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().
|
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(), and ug::UzawaBase< TDomain, TAlgebra >::name().
Referenced by ug::UzawaBase< TDomain, TAlgebra >::extract_schur_update().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
name
Implements ug::IPreconditioner< TAlgebra >.
Referenced by ug::UzawaBase< TDomain, TAlgebra >::my_write_debug().
|
protectedvirtual |
cleans the operator
Implements ug::IPreconditioner< TAlgebra >.
|
inline |
|
protectedvirtual |
initializes the preconditioner
Implements ug::IPreconditioner< TAlgebra >.
References pcl::CollectUniqueElements(), 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().