ug4
|
#include <external_solvers.h>
Public Types | |
typedef TAlgebra | algebra_type |
typedef TAlgebra::matrix_type | matrix_type |
typedef TAlgebra::vector_type | vector_type |
Public Types inherited from ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type > | |
typedef TAlgebra::vector_type | codomain_function_type |
Range space. More... | |
typedef TAlgebra::vector_type | domain_function_type |
Domain space. More... | |
typedef TAlgebra::matrix_type | matrix_type |
Matrix type. More... | |
Public Types inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, 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::ILinearIterator< X, Y > | |
typedef Y | codomain_function_type |
Range space. More... | |
typedef X | domain_function_type |
Domain space. 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< vector_type > > | clone () |
clone More... | |
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 More... | |
void | set_disable_preprocessing (bool bDisable) |
disable preprocessing (if underlying matrix has not changed) More... | |
virtual bool | supports_parallel () const |
returns if parallel solving is supported More... | |
Public Member Functions inherited from ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type > | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A) |
initializes this inverse operator for a linear operator More... | |
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 More... | |
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 More... | |
virtual | ~IMatrixOperatorInverse () |
virtual destructor More... | |
Public Member Functions inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type > | |
virtual bool | apply_update_defect (TAlgebra::vector_type &u, TAlgebra::vector_type &f) |
virtual std::string | config_string () const |
returns information about configuration parameters More... | |
SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > | convergence_check () |
returns the convergence check More... | |
ConstSmartPtr< IConvergenceCheck< TAlgebra::vector_type > > | convergence_check () const |
returns the convergence check More... | |
number | defect () const |
returns the current defect More... | |
ILinearOperatorInverse () | |
constructor setting convergence check to (100, 1e-12, 1e-12, true) More... | |
ILinearOperatorInverse (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck) | |
Default constructor. More... | |
SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > | linear_operator () |
returns the current Operator this Inverse Operator is initialized for More... | |
number | reduction () const |
returns the current relative reduction More... | |
void | set_convergence_check (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck) |
set the convergence check More... | |
virtual int | standard_offset () const |
returns the standard offset for output More... | |
int | step () const |
returns the current number of steps More... | |
virtual | ~ILinearOperatorInverse () |
virtual destructor More... | |
Public Member Functions inherited from ug::ILinearIterator< X, Y > | |
virtual bool | apply (Y &c, const X &d)=0 |
compute new correction c = B*d More... | |
virtual bool | apply_update_defect (Y &c, X &d)=0 |
compute new correction c = B*d and update defect d := d - A*c More... | |
SmartPtr< IDamping< X, Y > > | damping () |
returns the scaling More... | |
ILinearIterator () | |
constructor More... | |
ILinearIterator (const ILinearIterator< X, Y > &parent) | |
copy constructor More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u)=0 |
initialize for operator J(u) and linearization point u More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > 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< X, Y > > spScaling) |
sets a scaling for the correction More... | |
virtual | ~ILinearIterator () |
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... | |
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 More... | |
virtual bool | apply_return_defect (vector_type &u, vector_type &f) |
applies the inverse operator and updates the defect More... | |
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) |
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 | |
bool | m_bDisablePreprocessing |
size_t | m_blockSize |
bool | m_bUseConsistentInterfaces |
CPUAlgebra::vector_type | m_c |
CPUAlgebra::vector_type | m_d |
size_t | m_size |
Protected Attributes inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type > | |
SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > | m_spConvCheck |
smart pointer holding the convergence check More... | |
SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > | m_spLinearOperator |
Operator that is inverted by this Inverse Operator. More... | |
Protected Attributes inherited from ug::ILinearIterator< X, Y > | |
SmartPtr< IDamping< X, Y > > | m_spDamping |
the scaling More... | |
Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type > | |
SmartPtr< IVectorDebugWriter< vector_type > > | m_spVectorDebugWriter |
Debug Writer. More... | |
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 |
clone
Reimplemented from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >.
|
inline |
|
protectedpure virtual |
Implemented in ug::SuperLUSolver< class >.
Referenced by ug::IExternalSolver< TAlgebra >::apply().
|
pure virtual |
Implemented in ug::SuperLUSolver< class >.
Referenced by ug::IExternalSolver< TAlgebra >::mat_preprocess().
|
pure virtual |
Implemented in ug::SuperLUSolver< class >.
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 pcl::CollectUniqueElements(), 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< TAlgebra::vector_type, TAlgebra::vector_type >.
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< TAlgebra::vector_type, TAlgebra::vector_type >.
|
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 |