8 #ifndef BLOCKOPERATOR_HPP_ 9 #define BLOCKOPERATOR_HPP_ 11 #include <Epetra_Import.h> 12 #include <boost/numeric/ublas/matrix.hpp> 14 #include <lifev/core/linear_algebra/BlockEpetra_Map.hpp> 15 #include <lifev/core/linear_algebra/BlockEpetra_MultiVector.hpp> 16 #include <lifev/core/linear_algebra/LinearOperatorAlgebra.hpp> 90 const commPtr_Type & comm);
104 void setBlock (
UInt iblock,
UInt jblock,
const operatorPtr_Type & operBlock);
116 virtual int Apply(
const vector_Type & X, vector_Type & Y)
const;
121 virtual int ApplyInverse(
const vector_Type & X, vector_Type & Y)
const;
130 virtual const char *
Label()
const {
return M_name.c_str();}
139 const comm_Type &
Comm()
const {
return *M_comm;}
142 const operatorPtr_Type&
block (
UInt iblock,
UInt jblock)
const;
162 int blockJacobi(
const vector_Type & X, vector_Type & Y)
const;
void setUp(const operatorPtrContainer_Type &blockOper, const commPtr_Type &comm)
SetUp when the operator is given like a boost::matrix.
std::vector< vectorPtr_Type > vectorPtrContainer_Type
This class handles block access to parallel monolithic Vectors with an underling block structure...
Epetra_Operator operator_Type
std::shared_ptr< map_Type > mapPtr_Type
int applyTranspose(const vector_Type &X, vector_Type &Y) const
Compute Y = Op'*X;.
void setUp(const boost::shared_ptr< BlockEpetra_Map > &domainMap, const boost::shared_ptr< BlockEpetra_Map > &rangeMap, const commPtr_Type &comm)
SetUp for a "rectangular operator".
boost::shared_ptr< BlockEpetra_Map > M_domainMap
Domain Map.
int SetUseTranspose(bool useTranspose)
If true the transpose of the operator will be computed.
UInt M_nBlockCols
Number of blocks in each column.
void setBlock(UInt iblock, UInt jblock, const operatorPtr_Type &operBlock)
set a component of the block operator
virtual const char * Label() const
Returns a character string describing the operator.
Structure M_structure
structure of the block operator
boost::shared_ptr< BlockEpetra_Map > M_rangeMap
Range Map.
Abstract class which defines the interface of a Linear Operator.
operatorPtrContainer_Type M_oper
block operator represented like a dense matrix of pointers to Operators
const comm_Type & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
const mapPtr_Type & OperatorDomainMap_ptr() const
Returns the Epetra_Map object associated with the domain of this operator as a pointer.
const operatorPtr_Type & block(UInt iblock, UInt jblock) const
Returns a const pointer to the (i,j) block.
void updateInverseJacobian(const UInt &iQuadPt)
std::string M_name
Name of the object.
LinearOperatorAlgebra super
int blockUpperTriangularSolve(const vector_Type &X, vector_Type &Y) const
Y = backwardsubstitution(X)
void fillComplete()
Complete the block matrix with null operators.
int blockJacobi(const vector_Type &X, vector_Type &Y) const
Y = diag(block(i,i)^-1)*X.
A abstract class for handling n-by-m block operators This class inherits from LifeV::LinearOperatorAl...
commPtr_Type M_comm
Communicator.
const map_Type & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
std::vector< mapPtr_Type > mapPtrContainer_Type
const mapPtr_Type & OperatorRangeMap_ptr() const
Returns the Epetra_Map object associated with the range of this operator as a pointer.
boost::numeric::ublas::matrix< operatorPtr_Type > operatorPtrContainer_Type
void setName(const std::string &name)
Change the name of the operator, (available for derivate classes).
UInt M_nBlockRows
Number of blocks in each row.
double NormInf() const
Compute the Inf norm of the operator.
const boost::shared_ptr< BlockEpetra_Map > & OperatorDomainBlockMapPtr() const
Epetra_MultiVector vector_Type
std::shared_ptr< comm_Type > commPtr_Type
int applyNoTranspose(const vector_Type &X, vector_Type &Y) const
Compute Y = Op*X;.
int blockLowerTriangularSolve(const vector_Type &X, vector_Type &Y) const
Y = forwardsubstitution(X)
bool UseTranspose() const
Returns the current UseTranspose setting.
const map_Type & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
virtual int ApplyInverse(const vector_Type &X, vector_Type &Y) const
Compute Y = Op;.
virtual int Apply(const vector_Type &X, vector_Type &Y) const
Compute Y = Op*X;.
void setUp(const boost::shared_ptr< BlockEpetra_Map > &map, const commPtr_Type &comm)
SetUp for a "square operator".
std::shared_ptr< vector_Type > vectorPtr_Type
const boost::shared_ptr< BlockEpetra_Map > & OperatorRangeBlockMapPtr() const
uint32_type UInt
generic unsigned integer (used mainly for addressing)
std::shared_ptr< operator_Type > operatorPtr_Type
bool M_useTranspose
whenever transpose should be used
BlockOperator()
Empty Constructor.