LifeV
|
A class for Mass Lumping The lumped mass matrix is such that (1) The total mass is conserved (2) {M}_{i,i} is proportional to M_{i,i}. More...
#include <LumpedOperator.hpp>
Public Types | |
typedef Epetra_CrsMatrix | rowMatrix_Type |
typedef boost::shared_ptr< rowMatrix_Type > | rowMatrixPtr_Type |
typedef Epetra_Vector | lumpedMatrix_Type |
typedef boost::shared_ptr< lumpedMatrix_Type > | lumpedMatrixPtr_Type |
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 |
Public Member Functions | |
LumpedOperator () | |
Constructor. More... | |
void | setUp (const rowMatrixPtr_Type &_matrix) |
SetUp. More... | |
void | setAlpha (const Real &_alpha) |
set the scaling constant when applying the operator More... | |
int | compute () |
compute the lumpded operator More... | |
int | SetUseTranspose (bool UseTranspose) |
if true apply the traspose of the operator More... | |
int | Apply (const vector_Type &X, vector_Type &Y) const |
Apply the Operator. More... | |
int | ApplyInverse (const vector_Type &X, vector_Type &Y) const |
Apply the inverse of the operator. More... | |
double | NormInf () const |
return the infinity norm of the operator More... | |
const char * | Label () const |
return the name of the operator More... | |
bool | UseTranspose () const |
return true if we are using the transpose More... | |
bool | HasNormInf () const |
return true if the operator has the norm inf. More... | |
const comm_Type & | Comm () const |
return the communicator More... | |
const map_Type & | OperatorDomainMap () const |
return the domain map More... | |
const map_Type & | OperatorRangeMap () const |
return the range map More... | |
const lumpedMatrix_Type & | getLumpedVector () |
return the lumped mass in vectorial form. More... | |
const lumpedMatrixPtr_Type & | getLumpedVector_ptr () |
return the lumped mass in vectorial form (pointer). 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 | |
std::string | M_name |
the name of the operator More... | |
rowMatrixPtr_Type | M_matrix |
the matrix to be lumped More... | |
lumpedMatrixPtr_Type | M_lumped |
the lumped matrix in vectorial form More... | |
Real | M_normInf |
the infinity norm of the operator More... | |
bool | M_useTranspose |
whenever to use the transpose More... | |
Real | M_alpha |
the scalar coefficient for scaling the operator More... | |
A class for Mass Lumping The lumped mass matrix is such that (1) The total mass is conserved (2) {M}_{i,i} is proportional to M_{i,i}.
The formula for the lumping is {M}_{i,i} = M_{i,i}* {{i,j} M_{i,j}}{{M_{i,i}}
In the case of P1 F.E. such lumping is in agreement with the one obtained using the Trapezoidal quadrature rule.
Definition at line 37 of file LumpedOperator.hpp.
typedef Epetra_CrsMatrix rowMatrix_Type |
Definition at line 41 of file LumpedOperator.hpp.
typedef boost::shared_ptr<rowMatrix_Type> rowMatrixPtr_Type |
Definition at line 42 of file LumpedOperator.hpp.
typedef Epetra_Vector lumpedMatrix_Type |
Definition at line 43 of file LumpedOperator.hpp.
typedef boost::shared_ptr<lumpedMatrix_Type> lumpedMatrixPtr_Type |
Definition at line 44 of file LumpedOperator.hpp.
LumpedOperator | ( | ) |
Constructor.
Definition at line 14 of file LumpedOperator.cpp.
void setUp | ( | const rowMatrixPtr_Type & | _matrix | ) |
SetUp.
Definition at line 23 of file LumpedOperator.cpp.
|
inline |
set the scaling constant when applying the operator
Definition at line 51 of file LumpedOperator.hpp.
int compute | ( | ) |
compute the lumpded operator
Definition at line 30 of file LumpedOperator.cpp.
|
inlinevirtual |
if true apply the traspose of the operator
Implements LinearOperatorAlgebra.
Definition at line 56 of file LumpedOperator.hpp.
|
virtual |
Apply the Operator.
Implements LinearOperatorAlgebra.
Definition at line 46 of file LumpedOperator.cpp.
|
virtual |
Apply the inverse of the operator.
Implements LinearOperatorAlgebra.
Definition at line 55 of file LumpedOperator.cpp.
|
inlinevirtual |
return the infinity norm of the operator
Implements LinearOperatorAlgebra.
Definition at line 62 of file LumpedOperator.hpp.
|
inlinevirtual |
return the name of the operator
Implements LinearOperatorAlgebra.
Definition at line 65 of file LumpedOperator.hpp.
|
inlinevirtual |
return true if we are using the transpose
Implements LinearOperatorAlgebra.
Definition at line 67 of file LumpedOperator.hpp.
|
inlinevirtual |
return true if the operator has the norm inf.
Implements LinearOperatorAlgebra.
Definition at line 69 of file LumpedOperator.hpp.
|
inlinevirtual |
return the communicator
Implements LinearOperatorAlgebra.
Definition at line 71 of file LumpedOperator.hpp.
|
inlinevirtual |
return the domain map
Implements LinearOperatorAlgebra.
Definition at line 73 of file LumpedOperator.hpp.
|
inlinevirtual |
return the range map
Implements LinearOperatorAlgebra.
Definition at line 75 of file LumpedOperator.hpp.
|
inline |
return the lumped mass in vectorial form.
Definition at line 77 of file LumpedOperator.hpp.
|
inline |
return the lumped mass in vectorial form (pointer).
Definition at line 79 of file LumpedOperator.hpp.
|
private |
the name of the operator
Definition at line 83 of file LumpedOperator.hpp.
|
private |
the matrix to be lumped
Definition at line 85 of file LumpedOperator.hpp.
|
private |
the lumped matrix in vectorial form
Definition at line 87 of file LumpedOperator.hpp.
|
private |
the infinity norm of the operator
Definition at line 89 of file LumpedOperator.hpp.
|
private |
whenever to use the transpose
Definition at line 91 of file LumpedOperator.hpp.
|
private |
the scalar coefficient for scaling the operator
Definition at line 93 of file LumpedOperator.hpp.