LifeV
LumpedOperator Class Reference

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>

+ Inheritance diagram for LumpedOperator:
+ Collaboration diagram for LumpedOperator:

Public Types

typedef Epetra_CrsMatrix rowMatrix_Type
 
typedef boost::shared_ptr< rowMatrix_TyperowMatrixPtr_Type
 
typedef Epetra_Vector lumpedMatrix_Type
 
typedef boost::shared_ptr< lumpedMatrix_TypelumpedMatrixPtr_Type
 
- 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
 

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_TypeComm () const
 return the communicator More...
 
const map_TypeOperatorDomainMap () const
 return the domain map More...
 
const map_TypeOperatorRangeMap () const
 return the range map More...
 
const lumpedMatrix_TypegetLumpedVector ()
 return the lumped mass in vectorial form. More...
 
const lumpedMatrixPtr_TypegetLumpedVector_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...
 

Detailed Description

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.

Member Typedef Documentation

◆ rowMatrix_Type

typedef Epetra_CrsMatrix rowMatrix_Type

Definition at line 41 of file LumpedOperator.hpp.

◆ rowMatrixPtr_Type

typedef boost::shared_ptr<rowMatrix_Type> rowMatrixPtr_Type

Definition at line 42 of file LumpedOperator.hpp.

◆ lumpedMatrix_Type

typedef Epetra_Vector lumpedMatrix_Type

Definition at line 43 of file LumpedOperator.hpp.

◆ lumpedMatrixPtr_Type

typedef boost::shared_ptr<lumpedMatrix_Type> lumpedMatrixPtr_Type

Definition at line 44 of file LumpedOperator.hpp.

Constructor & Destructor Documentation

◆ LumpedOperator()

Constructor.

Definition at line 14 of file LumpedOperator.cpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ setUp()

void setUp ( const rowMatrixPtr_Type _matrix)

SetUp.

Definition at line 23 of file LumpedOperator.cpp.

◆ setAlpha()

void setAlpha ( const Real _alpha)
inline

set the scaling constant when applying the operator

Definition at line 51 of file LumpedOperator.hpp.

◆ compute()

int compute ( )

compute the lumpded operator

Definition at line 30 of file LumpedOperator.cpp.

◆ SetUseTranspose()

int SetUseTranspose ( bool  UseTranspose)
inlinevirtual

if true apply the traspose of the operator

Implements LinearOperatorAlgebra.

Definition at line 56 of file LumpedOperator.hpp.

◆ Apply()

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

Apply the Operator.

Implements LinearOperatorAlgebra.

Definition at line 46 of file LumpedOperator.cpp.

◆ ApplyInverse()

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

Apply the inverse of the operator.

Implements LinearOperatorAlgebra.

Definition at line 55 of file LumpedOperator.cpp.

◆ NormInf()

double NormInf ( ) const
inlinevirtual

return the infinity norm of the operator

Implements LinearOperatorAlgebra.

Definition at line 62 of file LumpedOperator.hpp.

◆ Label()

const char* Label ( ) const
inlinevirtual

return the name of the operator

Implements LinearOperatorAlgebra.

Definition at line 65 of file LumpedOperator.hpp.

◆ UseTranspose()

bool UseTranspose ( ) const
inlinevirtual

return true if we are using the transpose

Implements LinearOperatorAlgebra.

Definition at line 67 of file LumpedOperator.hpp.

◆ HasNormInf()

bool HasNormInf ( ) const
inlinevirtual

return true if the operator has the norm inf.

Implements LinearOperatorAlgebra.

Definition at line 69 of file LumpedOperator.hpp.

◆ Comm()

const comm_Type& Comm ( ) const
inlinevirtual

return the communicator

Implements LinearOperatorAlgebra.

Definition at line 71 of file LumpedOperator.hpp.

◆ OperatorDomainMap()

const map_Type& OperatorDomainMap ( ) const
inlinevirtual

return the domain map

Implements LinearOperatorAlgebra.

Definition at line 73 of file LumpedOperator.hpp.

◆ OperatorRangeMap()

const map_Type& OperatorRangeMap ( ) const
inlinevirtual

return the range map

Implements LinearOperatorAlgebra.

Definition at line 75 of file LumpedOperator.hpp.

◆ getLumpedVector()

const lumpedMatrix_Type& getLumpedVector ( )
inline

return the lumped mass in vectorial form.

Definition at line 77 of file LumpedOperator.hpp.

◆ getLumpedVector_ptr()

const lumpedMatrixPtr_Type& getLumpedVector_ptr ( )
inline

return the lumped mass in vectorial form (pointer).

Definition at line 79 of file LumpedOperator.hpp.

Field Documentation

◆ M_name

std::string M_name
private

the name of the operator

Definition at line 83 of file LumpedOperator.hpp.

◆ M_matrix

rowMatrixPtr_Type M_matrix
private

the matrix to be lumped

Definition at line 85 of file LumpedOperator.hpp.

◆ M_lumped

lumpedMatrixPtr_Type M_lumped
private

the lumped matrix in vectorial form

Definition at line 87 of file LumpedOperator.hpp.

◆ M_normInf

Real M_normInf
private

the infinity norm of the operator

Definition at line 89 of file LumpedOperator.hpp.

◆ M_useTranspose

bool M_useTranspose
private

whenever to use the transpose

Definition at line 91 of file LumpedOperator.hpp.

◆ M_alpha

Real M_alpha
private

the scalar coefficient for scaling the operator

Definition at line 93 of file LumpedOperator.hpp.


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