MFEM  v4.5.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
mfem::MatrixCoefficient Class Referenceabstract

Base class for Matrix Coefficients that optionally depend on time and space. More...

#include <coefficient.hpp>

Inheritance diagram for mfem::MatrixCoefficient:
[legend]

Public Member Functions

 MatrixCoefficient (int dim, bool symm=false)
 Construct a dim x dim matrix coefficient. More...
 
 MatrixCoefficient (int h, int w, bool symm=false)
 Construct a h x w matrix coefficient. More...
 
virtual void SetTime (double t)
 Set the time for time dependent coefficients. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
int GetHeight () const
 Get the height of the matrix. More...
 
int GetWidth () const
 Get the width of the matrix. More...
 
int GetVDim () const
 For backward compatibility get the width of the matrix. More...
 
bool IsSymmetric () const
 
virtual void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)=0
 Evaluate the matrix coefficient in the element described by T at the point ip, storing the result in K. More...
 
virtual void Project (QuadratureFunction &qf, bool transpose=false)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. The matrix will be transposed or not according to the boolean argument transpose. More...
 
virtual void EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
 (DEPRECATED) Evaluate a symmetric matrix coefficient. More...
 
virtual ~MatrixCoefficient ()
 

Protected Attributes

int height
 
int width
 
double time
 
bool symmetric
 

Detailed Description

Base class for Matrix Coefficients that optionally depend on time and space.

Definition at line 906 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::MatrixCoefficient::MatrixCoefficient ( int  dim,
bool  symm = false 
)
inlineexplicit

Construct a dim x dim matrix coefficient.

Definition at line 915 of file coefficient.hpp.

mfem::MatrixCoefficient::MatrixCoefficient ( int  h,
int  w,
bool  symm = false 
)
inline

Construct a h x w matrix coefficient.

Definition at line 919 of file coefficient.hpp.

virtual mfem::MatrixCoefficient::~MatrixCoefficient ( )
inlinevirtual

Definition at line 967 of file coefficient.hpp.

Member Function Documentation

virtual void mfem::MatrixCoefficient::Eval ( DenseMatrix K,
ElementTransformation T,
const IntegrationPoint ip 
)
pure virtual
virtual void mfem::MatrixCoefficient::EvalSymmetric ( Vector K,
ElementTransformation T,
const IntegrationPoint ip 
)
inlinevirtual

(DEPRECATED) Evaluate a symmetric matrix coefficient.

Evaluate the upper triangular entries of the matrix coefficient in the symmetric case, similarly to Eval. Matrix entry (i,j) is stored in K[j - i + os_i] for 0 <= i <= j < width, os_0 = 0, os_{i+1} = os_i + width - i. That is, K = {M(0,0), ..., M(0,w-1), M(1,1), ..., M(1,w-1), ..., M(w-1,w-1) with w = width.

Deprecated:
Use Eval() instead.

Reimplemented in mfem::MatrixFunctionCoefficient.

Definition at line 963 of file coefficient.hpp.

int mfem::MatrixCoefficient::GetHeight ( ) const
inline

Get the height of the matrix.

Definition at line 929 of file coefficient.hpp.

double mfem::MatrixCoefficient::GetTime ( )
inline

Get the time for time dependent coefficients.

Definition at line 926 of file coefficient.hpp.

int mfem::MatrixCoefficient::GetVDim ( ) const
inline

For backward compatibility get the width of the matrix.

Definition at line 935 of file coefficient.hpp.

int mfem::MatrixCoefficient::GetWidth ( ) const
inline

Get the width of the matrix.

Definition at line 932 of file coefficient.hpp.

bool mfem::MatrixCoefficient::IsSymmetric ( ) const
inline
Deprecated:
Use SymmetricMatrixCoefficient instead

Definition at line 938 of file coefficient.hpp.

void mfem::MatrixCoefficient::Project ( QuadratureFunction qf,
bool  transpose = false 
)
virtual

Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. The matrix will be transposed or not according to the boolean argument transpose.

The vdim of the QuadratureFunction should be equal to the height times the width of the matrix.

Definition at line 578 of file coefficient.cpp.

virtual void mfem::MatrixCoefficient::SetTime ( double  t)
inlinevirtual

Member Data Documentation

int mfem::MatrixCoefficient::height
protected

Definition at line 909 of file coefficient.hpp.

bool mfem::MatrixCoefficient::symmetric
protected

Definition at line 911 of file coefficient.hpp.

double mfem::MatrixCoefficient::time
protected

Definition at line 910 of file coefficient.hpp.

int mfem::MatrixCoefficient::width
protected

Definition at line 909 of file coefficient.hpp.


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