LifeV
TwoLevelOperator Class Reference

It defines a two level methods to approximately apply the inverse of a fine level operator. More...

#include <TwoLevelOperator.hpp>

+ Inheritance diagram for TwoLevelOperator:
+ Collaboration diagram for TwoLevelOperator:

Public Member Functions

 TwoLevelOperator ()
 
virtual ~TwoLevelOperator ()
 
int checkConsistency ()
 Check that the range and domains of all operators are compatible. More...
 
virtual int SetUseTranspose (bool UseTranspose)
 
- Public Member Functions inherited from LinearOperatorAlgebra
virtual ~LinearOperatorAlgebra ()
 Destructor. More...
 
int apply (const VectorEpetra &X, VectorEpetra &Y) const
 Returns the result of a LinearOperator applied to a VectorEpetra X in Y. More...
 
int applyInverse (const VectorEpetra &X, VectorEpetra &Y)
 Returns the result of a LinearOperator inverse applied to an VectorEpetra X in Y. More...
 

Private Attributes

operatorPtr_Type M_fineLevelOper
 
operatorPtr_Type M_smootherOper
 
operatorPtr_Type M_coarseLevelOper
 
operatorPtr_Type M_restrictionOper
 
operatorPtr_Type M_estensionOper
 

Setters

void SetFineLevelOperator (const operatorPtr_Type &fineLevelOper)
 Set the fine level operator. More...
 
void SetSmootherOperator (const operatorPtr_Type &smootherOper)
 Set the fine level smoother (smootherOper should have a ApplyInverse method) More...
 
void SetCoarseLevelOperator (const operatorPtr_Type &coarseLevelOper)
 Set the coarse level solver (coarseLevelOper should have a ApplyInverse method) More...
 
void SetRestrictionOperator (const operatorPtr_Type &restrictionOper)
 Set the restriction operator from the fine to coarse level. More...
 
void SetEstensionOperator (const operatorPtr_Type &estensionOper)
 Set the extension operatoe from the coarse to fine level. More...
 

Mathematical functions

virtual int Apply (const vector_Type &X, vector_Type &Y) const
 Returns the result of a raw_operator applied to a raw_vector X in Y. More...
 
virtual int ApplyInverse (const vector_Type &X, vector_Type &Y) const
 Returns the result of a raw_operator inverse applied to an raw_vector X in Y. More...
 
virtual double NormInf () const
 Returns the infinity norm of the global matrix. More...
 

Attribute access functions

virtual const char * Label () const
 Returns a character string describing the operator. More...
 
virtual bool UseTranspose () const
 Returns the current UseTranspose setting. More...
 
virtual bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise. More...
 
virtual const comm_TypeComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator. More...
 
virtual const map_TypeOperatorDomainMap () const
 Returns the raw_map object associated with the domain of this operator. More...
 
virtual const map_TypeOperatorRangeMap () const
 Returns the raw_map object associated with the range of this operator. More...
 

Additional Inherited Members

- Public Types inherited from LinearOperatorAlgebra
typedef Epetra_Comm comm_Type
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 
typedef Epetra_Map map_Type
 
typedef std::shared_ptr< map_TypemapPtr_Type
 
typedef std::shared_ptr< const map_TypeconstMapPtr_Type
 
typedef Epetra_Operator operator_Type
 
typedef std::shared_ptr< operator_TypeoperatorPtr_Type
 
typedef Epetra_MultiVector vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 

Detailed Description

It defines a two level methods to approximately apply the inverse of a fine level operator.

It implements the public interface of LinearOperatorAlgebra and it defines the public methods to set information the fine level operator and smoother, the coarse level solver, the extension and restriction operators.

Definition at line 35 of file TwoLevelOperator.hpp.

Constructor & Destructor Documentation

◆ TwoLevelOperator()

Definition at line 16 of file TwoLevelOperator.cpp.

◆ ~TwoLevelOperator()

~TwoLevelOperator ( )
virtual

Definition at line 20 of file TwoLevelOperator.cpp.

Member Function Documentation

◆ SetFineLevelOperator()

void SetFineLevelOperator ( const operatorPtr_Type fineLevelOper)

Set the fine level operator.

Definition at line 23 of file TwoLevelOperator.cpp.

+ Here is the caller graph for this function:

◆ SetSmootherOperator()

void SetSmootherOperator ( const operatorPtr_Type smootherOper)

Set the fine level smoother (smootherOper should have a ApplyInverse method)

Definition at line 29 of file TwoLevelOperator.cpp.

◆ SetCoarseLevelOperator()

void SetCoarseLevelOperator ( const operatorPtr_Type coarseLevelOper)

Set the coarse level solver (coarseLevelOper should have a ApplyInverse method)

Definition at line 36 of file TwoLevelOperator.cpp.

◆ SetRestrictionOperator()

void SetRestrictionOperator ( const operatorPtr_Type restrictionOper)

Set the restriction operator from the fine to coarse level.

Definition at line 42 of file TwoLevelOperator.cpp.

+ Here is the caller graph for this function:

◆ SetEstensionOperator()

void SetEstensionOperator ( const operatorPtr_Type estensionOper)

Set the extension operatoe from the coarse to fine level.

Definition at line 48 of file TwoLevelOperator.cpp.

+ Here is the caller graph for this function:

◆ checkConsistency()

int checkConsistency ( )

Check that the range and domains of all operators are compatible.

Definition at line 54 of file TwoLevelOperator.cpp.

◆ SetUseTranspose()

int SetUseTranspose ( bool  UseTranspose)
virtual
Warning
not fully supported!

Implements LinearOperatorAlgebra.

Definition at line 103 of file TwoLevelOperator.cpp.

◆ Apply()

int Apply ( const vector_Type X,
vector_Type Y 
) const
virtual

Returns the result of a raw_operator applied to a raw_vector X in Y.

Parameters
InX - A raw_vector of dimension NumVectors to multiply with matrix.
OutY -A raw_vector of dimension NumVectors containing result.
Returns
Integer error code, set to 0 if successful.

Implements LinearOperatorAlgebra.

Definition at line 111 of file TwoLevelOperator.cpp.

◆ ApplyInverse()

int ApplyInverse ( const vector_Type X,
vector_Type Y 
) const
virtual

Returns the result of a raw_operator inverse applied to an raw_vector X in Y.

Parameters
InX - A raw_vector of dimension NumVectors to solve for.
OutY -A raw_vector of dimension NumVectors containing result.
Returns
Integer error code, set to 0 if successful.
Warning
In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.

Implements LinearOperatorAlgebra.

Definition at line 117 of file TwoLevelOperator.cpp.

◆ NormInf()

double NormInf ( ) const
virtual

Returns the infinity norm of the global matrix.

Implements LinearOperatorAlgebra.

Definition at line 157 of file TwoLevelOperator.cpp.

◆ Label()

const char * Label ( ) const
virtual

Returns a character string describing the operator.

Implements LinearOperatorAlgebra.

Definition at line 163 of file TwoLevelOperator.cpp.

◆ UseTranspose()

bool UseTranspose ( ) const
virtual

Returns the current UseTranspose setting.

Implements LinearOperatorAlgebra.

Definition at line 168 of file TwoLevelOperator.cpp.

◆ HasNormInf()

bool HasNormInf ( ) const
virtual

Returns true if the this object can provide an approximate Inf-norm, false otherwise.

Implements LinearOperatorAlgebra.

Definition at line 173 of file TwoLevelOperator.cpp.

◆ Comm()

const LinearOperatorAlgebra::comm_Type & Comm ( ) const
virtual

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements LinearOperatorAlgebra.

Definition at line 178 of file TwoLevelOperator.cpp.

◆ OperatorDomainMap()

const LinearOperatorAlgebra::map_Type & OperatorDomainMap ( ) const
virtual

Returns the raw_map object associated with the domain of this operator.

Implements LinearOperatorAlgebra.

Definition at line 183 of file TwoLevelOperator.cpp.

◆ OperatorRangeMap()

const LinearOperatorAlgebra::map_Type & OperatorRangeMap ( ) const
virtual

Returns the raw_map object associated with the range of this operator.

Implements LinearOperatorAlgebra.

Definition at line 188 of file TwoLevelOperator.cpp.

Field Documentation

◆ M_fineLevelOper

operatorPtr_Type M_fineLevelOper
private

Definition at line 94 of file TwoLevelOperator.hpp.

◆ M_smootherOper

operatorPtr_Type M_smootherOper
private

Definition at line 95 of file TwoLevelOperator.hpp.

◆ M_coarseLevelOper

operatorPtr_Type M_coarseLevelOper
private

Definition at line 96 of file TwoLevelOperator.hpp.

◆ M_restrictionOper

operatorPtr_Type M_restrictionOper
private

Definition at line 97 of file TwoLevelOperator.hpp.

◆ M_estensionOper

operatorPtr_Type M_estensionOper
private

Definition at line 98 of file TwoLevelOperator.hpp.


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