LifeV
|
A abstract class for handling n-by-m block operators This class inherits from LifeV::LinearOperator. More...
#include <NavierStokesOperator.hpp>
Public Member Functions | |
NavierStokesOperator () | |
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 boost::numeric::ublas::matrix< operatorPtr_Type > | operatorPtrContainer_Type |
typedef std::vector< vectorPtr_Type > | vectorPtrContainer_Type |
typedef std::vector< mapPtr_Type > | mapPtrContainer_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 std::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... | |
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_Type & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. More... | |
const operatorPtr_Type & | block (UInt iblock, UInt jblock) const |
Returns a const pointer to the (i,j) block. More... | |
const map_Type & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. More... | |
const mapPtr_Type & | OperatorDomainMap_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_Type & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. More... | |
const mapPtr_Type & | OperatorRangeMap_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_Map > | M_domainMap |
Domain Map. More... | |
std::shared_ptr< BlockEpetra_Map > | M_rangeMap |
Range Map. More... | |
Additional Inherited Members | |
Public Types inherited from LinearOperatorAlgebra | |
typedef Epetra_Comm | comm_Type |
typedef std::shared_ptr< comm_Type > | commPtr_Type |
typedef Epetra_Map | map_Type |
typedef std::shared_ptr< map_Type > | mapPtr_Type |
typedef std::shared_ptr< const map_Type > | constMapPtr_Type |
typedef Epetra_Operator | operator_Type |
typedef std::shared_ptr< operator_Type > | operatorPtr_Type |
typedef Epetra_MultiVector | vector_Type |
typedef std::shared_ptr< vector_Type > | vectorPtr_Type |
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 60 of file NavierStokesOperator.hpp.
typedef LinearOperatorAlgebra super |
Definition at line 66 of file NavierStokesOperator.hpp.
typedef super::comm_Type comm_Type |
Definition at line 67 of file NavierStokesOperator.hpp.
typedef super::commPtr_Type commPtr_Type |
Definition at line 68 of file NavierStokesOperator.hpp.
typedef super::map_Type map_Type |
Definition at line 69 of file NavierStokesOperator.hpp.
typedef super::mapPtr_Type mapPtr_Type |
Definition at line 70 of file NavierStokesOperator.hpp.
typedef super::operator_Type operator_Type |
Definition at line 71 of file NavierStokesOperator.hpp.
Definition at line 72 of file NavierStokesOperator.hpp.
typedef super::vector_Type vector_Type |
Definition at line 73 of file NavierStokesOperator.hpp.
typedef super::vectorPtr_Type vectorPtr_Type |
Definition at line 74 of file NavierStokesOperator.hpp.
typedef boost::numeric::ublas::matrix<operatorPtr_Type> operatorPtrContainer_Type |
Definition at line 76 of file NavierStokesOperator.hpp.
typedef std::vector<vectorPtr_Type> vectorPtrContainer_Type |
Definition at line 77 of file NavierStokesOperator.hpp.
typedef std::vector<mapPtr_Type > mapPtrContainer_Type |
Definition at line 78 of file NavierStokesOperator.hpp.
Empty Constructor.
Definition at line 7 of file NavierStokesOperator.cpp.
void setUp | ( | const std::shared_ptr< BlockEpetra_Map > & | map, |
const commPtr_Type & | comm | ||
) |
SetUp for a "square operator".
domainMap | the 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. |
comm | the communicator. |
Definition at line 14 of file NavierStokesOperator.cpp.
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".
domainMap | the map of a vector in the domain of this is obtained by concatenating the block maps in domainMap. |
rangeMap | the map of a vector in the range of this is obtained by concatenating the block maps in rangeMap. |
comm | the communicator. |
Definition at line 27 of file NavierStokesOperator.cpp.
void setUp | ( | const operatorPtrContainer_Type & | blockOper, |
const commPtr_Type & | comm | ||
) |
SetUp when the operator is given like a std::matrix.
blockOper | a dense matrix to describe the block operator |
comm | the communicator |
Definition at line 44 of file NavierStokesOperator.cpp.
void setBlock | ( | UInt | iblock, |
UInt | jblock, | ||
const operatorPtr_Type & | operBlock | ||
) |
set a component of the block operator
iblock,jblock | The position of the block is (iblock, jblock). |
operBlock | : an operator_ptr representing the block |
Definition at line 82 of file NavierStokesOperator.cpp.
void fillComplete | ( | ) |
Complete the block matrix with null operators.
Definition at line 91 of file NavierStokesOperator.cpp.
|
virtual |
If true the transpose of the operator will be computed.
Implements LinearOperatorAlgebra.
Definition at line 108 of file NavierStokesOperator.cpp.
|
virtual |
Compute Y = Op*X;.
Implements LinearOperatorAlgebra.
Definition at line 123 of file NavierStokesOperator.cpp.
|
virtual |
Compute Y = Op;.
ApplyInverse is implemented for the matrices with block diagonal, lowerTriangular, upperTriangular form
Implements LinearOperatorAlgebra.
Definition at line 133 of file NavierStokesOperator.cpp.
|
inlinevirtual |
Compute the Inf norm of the operator.
Not implemented yet.
Implements LinearOperatorAlgebra.
Definition at line 146 of file NavierStokesOperator.hpp.
|
inlinevirtual |
Returns a character string describing the operator.
Implements LinearOperatorAlgebra.
Definition at line 149 of file NavierStokesOperator.hpp.
|
inlinevirtual |
Returns the current UseTranspose setting.
Implements LinearOperatorAlgebra.
Definition at line 152 of file NavierStokesOperator.hpp.
|
inlinevirtual |
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Implements LinearOperatorAlgebra.
Definition at line 155 of file NavierStokesOperator.hpp.
|
inlinevirtual |
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Implements LinearOperatorAlgebra.
Definition at line 158 of file NavierStokesOperator.hpp.
const NavierStokesOperator::operatorPtr_Type & block | ( | UInt | iblock, |
UInt | jblock | ||
) | const |
Returns a const pointer to the (i,j) block.
Definition at line 139 of file NavierStokesOperator.cpp.
|
inlinevirtual |
Returns the Epetra_Map object associated with the domain of this operator.
Implements LinearOperatorAlgebra.
Definition at line 164 of file NavierStokesOperator.hpp.
|
inline |
Returns the Epetra_Map object associated with the domain of this operator as a pointer.
Definition at line 166 of file NavierStokesOperator.hpp.
|
inline |
Definition at line 167 of file NavierStokesOperator.hpp.
|
inlinevirtual |
Returns the Epetra_Map object associated with the range of this operator.
Implements LinearOperatorAlgebra.
Definition at line 170 of file NavierStokesOperator.hpp.
|
inline |
Returns the Epetra_Map object associated with the range of this operator as a pointer.
Definition at line 172 of file NavierStokesOperator.hpp.
|
inline |
Definition at line 173 of file NavierStokesOperator.hpp.
|
protected |
Compute Y = Op*X;.
Definition at line 152 of file NavierStokesOperator.cpp.
|
protected |
Compute Y = Op'*X;.
Definition at line 176 of file NavierStokesOperator.cpp.
|
protected |
Y = diag(block(i,i)^-1)*X.
|
protected |
Y = backwardsubstitution(X)
|
protected |
Y = forwardsubstitution(X)
|
inlineprotected |
Change the name of the operator, (available for derivate classes).
Definition at line 187 of file NavierStokesOperator.hpp.
|
private |
Number of blocks in each row.
Definition at line 191 of file NavierStokesOperator.hpp.
|
private |
Number of blocks in each column.
Definition at line 193 of file NavierStokesOperator.hpp.
|
private |
Name of the object.
Definition at line 196 of file NavierStokesOperator.hpp.
|
private |
Communicator.
Definition at line 198 of file NavierStokesOperator.hpp.
|
private |
Domain Map.
Definition at line 203 of file NavierStokesOperator.hpp.
|
private |
Range Map.
Definition at line 205 of file NavierStokesOperator.hpp.
|
private |
block operator represented like a dense matrix of pointers to Operators
Definition at line 209 of file NavierStokesOperator.hpp.
|
private |
whenever transpose should be used
Definition at line 212 of file NavierStokesOperator.hpp.