8 #ifndef FSIAPPLYOPERATOR_HPP_ 9 #define FSIAPPLYOPERATOR_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> 17 #include <lifev/core/array/MapEpetra.hpp> 18 #include <lifev/core/array/VectorEpetra.hpp> 72 void setUp (
const std::shared_ptr<BlockEpetra_Map> & map,
const commPtr_Type & comm);
84 void setUp (
const std::shared_ptr<BlockEpetra_Map> & domainMap,
85 const std::shared_ptr<BlockEpetra_Map> & rangeMap,
86 const commPtr_Type & comm);
100 void setBlock (
UInt iblock,
UInt jblock,
const operatorPtr_Type & operBlock);
115 virtual int Apply(
const vector_Type & X, vector_Type & Y)
const;
120 virtual int ApplyInverse(
const vector_Type & X, vector_Type & Y)
const;
129 virtual const char *
Label()
const {
return M_name.c_str();}
138 const comm_Type &
Comm()
const {
return *M_comm;}
141 const operatorPtr_Type&
block (
UInt iblock,
UInt jblock)
const;
161 int blockJacobi(
const vector_Type & X, vector_Type & Y)
const;
std::shared_ptr< mapEpetra_Type > mapEpetraPtr_Type
virtual int ApplyInverse(const vector_Type &X, vector_Type &Y) const
Compute Y = Op;.
VectorEpetra - The Epetra Vector format Wrapper.
Epetra_Operator operator_Type
int blockJacobi(const vector_Type &X, vector_Type &Y) const
Y = diag(block(i,i)^-1)*X.
std::shared_ptr< map_Type > mapPtr_Type
LinearOperatorAlgebra super
std::vector< vectorPtr_Type > vectorPtrContainer_Type
bool M_useTranspose
whenever transpose should be used
const operatorPtr_Type & block(UInt iblock, UInt jblock) const
Returns a const pointer to the (i,j) block.
double NormInf() const
Compute the Inf norm of the operator.
const map_Type & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
commPtr_Type M_comm
Communicator.
const comm_Type & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this operator.
int blockUpperTriangularSolve(const vector_Type &X, vector_Type &Y) const
Y = backwardsubstitution(X)
Abstract class which defines the interface of a Linear Operator.
const mapPtr_Type & OperatorRangeMap_ptr() const
Returns the Epetra_Map object associated with the range of this operator as a pointer.
virtual const char * Label() const
Returns a character string describing the operator.
std::shared_ptr< BlockEpetra_Map > M_domainMap
Domain Map.
void updateInverseJacobian(const UInt &iQuadPt)
int applyNoTranspose(const vector_Type &X, vector_Type &Y) const
Compute Y = Op*X;.
bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
const std::shared_ptr< BlockEpetra_Map > & OperatorDomainBlockMapPtr() const
std::string M_name
Name of the object.
Epetra_Import const & importer()
Getter for the Epetra_Import.
boost::numeric::ublas::matrix< operatorPtr_Type > operatorPtrContainer_Type
UInt M_nBlockCols
Number of blocks in each column.
int applyTranspose(const vector_Type &X, vector_Type &Y) const
Compute Y = Op'*X;.
operatorPtrContainer_Type M_oper
block operator represented like a dense matrix of pointers to Operators
void setMonolithicMap(const mapEpetraPtr_Type &monolithicMap)
Set the monolithic map.
mapEpetraPtr_Type M_monolithicMap
std::vector< mapPtr_Type > mapPtrContainer_Type
A abstract class for handling n-by-m block operators This class inherits from LifeV::LinearOperator.
void setUp(const operatorPtrContainer_Type &blockOper, const commPtr_Type &comm)
SetUp when the operator is given like a boost::matrix.
VectorEpetra VectorEpetra_Type
const std::shared_ptr< BlockEpetra_Map > & OperatorRangeBlockMapPtr() const
const map_Type & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
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".
bool UseTranspose() const
Returns the current UseTranspose setting.
FSIApplyOperator()
Empty Constructor.
std::shared_ptr< VectorEpetra_Type > VectorEpetraPtr_Type
Epetra_MultiVector vector_Type
std::shared_ptr< comm_Type > commPtr_Type
int blockLowerTriangularSolve(const vector_Type &X, vector_Type &Y) const
Y = forwardsubstitution(X)
void setBlock(UInt iblock, UInt jblock, const operatorPtr_Type &operBlock)
set a component of the block operator
int SetUseTranspose(bool useTranspose)
If true the transpose of the operator will be computed.
const mapPtr_Type & OperatorDomainMap_ptr() const
Returns the Epetra_Map object associated with the domain of this operator as a pointer.
UInt M_nBlockRows
Number of blocks in each row.
std::shared_ptr< vector_Type > vectorPtr_Type
uint32_type UInt
generic unsigned integer (used mainly for addressing)
std::shared_ptr< operator_Type > operatorPtr_Type
void fillComplete()
Complete the block matrix with null operators.
void setName(const std::string &name)
Change the name of the operator, (available for derivate classes).
virtual int Apply(const vector_Type &X, vector_Type &Y) const
Compute Y = Op*X;.
std::shared_ptr< BlockEpetra_Map > M_rangeMap
Range Map.