ug4
|
#include <external_solvers.h>
Public Types | |
typedef TAlgebra | algebra_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
![]() | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. | |
typedef TAlgebra::matrix_type | matrix_type |
Matrix type. | |
![]() | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
![]() | |
typedef Y | codomain_function_type |
Range space. | |
typedef X | domain_function_type |
Domain space. | |
![]() | |
typedef TAlgebra::vector_type | vector_type |
type of vector | |
Public Member Functions | |
SmartPtr< ILinearIterator< vector_type > > | clone () |
clone | |
template<int dim1, int dim2> | |
bool | copy_pos (std::vector< MathVector< dim1 > > &dest, const std::vector< MathVector< dim2 > > &src) |
virtual void | double_init (const CPUAlgebra::matrix_type &mat)=0 |
virtual const char * | double_name () const =0 |
void | enable_consistent_interfaces (bool enable) |
int | get_dim () |
template<int dim> | |
const std::vector< MathVector< dim > > & | get_positions () |
template<int Tdim> | |
bool | get_positions (std::vector< MathVector< Tdim > > &coord) |
bool | get_positions3 (std::vector< MathVector< 3 > > &coord) |
IExternalSolver () | |
virtual bool | init (SmartPtr< MatrixOperator< matrix_type, vector_type > > Op) |
void | mat_preprocess (const matrix_type &A) |
virtual const char * | name () const |
returns the name of the operator inverse | |
void | set_disable_preprocessing (bool bDisable) |
disable preprocessing (if underlying matrix has not changed) | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported | |
![]() | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A) |
initializes this inverse operator for a linear operator | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A, const TAlgebra::vector_type &u) |
initializes this inverse operator for a linear operator | |
virtual bool | init (SmartPtr< MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type, TAlgebra::vector_type > > A)=0 |
initializes this inverse operator for a matrix-based operator | |
virtual | ~IMatrixOperatorInverse () |
virtual destructor | |
![]() | |
virtual bool | apply (Y &u, const X &f)=0 |
applies inverse operator, i.e. returns u = A^{-1} f | |
virtual bool | apply_return_defect (Y &u, X &f)=0 |
applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u | |
virtual bool | apply_update_defect (Y &u, X &f) |
compute new correction c = B*d and update defect d := d - A*c | |
virtual std::string | config_string () const |
returns information about configuration parameters | |
SmartPtr< IConvergenceCheck< X > > | convergence_check () |
returns the convergence check | |
ConstSmartPtr< IConvergenceCheck< X > > | convergence_check () const |
returns the convergence check | |
number | defect () const |
returns the current defect | |
ILinearOperatorInverse () | |
constructor setting convergence check to (100, 1e-12, 1e-12, true) | |
ILinearOperatorInverse (SmartPtr< IConvergenceCheck< X > > spConvCheck) | |
Default constructor. | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u) |
initializes for the inverse for a linearized operator at linearization point u | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > L) |
initializes for the inverse for a linear operator | |
SmartPtr< ILinearOperator< Y, X > > | linear_operator () |
returns the current Operator this Inverse Operator is initialized for | |
number | reduction () const |
returns the current relative reduction | |
void | set_convergence_check (SmartPtr< IConvergenceCheck< X > > spConvCheck) |
set the convergence check | |
virtual int | standard_offset () const |
returns the standard offset for output | |
int | step () const |
returns the current number of steps | |
virtual | ~ILinearOperatorInverse () |
virtual destructor | |
![]() | |
SmartPtr< IDamping< X, Y > > | damping () |
returns the scaling | |
ILinearIterator () | |
constructor | |
ILinearIterator (const ILinearIterator< X, Y > &parent) | |
copy constructor | |
void | set_damp (number factor) |
sets the damping to a constant factor | |
void | set_damp (SmartPtr< IDamping< X, Y > > spScaling) |
sets a scaling for the correction | |
virtual | ~ILinearIterator () |
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 | |
Public Attributes | |
SmartPtr< MatrixOperator< matrix_type, vector_type > > | m_spOperator |
Protected Member Functions | |
virtual bool | apply (vector_type &c, const vector_type &d) |
applies the inverse operator, i.e. returns u = A^{-1} * f | |
virtual bool | apply_return_defect (vector_type &u, vector_type &f) |
applies the inverse operator and updates the defect | |
virtual bool | double_apply (CPUAlgebra::vector_type &c, const CPUAlgebra::vector_type &d)=0 |
void | get_vector (CPUAlgebra::vector_type &v_scalar, const vector_type &v) |
virtual bool | postprocess () |
virtual bool | preprocess (SmartPtr< MatrixOperator< matrix_type, vector_type > > pOp) |
void | set_vector (CPUAlgebra::vector_type &v_scalar, vector_type &v) |
![]() | |
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 | |
bool | m_bDisablePreprocessing |
size_t | m_blockSize |
bool | m_bUseConsistentInterfaces |
CPUAlgebra::vector_type | m_c |
CPUAlgebra::vector_type | m_d |
size_t | m_size |
![]() | |
SmartPtr< IConvergenceCheck< X > > | m_spConvCheck |
smart pointer holding the convergence check | |
SmartPtr< ILinearOperator< Y, X > > | m_spLinearOperator |
Operator that is inverted by this Inverse Operator. | |
![]() | |
SmartPtr< IDamping< X, Y > > | m_spDamping |
the scaling | |
![]() | |
SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
Debug Writer. | |
typedef TAlgebra ug::IExternalSolver< TAlgebra >::algebra_type |
typedef TAlgebra::matrix_type ug::IExternalSolver< TAlgebra >::matrix_type |
typedef TAlgebra::vector_type ug::IExternalSolver< TAlgebra >::vector_type |
|
inline |
|
inlineprotectedvirtual |
applies the inverse operator, i.e. returns u = A^{-1} * f
This method applies the inverse operator.
[out] | u | solution |
[in] | f | right-hand side |
Implements ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >.
References ug::IExternalSolver< TAlgebra >::double_apply(), ug::IExternalSolver< TAlgebra >::get_vector(), ug::IExternalSolver< TAlgebra >::m_bUseConsistentInterfaces, ug::IExternalSolver< TAlgebra >::m_c, ug::IExternalSolver< TAlgebra >::m_d, ug::IExternalSolver< TAlgebra >::m_size, ug::PST_ADDITIVE, ug::PST_CONSISTENT, ug::PST_UNIQUE, ug::Vector< TValueType >::resize(), ug::ParallelVector< TVector >::set(), ug::ParallelVector< TVector >::set_storage_type(), and ug::IExternalSolver< TAlgebra >::set_vector().
Referenced by ug::IExternalSolver< TAlgebra >::apply_return_defect().
|
inlineprotectedvirtual |
applies the inverse operator and updates the defect
This method applies the inverse operator and updates the defect, i.e. returns u = A^{-1} * f and in f the last defect d:= f - A*u is returned.
[out] | u | solution |
[in] | f | right-hand side on entry, defect on exit |
Implements ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >.
References ug::IExternalSolver< TAlgebra >::apply(), ug::IExternalSolver< TAlgebra >::m_spOperator, and UG_LOG.
|
inlinevirtual |
|
inline |
|
protectedpure virtual |
Implemented in ug::SuperLUSolver< typename TAlgebra >.
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
pure virtual |
Implemented in ug::SuperLUSolver< typename TAlgebra >.
Referenced by ug::IExternalSolver< TAlgebra >::mat_preprocess().
|
pure virtual |
Implemented in ug::SuperLUSolver< typename TAlgebra >.
Referenced by ug::IExternalSolver< TAlgebra >::name().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
References ug::BlockRef(), and ug::GetSize().
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
inlinevirtual |
|
inline |
References ug::CreateLocalAlgebraLayouts(), ug::IExternalSolver< TAlgebra >::double_init(), ug::GetDoubleSparseFromBlockSparse(), ug::IExternalSolver< TAlgebra >::m_bDisablePreprocessing, ug::IExternalSolver< TAlgebra >::m_blockSize, ug::IExternalSolver< TAlgebra >::m_bUseConsistentInterfaces, ug::IExternalSolver< TAlgebra >::m_size, ug::MatAddSlaveRowsToMasterRowOverlap0(), ug::MatMakeConsistentOverlap0(), ug::PST_ADDITIVE, ug::ParallelMatrix< TMatrix >::set_layouts(), ug::ParallelMatrix< TMatrix >::set_storage_type(), ug::SetDirichletRow(), and STATIC_ASSERT.
Referenced by ug::IExternalSolver< TAlgebra >::init(), and ug::IExternalSolver< TAlgebra >::preprocess().
|
inlinevirtual |
returns the name of the operator inverse
This method returns the name of the inverse operator. This function is typically needed, when the inverse operator is used inside of another and some debug output should be printed
Implements ug::ILinearOperatorInverse< X, Y >.
References ug::IExternalSolver< TAlgebra >::double_name().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
disable preprocessing (if underlying matrix has not changed)
References ug::IExternalSolver< TAlgebra >::m_bDisablePreprocessing.
|
inlineprotected |
References ug::BlockRef(), and ug::GetSize().
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearOperatorInverse< X, Y >.
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
protected |
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
protected |
SmartPtr<MatrixOperator<matrix_type, vector_type> > ug::IExternalSolver< TAlgebra >::m_spOperator |