ug4
|
describes a mapping X->Y More...
#include <operator.h>
Public Types | |
typedef Y | codomain_function_type |
Range space. More... | |
typedef X | domain_function_type |
Domain space. More... | |
Public Member Functions | |
virtual void | apply (Y &d, const X &u)=0 |
computes the nonlinear mapping d := N(u) More... | |
virtual void | init ()=0 |
initializes the operator More... | |
virtual void | prepare (X &u)=0 |
prepares domain and codomain functions for application More... | |
virtual | ~IOperator () |
virtual destructor More... | |
describes a mapping X->Y
This class is the base class for all mappings between two spaces. The domain space and the codomain space are passed as template parameters. In particular, the mapping can be nonlinear. For linear (or linearized) mappings see ILinearizedOperator. The basic usage of this class is to provide the computation of:
d := N(u),
where d is from the codomain space, u a function of the domain space and N() is a (nonlinear-) mapping.
This application is splitted into three methods, that have to be called in the correct order:
This splitting has been made, since initialization and preparation may be computationally expansive. Thus, the user of this class has the choice when to call this initialization/preparation. E.g. when the operator is applied several times on the same vectors, those have only to be prepared once and the init of the operator is only needed once.
X | Domain space function |
Y | Range space function |
typedef Y ug::IOperator< X, Y >::codomain_function_type |
Range space.
typedef X ug::IOperator< X, Y >::domain_function_type |
Domain space.
|
inlinevirtual |
virtual destructor
|
pure virtual |
computes the nonlinear mapping d := N(u)
This method maps a function from the domain space to the range space. Note, that is must be called with functions, that have previously been prepared using the 'prepare'-method and that the operator must have been initialized using the 'init'-method
[in] | u | domain function |
[out] | d | codomain function |
Implemented in ug::ILinearOperator< X, X >, ug::MatrixOperator< M, X, X >, ug::AssembledOperator< TAlgebra >, and ug::ITimeIntegrator< class, class >.
|
pure virtual |
initializes the operator
This method initializes the operator. It must be called before any of the other methods are called.
Implemented in ug::ILinearOperator< X, Y >, ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >, ug::ILinearOperator< X, X >, ug::AssembledOperator< TAlgebra >, ug::AssembledLinearOperator< TAlgebra >, ug::SchurComplementOperator< TAlgebra >, ug::SchurComplementMatrixOperator< TAlgebra, M, X, Y >, ug::LocalSchurComplement< TAlgebra >, ug::LocalSchurComplement< algebra_type >, ug::MatrixOperator< M, X, Y >, ug::MatrixOperator< M, X, X >, ug::MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type >, ug::MatrixDiagonalInverse< M, X, Y >, ug::MatrixDiagonal< M, X, Y >, and ug::ITimeIntegrator< class, class >.
|
pure virtual |
prepares domain and codomain functions for application
This method prepares the in- and output functions for the application and has to be called once before the apply method can be invoked with the functions used here.
[in] | u | domain function |
Implemented in ug::ILinearOperator< X, Y >, ug::ILinearOperator< X, X >, ug::AssembledOperator< TAlgebra >, and ug::ITimeIntegrator< class, class >.