LifeV
FSIApplyOperator Class Reference

A abstract class for handling n-by-m block operators This class inherits from LifeV::LinearOperator. More...

#include <FSIApplyOperator.hpp>

+ Inheritance diagram for FSIApplyOperator:
+ Collaboration diagram for FSIApplyOperator:

Public Member Functions

 FSIApplyOperator ()
 Empty Constructor. More...
 
- 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

operatorPtrContainer_Type M_oper
 block operator represented like a dense matrix of pointers to Operators More...
 
bool M_useTranspose
 whenever transpose should be used More...
 

Public Typedefs

typedef LinearOperatorAlgebra super
 
typedef super::comm_Type comm_Type
 
typedef super::commPtr_Type commPtr_Type
 
typedef super::map_Type map_Type
 
typedef super::mapPtr_Type mapPtr_Type
 
typedef super::operator_Type operator_Type
 
typedef super::operatorPtr_Type operatorPtr_Type
 
typedef super::vector_Type vector_Type
 
typedef super::vectorPtr_Type vectorPtr_Type
 
typedef MapEpetra mapEpetra_Type
 
typedef std::shared_ptr< mapEpetra_TypemapEpetraPtr_Type
 
typedef VectorEpetra VectorEpetra_Type
 
typedef std::shared_ptr< VectorEpetra_TypeVectorEpetraPtr_Type
 
typedef boost::numeric::ublas::matrix< operatorPtr_TypeoperatorPtrContainer_Type
 
typedef std::vector< vectorPtr_TypevectorPtrContainer_Type
 
typedef std::vector< mapPtr_TypemapPtrContainer_Type
 

Set Methods

UInt M_nBlockRows
 Number of blocks in each row. More...
 
UInt M_nBlockCols
 Number of blocks in each column. More...
 
std::string M_name
 Name of the object. More...
 
commPtr_Type M_comm
 Communicator. More...
 
void setUp (const std::shared_ptr< BlockEpetra_Map > &map, const commPtr_Type &comm)
 SetUp for a "square operator". More...
 
void setUp (const std::shared_ptr< BlockEpetra_Map > &domainMap, const std::shared_ptr< BlockEpetra_Map > &rangeMap, const commPtr_Type &comm)
 SetUp for a "rectangular operator". More...
 
void setUp (const operatorPtrContainer_Type &blockOper, const commPtr_Type &comm)
 SetUp when the operator is given like a boost::matrix. More...
 
void setBlock (UInt iblock, UInt jblock, const operatorPtr_Type &operBlock)
 set a component of the block operator More...
 
void fillComplete ()
 Complete the block matrix with null operators. More...
 
int SetUseTranspose (bool useTranspose)
 If true the transpose of the operator will be computed. More...
 
void setMonolithicMap (const mapEpetraPtr_Type &monolithicMap)
 Set the monolithic map. More...
 
virtual int Apply (const vector_Type &X, vector_Type &Y) const
 Compute Y = Op*X;. More...
 
virtual int ApplyInverse (const vector_Type &X, vector_Type &Y) const
 Compute Y = Op;. More...
 
double NormInf () const
 Compute the Inf norm of the operator. More...
 
virtual const char * Label () const
 Returns a character string describing the operator. More...
 
bool UseTranspose () const
 Returns the current UseTranspose setting. More...
 
bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise. More...
 
const comm_TypeComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator. More...
 
const operatorPtr_Typeblock (UInt iblock, UInt jblock) const
 Returns a const pointer to the (i,j) block. More...
 
const map_TypeOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator. More...
 
const mapPtr_TypeOperatorDomainMap_ptr () const
 Returns the Epetra_Map object associated with the domain of this operator as a pointer. More...
 
const std::shared_ptr< BlockEpetra_Map > & OperatorDomainBlockMapPtr () const
 
const map_TypeOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator. More...
 
const mapPtr_TypeOperatorRangeMap_ptr () const
 Returns the Epetra_Map object associated with the range of this operator as a pointer. More...
 
const std::shared_ptr< BlockEpetra_Map > & OperatorRangeBlockMapPtr () const
 
int applyNoTranspose (const vector_Type &X, vector_Type &Y) const
 Compute Y = Op*X;. More...
 
int applyTranspose (const vector_Type &X, vector_Type &Y) const
 Compute Y = Op'*X;. More...
 
int blockJacobi (const vector_Type &X, vector_Type &Y) const
 Y = diag(block(i,i)^-1)*X. More...
 
int blockUpperTriangularSolve (const vector_Type &X, vector_Type &Y) const
 Y = backwardsubstitution(X) More...
 
int blockLowerTriangularSolve (const vector_Type &X, vector_Type &Y) const
 Y = forwardsubstitution(X) More...
 
void setName (const std::string &name)
 Change the name of the operator, (available for derivate classes). More...
 

Maps

std::shared_ptr< BlockEpetra_MapM_domainMap
 Domain Map. More...
 
std::shared_ptr< BlockEpetra_MapM_rangeMap
 Range Map. More...
 
mapEpetraPtr_Type M_monolithicMap
 

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

A abstract class for handling n-by-m block operators This class inherits from LifeV::LinearOperator.

The Transpose is not supported yet.

Definition at line 32 of file FSIApplyOperator.hpp.

Member Typedef Documentation

◆ super

Definition at line 38 of file FSIApplyOperator.hpp.

◆ comm_Type

Definition at line 39 of file FSIApplyOperator.hpp.

◆ commPtr_Type

Definition at line 40 of file FSIApplyOperator.hpp.

◆ map_Type

Definition at line 41 of file FSIApplyOperator.hpp.

◆ mapPtr_Type

Definition at line 42 of file FSIApplyOperator.hpp.

◆ operator_Type

Definition at line 43 of file FSIApplyOperator.hpp.

◆ operatorPtr_Type

Definition at line 44 of file FSIApplyOperator.hpp.

◆ vector_Type

Definition at line 45 of file FSIApplyOperator.hpp.

◆ vectorPtr_Type

Definition at line 46 of file FSIApplyOperator.hpp.

◆ mapEpetra_Type

Definition at line 48 of file FSIApplyOperator.hpp.

◆ mapEpetraPtr_Type

typedef std::shared_ptr<mapEpetra_Type> mapEpetraPtr_Type

Definition at line 49 of file FSIApplyOperator.hpp.

◆ VectorEpetra_Type

Definition at line 50 of file FSIApplyOperator.hpp.

◆ VectorEpetraPtr_Type

typedef std::shared_ptr<VectorEpetra_Type> VectorEpetraPtr_Type

Definition at line 51 of file FSIApplyOperator.hpp.

◆ operatorPtrContainer_Type

typedef boost::numeric::ublas::matrix<operatorPtr_Type> operatorPtrContainer_Type

Definition at line 53 of file FSIApplyOperator.hpp.

◆ vectorPtrContainer_Type

Definition at line 54 of file FSIApplyOperator.hpp.

◆ mapPtrContainer_Type

typedef std::vector<mapPtr_Type > mapPtrContainer_Type

Definition at line 55 of file FSIApplyOperator.hpp.

Constructor & Destructor Documentation

◆ FSIApplyOperator()

Empty Constructor.

Definition at line 14 of file FSIApplyOperator.cpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ setUp() [1/3]

void setUp ( const std::shared_ptr< BlockEpetra_Map > &  map,
const commPtr_Type comm 
)

SetUp for a "square operator".

Parameters
domainMapthe map of a vector in the domain of this is obtained by concatenating the block maps in domainMap. rangeMap is assumed to be the same of domainMap.
commthe communicator.

Definition at line 21 of file FSIApplyOperator.cpp.

◆ setUp() [2/3]

void setUp ( const std::shared_ptr< BlockEpetra_Map > &  domainMap,
const std::shared_ptr< BlockEpetra_Map > &  rangeMap,
const commPtr_Type comm 
)

SetUp for a "rectangular operator".

Parameters
domainMapthe map of a vector in the domain of this is obtained by concatenating the block maps in domainMap.
rangeMapthe map of a vector in the range of this is obtained by concatenating the block maps in rangeMap.
commthe communicator.

Definition at line 34 of file FSIApplyOperator.cpp.

◆ setUp() [3/3]

void setUp ( const operatorPtrContainer_Type blockOper,
const commPtr_Type comm 
)

SetUp when the operator is given like a boost::matrix.

Parameters
blockOpera dense matrix to describe the block operator
commthe communicator

Definition at line 51 of file FSIApplyOperator.cpp.

◆ setBlock()

void setBlock ( UInt  iblock,
UInt  jblock,
const operatorPtr_Type operBlock 
)

set a component of the block operator

Parameters
iblock,jblockThe position of the block is (iblock, jblock).
operBlock: an operator_ptr representing the block

Definition at line 89 of file FSIApplyOperator.cpp.

◆ fillComplete()

void fillComplete ( )

Complete the block matrix with null operators.

Definition at line 98 of file FSIApplyOperator.cpp.

+ Here is the caller graph for this function:

◆ SetUseTranspose()

int SetUseTranspose ( bool  useTranspose)
virtual

If true the transpose of the operator will be computed.

Implements LinearOperatorAlgebra.

Definition at line 115 of file FSIApplyOperator.cpp.

◆ setMonolithicMap()

void setMonolithicMap ( const mapEpetraPtr_Type monolithicMap)
inline

Set the monolithic map.

Definition at line 112 of file FSIApplyOperator.hpp.

◆ Apply()

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

Compute Y = Op*X;.

Implements LinearOperatorAlgebra.

Definition at line 130 of file FSIApplyOperator.cpp.

◆ ApplyInverse()

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

Compute Y = Op;.

ApplyInverse is implemented for the matrices with block diagonal, lowerTriangular, upperTriangular form

Implements LinearOperatorAlgebra.

Definition at line 152 of file FSIApplyOperator.cpp.

◆ NormInf()

double NormInf ( ) const
inlinevirtual

Compute the Inf norm of the operator.

Not implemented yet.

Implements LinearOperatorAlgebra.

Definition at line 126 of file FSIApplyOperator.hpp.

◆ Label()

virtual const char* Label ( ) const
inlinevirtual

Returns a character string describing the operator.

Implements LinearOperatorAlgebra.

Definition at line 129 of file FSIApplyOperator.hpp.

◆ UseTranspose()

bool UseTranspose ( ) const
inlinevirtual

Returns the current UseTranspose setting.

Implements LinearOperatorAlgebra.

Definition at line 132 of file FSIApplyOperator.hpp.

◆ HasNormInf()

bool HasNormInf ( ) const
inlinevirtual

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

Implements LinearOperatorAlgebra.

Definition at line 135 of file FSIApplyOperator.hpp.

◆ Comm()

const comm_Type& Comm ( ) const
inlinevirtual

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

Implements LinearOperatorAlgebra.

Definition at line 138 of file FSIApplyOperator.hpp.

◆ block()

const FSIApplyOperator::operatorPtr_Type & block ( UInt  iblock,
UInt  jblock 
) const

Returns a const pointer to the (i,j) block.

Definition at line 158 of file FSIApplyOperator.cpp.

◆ OperatorDomainMap()

const map_Type& OperatorDomainMap ( ) const
inlinevirtual

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

Implements LinearOperatorAlgebra.

Definition at line 144 of file FSIApplyOperator.hpp.

◆ OperatorDomainMap_ptr()

const mapPtr_Type& OperatorDomainMap_ptr ( ) const
inline

Returns the Epetra_Map object associated with the domain of this operator as a pointer.

Definition at line 146 of file FSIApplyOperator.hpp.

◆ OperatorDomainBlockMapPtr()

const std::shared_ptr<BlockEpetra_Map>& OperatorDomainBlockMapPtr ( ) const
inline

Definition at line 147 of file FSIApplyOperator.hpp.

◆ OperatorRangeMap()

const map_Type& OperatorRangeMap ( ) const
inlinevirtual

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

Implements LinearOperatorAlgebra.

Definition at line 150 of file FSIApplyOperator.hpp.

◆ OperatorRangeMap_ptr()

const mapPtr_Type& OperatorRangeMap_ptr ( ) const
inline

Returns the Epetra_Map object associated with the range of this operator as a pointer.

Definition at line 152 of file FSIApplyOperator.hpp.

◆ OperatorRangeBlockMapPtr()

const std::shared_ptr<BlockEpetra_Map>& OperatorRangeBlockMapPtr ( ) const
inline

Definition at line 153 of file FSIApplyOperator.hpp.

◆ applyNoTranspose()

int applyNoTranspose ( const vector_Type X,
vector_Type Y 
) const
protected

Compute Y = Op*X;.

Definition at line 171 of file FSIApplyOperator.cpp.

+ Here is the caller graph for this function:

◆ applyTranspose()

int applyTranspose ( const vector_Type X,
vector_Type Y 
) const
protected

Compute Y = Op'*X;.

Definition at line 195 of file FSIApplyOperator.cpp.

+ Here is the caller graph for this function:

◆ blockJacobi()

int blockJacobi ( const vector_Type X,
vector_Type Y 
) const
protected

Y = diag(block(i,i)^-1)*X.

◆ blockUpperTriangularSolve()

int blockUpperTriangularSolve ( const vector_Type X,
vector_Type Y 
) const
protected

Y = backwardsubstitution(X)

◆ blockLowerTriangularSolve()

int blockLowerTriangularSolve ( const vector_Type X,
vector_Type Y 
) const
protected

Y = forwardsubstitution(X)

◆ setName()

void setName ( const std::string &  name)
inlineprotected

Change the name of the operator, (available for derivate classes).

Definition at line 167 of file FSIApplyOperator.hpp.

Field Documentation

◆ M_nBlockRows

UInt M_nBlockRows
private

Number of blocks in each row.

Definition at line 171 of file FSIApplyOperator.hpp.

◆ M_nBlockCols

UInt M_nBlockCols
private

Number of blocks in each column.

Definition at line 173 of file FSIApplyOperator.hpp.

◆ M_name

std::string M_name
private

Name of the object.

Definition at line 176 of file FSIApplyOperator.hpp.

◆ M_comm

commPtr_Type M_comm
private

Communicator.

Definition at line 178 of file FSIApplyOperator.hpp.

◆ M_domainMap

std::shared_ptr<BlockEpetra_Map> M_domainMap
private

Domain Map.

Definition at line 183 of file FSIApplyOperator.hpp.

◆ M_rangeMap

std::shared_ptr<BlockEpetra_Map> M_rangeMap
private

Range Map.

Definition at line 185 of file FSIApplyOperator.hpp.

◆ M_monolithicMap

mapEpetraPtr_Type M_monolithicMap
private

Definition at line 187 of file FSIApplyOperator.hpp.

◆ M_oper

operatorPtrContainer_Type M_oper
private

block operator represented like a dense matrix of pointers to Operators

Definition at line 191 of file FSIApplyOperator.hpp.

◆ M_useTranspose

bool M_useTranspose
private

whenever transpose should be used

Definition at line 194 of file FSIApplyOperator.hpp.


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