LifeV
LinearOperatorAlgebra Class Referenceabstract

Abstract class which defines the interface of a Linear Operator. More...

#include <LinearOperatorAlgebra.hpp>

+ Inheritance diagram for LinearOperatorAlgebra:
+ Collaboration diagram for LinearOperatorAlgebra:

Public Types

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
 

Destructor

virtual ~LinearOperatorAlgebra ()
 Destructor. More...
 

Attribute set methods

virtual int SetUseTranspose (bool UseTranspose)=0
 If set true, transpose of this operator will be applied. More...
 

Mathematical functions

virtual int Apply (const vector_Type &X, vector_Type &Y) const =0
 Returns the result of a raw_operator applied to a raw_vector X in Y. More...
 
int apply (const VectorEpetra &X, VectorEpetra &Y) const
 Returns the result of a LinearOperator applied to a VectorEpetra X in Y. More...
 
virtual int ApplyInverse (const vector_Type &X, vector_Type &Y) const =0
 Returns the result of a raw_operator inverse applied to an raw_vector 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...
 
virtual double NormInf () const =0
 Returns the infinity norm of the global matrix. More...
 

Attribute access functions

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

Detailed Description

Abstract class which defines the interface of a Linear Operator.

LinearOperator is an abstract which inherits from Epetra_Operator. LinearOperator should be the base class for all the LifeV class which implements a linear operator.

LinearOperator ensures perfect compatibility with all the Trilinos solvers, plus it supports directly the LifeV::VectorEpetra data.

Two concrete methods are implemented in LinearOperator int apply(const VectorEpetra &X, VectorEpetra & Y) const ; int applyInverse(const VectorEpetra &X, VectorEpetra &Y) const.

Such methods extract a raw Epetra_MultiVector from the VectorEpetra and then call the virtual methods Int Apply(const Epetra_MultiVector & X, Epetra_MultiVector & Y) const or Int ApplyInverse(const Epetra_MultiVector & X, Epetra_MultiVector & Y) const respectively.

Definition at line 48 of file LinearOperatorAlgebra.hpp.

Member Typedef Documentation

◆ comm_Type

typedef Epetra_Comm comm_Type

Definition at line 54 of file LinearOperatorAlgebra.hpp.

◆ commPtr_Type

typedef std::shared_ptr<comm_Type> commPtr_Type

Definition at line 55 of file LinearOperatorAlgebra.hpp.

◆ map_Type

typedef Epetra_Map map_Type

Definition at line 56 of file LinearOperatorAlgebra.hpp.

◆ mapPtr_Type

typedef std::shared_ptr<map_Type> mapPtr_Type

Definition at line 57 of file LinearOperatorAlgebra.hpp.

◆ constMapPtr_Type

typedef std::shared_ptr<const map_Type> constMapPtr_Type

Definition at line 58 of file LinearOperatorAlgebra.hpp.

◆ operator_Type

Definition at line 59 of file LinearOperatorAlgebra.hpp.

◆ operatorPtr_Type

typedef std::shared_ptr<operator_Type> operatorPtr_Type

Definition at line 60 of file LinearOperatorAlgebra.hpp.

◆ vector_Type

Definition at line 61 of file LinearOperatorAlgebra.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 62 of file LinearOperatorAlgebra.hpp.

Constructor & Destructor Documentation

◆ ~LinearOperatorAlgebra()

virtual ~LinearOperatorAlgebra ( )
inlinevirtual

Destructor.

Definition at line 68 of file LinearOperatorAlgebra.hpp.

Member Function Documentation

◆ SetUseTranspose()

virtual int SetUseTranspose ( bool  UseTranspose)
pure virtual

If set true, transpose of this operator will be applied.

This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.

Parameters
InUseTranspose -If true, multiply by the transpose of operator, otherwise just use operator.
Returns
Integer error code, set to 0 if successful. Set to -1 if this implementation does not support transpose.

Implemented in NullOperator, IdentityOperator, NavierStokesOperator, aSIMPLEOperator, FSIApplyOperatorNonConforming, BlockOperator, FSIApplyOperator, ApproximatedInvertibleRowMatrix, NavierStokesPreconditionerOperator, BlockJacobiPreconditioner, RowMatrixPreconditioner, TwoLevelOperator, LumpedOperator, InvertibleOperator, and CompositeOperator.

◆ Apply()

virtual int Apply ( const vector_Type X,
vector_Type Y 
) const
pure 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.

Implemented in NullOperator, IdentityOperator, aSIMPLEOperator, FSIApplyOperatorNonConforming, NavierStokesOperator, ApproximatedInvertibleRowMatrix, BlockOperator, FSIApplyOperator, NavierStokesPreconditionerOperator, RowMatrixPreconditioner, BlockJacobiPreconditioner, TwoLevelOperator, LumpedOperator, InvertibleOperator, and CompositeOperator.

+ Here is the caller graph for this function:

◆ apply()

int apply ( const VectorEpetra X,
VectorEpetra Y 
) const

Returns the result of a LinearOperator applied to a VectorEpetra X in Y.

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

Definition at line 16 of file LinearOperatorAlgebra.cpp.

◆ ApplyInverse()

virtual int ApplyInverse ( const vector_Type X,
vector_Type Y 
) const
pure 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.

Implemented in NullOperator, IdentityOperator, aSIMPLEOperator, FSIApplyOperatorNonConforming, NavierStokesOperator, NavierStokesPreconditionerOperator, BlockOperator, FSIApplyOperator, ApproximatedInvertibleRowMatrix, RowMatrixPreconditioner, BlockJacobiPreconditioner, TwoLevelOperator, LumpedOperator, InvertibleOperator, and CompositeOperator.

+ Here is the caller graph for this function:

◆ applyInverse()

int applyInverse ( const VectorEpetra X,
VectorEpetra Y 
)

Returns the result of a LinearOperator inverse applied to an VectorEpetra X in Y.

Parameters
InX - A VectorEpetra to solve for.
OutY -A VectorEpetra 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.

Definition at line 21 of file LinearOperatorAlgebra.cpp.

◆ NormInf()

◆ Label()

◆ UseTranspose()

◆ HasNormInf()

◆ Comm()

◆ OperatorDomainMap()

◆ OperatorRangeMap()


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