ug4
ug::IMatrixOperatorInverse< M, X, Y > Class Template Referenceabstract

describes an inverse linear mapping X->Y based on a matrix More...

#include <matrix_operator_inverse.h>

+ Inheritance diagram for ug::IMatrixOperatorInverse< M, X, Y >:

Public Types

typedef Y codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 
typedef M matrix_type
 Matrix type. More...
 
- Public Types inherited from ug::ILinearOperatorInverse< X, X >
typedef X codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 
- Public Types inherited from ug::ILinearIterator< X, X >
typedef X codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 

Public Member Functions

virtual bool apply (Y &u, const X &f)=0
 applies the inverse operator, i.e. returns u = A^{-1} * f More...
 
virtual bool apply_return_defect (Y &u, X &f)=0
 applies the inverse operator and updates the defect More...
 
virtual bool init (SmartPtr< ILinearOperator< Y, X > > A)
 initializes this inverse operator for a linear operator More...
 
virtual bool init (SmartPtr< ILinearOperator< Y, X > > A, const Y &u)
 initializes this inverse operator for a linear operator More...
 
virtual bool init (SmartPtr< MatrixOperator< M, Y, X > > A)=0
 initializes this inverse operator for a matrix-based operator More...
 
virtual ~IMatrixOperatorInverse ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::ILinearOperatorInverse< X, X >
virtual bool apply (X &u, const X &f)=0
 applies inverse operator, i.e. returns u = A^{-1} f More...
 
virtual bool apply_return_defect (X &u, X &f)=0
 applies inverse operator, i.e. returns u = A^{-1} f and returns defect d := f - A*u More...
 
virtual bool apply_update_defect (X &u, X &f)
 
virtual SmartPtr< ILinearIterator< X, X > > clone ()
 clone More...
 
virtual std::string config_string () const
 returns information about configuration parameters More...
 
SmartPtr< IConvergenceCheck< X > > convergence_check ()
 returns the convergence check More...
 
ConstSmartPtr< IConvergenceCheck< X > > 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< X > > spConvCheck)
 Default constructor. More...
 
virtual bool init (SmartPtr< ILinearOperator< X, X > > J, const X &u)
 initializes for the inverse for a linearized operator at linearization point u More...
 
virtual bool init (SmartPtr< ILinearOperator< X, X > > L)
 initializes for the inverse for a linear operator More...
 
SmartPtr< ILinearOperator< X, X > > linear_operator ()
 returns the current Operator this Inverse Operator is initialized for More...
 
virtual const char * name () const=0
 returns the name of the operator inverse More...
 
number reduction () const
 returns the current relative reduction More...
 
void set_convergence_check (SmartPtr< IConvergenceCheck< X > > 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 bool supports_parallel () const=0
 returns if parallel solving is supported More...
 
virtual ~ILinearOperatorInverse ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::ILinearIterator< X, X >
SmartPtr< IDamping< X, X > > damping ()
 returns the scaling More...
 
 ILinearIterator ()
 constructor More...
 
 ILinearIterator (const ILinearIterator< X, X > &parent)
 copy constructor More...
 
void set_damp (number factor)
 sets the damping to a constant factor More...
 
void set_damp (SmartPtr< IDamping< X, X > > spScaling)
 sets a scaling for the correction More...
 
virtual ~ILinearIterator ()
 virtual destructor More...
 

Additional Inherited Members

- Protected Attributes inherited from ug::ILinearOperatorInverse< X, X >
SmartPtr< IConvergenceCheck< X > > m_spConvCheck
 smart pointer holding the convergence check More...
 
SmartPtr< ILinearOperator< X, X > > m_spLinearOperator
 Operator that is inverted by this Inverse Operator. More...
 
- Protected Attributes inherited from ug::ILinearIterator< X, X >
SmartPtr< IDamping< X, X > > m_spDamping
 the scaling More...
 

Detailed Description

template<typename M, typename X, typename Y = X>
class ug::IMatrixOperatorInverse< M, X, Y >

describes an inverse linear mapping X->Y based on a matrix

This class is the base class for the inversion of linear matrix-based operator given in form of the IMatrixOperator interface class. Given a operator L, the basic usage of this class is to invert this operator, i.e. to compute the solution u of

L*u = f     i.e. u := L^{-1} f
Template Parameters
Xdomain space (i.e. a vector corresponding to the matrix)
Yrange space (i.e. a vector corresponding to the matrix)
Mmatrix type used to represent linear mapping

Member Typedef Documentation

◆ codomain_function_type

template<typename M , typename X , typename Y = X>
typedef Y ug::IMatrixOperatorInverse< M, X, Y >::codomain_function_type

Range space.

◆ domain_function_type

template<typename M , typename X , typename Y = X>
typedef X ug::IMatrixOperatorInverse< M, X, Y >::domain_function_type

Domain space.

◆ matrix_type

template<typename M , typename X , typename Y = X>
typedef M ug::IMatrixOperatorInverse< M, X, Y >::matrix_type

Matrix type.

Constructor & Destructor Documentation

◆ ~IMatrixOperatorInverse()

template<typename M , typename X , typename Y = X>
virtual ug::IMatrixOperatorInverse< M, X, Y >::~IMatrixOperatorInverse ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ apply()

template<typename M , typename X , typename Y = X>
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::apply ( Y &  u,
const X &  f 
)
pure virtual

applies the inverse operator, i.e. returns u = A^{-1} * f

This method applies the inverse operator.

Parameters
[out]usolution
[in]fright-hand side
Returns
bool success flag

Implemented in ug::FETISolver< TAlgebra >, ug::AgglomeratingBase< IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >, TAlgebra >, ug::LU< TAlgebra >, and ug::IExternalSolver< TAlgebra >.

◆ apply_return_defect()

template<typename M , typename X , typename Y = X>
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::apply_return_defect ( Y &  u,
X &  f 
)
pure virtual

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.

Parameters
[out]usolution
[in]fright-hand side on entry, defect on exit
Returns
bool success flag

Implemented in ug::LU< TAlgebra >, ug::IExternalSolver< TAlgebra >, ug::AgglomeratingBase< IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >, TAlgebra >, and ug::FETISolver< TAlgebra >.

◆ init() [1/3]

template<typename M , typename X , typename Y = X>
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::init ( SmartPtr< ILinearOperator< Y, X > >  A)
inlinevirtual

initializes this inverse operator for a linear operator

This method implements the ILinearOperatorInverse interface method. Basically, the request is forwarded to the matrix-based init method, if the the operator is matrix-based. If the operator is not matrix-based this inverse can not be used and false is returned

Parameters
[in]Alinear matrix-based operator to invert
Returns
bool success flag

References ug::IMatrixOperatorInverse< M, X, Y >::init(), SmartPtr< T, FreePolicy >::invalid(), and UG_THROW.

◆ init() [2/3]

template<typename M , typename X , typename Y = X>
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::init ( SmartPtr< ILinearOperator< Y, X > >  A,
const Y &  u 
)
inlinevirtual

initializes this inverse operator for a linear operator

This method implements the ILinearOperatorInverse interface method. Basically, the request is forwarded to the matrix-based init method, if the the operator is matrix-based. If the operator is not matrix-based this inverse can not be used and false is returned

Parameters
[in]Alinear matrix-based operator to invert
[in]ulinearization point
Returns
bool success flag

References ug::IMatrixOperatorInverse< M, X, Y >::init().

◆ init() [3/3]

template<typename M , typename X , typename Y = X>
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::init ( SmartPtr< MatrixOperator< M, Y, X > >  A)
pure virtual

initializes this inverse operator for a matrix-based operator

This method passes the operator A that is inverted by this operator. In addition some preparation step can be made.

Parameters
[in]Alinear matrix-basewd operator to invert
Returns
bool success flag

Referenced by ug::IMatrixOperatorInverse< M, X, Y >::init().


The documentation for this class was generated from the following file: