MFEM  v4.5.2
Finite element discretization library
Public Member Functions | List of all members
mfem::MatrixFunctionCoefficient Class Reference

A matrix coefficient with an optional scalar coefficient multiplier q. The matrix function can either be represented by a std function or a constant matrix provided when constructing this object. More...

#include <coefficient.hpp>

Inheritance diagram for mfem::MatrixFunctionCoefficient:
[legend]
Collaboration diagram for mfem::MatrixFunctionCoefficient:
[legend]

Public Member Functions

 MatrixFunctionCoefficient (int dim, std::function< void(const Vector &, DenseMatrix &)> F, Coefficient *q=nullptr)
 Define a time-independent square matrix coefficient from a std function. More...
 
 MatrixFunctionCoefficient (const DenseMatrix &m, Coefficient &q)
 Define a constant matrix coefficient times a scalar Coefficient. More...
 
 MatrixFunctionCoefficient (int dim, std::function< void(const Vector &, Vector &)> SymmF, Coefficient *q=NULL)
 Define a time-independent symmetric square matrix coefficient from a std function. More...
 
 MatrixFunctionCoefficient (int dim, std::function< void(const Vector &, double, DenseMatrix &)> TDF, Coefficient *q=nullptr)
 Define a time-dependent square matrix coefficient from a std function. More...
 
void SetTime (double t)
 Set the time for internally stored coefficients. More...
 
virtual void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the matrix coefficient at ip. More...
 
virtual void EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
 (DEPRECATED) Evaluate the symmetric matrix coefficient at ip. More...
 
virtual ~MatrixFunctionCoefficient ()
 
- Public Member Functions inherited from mfem::MatrixCoefficient
 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...
 
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 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 ~MatrixCoefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::MatrixCoefficient
int height
 
int width
 
double time
 
bool symmetric
 

Detailed Description

A matrix coefficient with an optional scalar coefficient multiplier q. The matrix function can either be represented by a std function or a constant matrix provided when constructing this object.

Definition at line 1098 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ MatrixFunctionCoefficient() [1/4]

mfem::MatrixFunctionCoefficient::MatrixFunctionCoefficient ( int  dim,
std::function< void(const Vector &, DenseMatrix &)>  F,
Coefficient q = nullptr 
)
inline

Define a time-independent square matrix coefficient from a std function.

Parameters
dim- the size of the matrix
F- time-independent function
q- optional scalar Coefficient to scale the matrix coefficient

Definition at line 1113 of file coefficient.hpp.

◆ MatrixFunctionCoefficient() [2/4]

mfem::MatrixFunctionCoefficient::MatrixFunctionCoefficient ( const DenseMatrix m,
Coefficient q 
)
inline

Define a constant matrix coefficient times a scalar Coefficient.

Parameters
m- constant matrix
q- optional scalar Coefficient to scale the matrix coefficient

Definition at line 1122 of file coefficient.hpp.

◆ MatrixFunctionCoefficient() [3/4]

mfem::MatrixFunctionCoefficient::MatrixFunctionCoefficient ( int  dim,
std::function< void(const Vector &, Vector &)>  SymmF,
Coefficient q = NULL 
)
inline

Define a time-independent symmetric square matrix coefficient from a std function.

Parameters
dim- the size of the matrix
SymmF- function used in EvalSymmetric
q- optional scalar Coefficient to scale the matrix coefficient
Deprecated:
Use another constructor without setting SymmFunction.

Definition at line 1132 of file coefficient.hpp.

◆ MatrixFunctionCoefficient() [4/4]

mfem::MatrixFunctionCoefficient::MatrixFunctionCoefficient ( int  dim,
std::function< void(const Vector &, double, DenseMatrix &)>  TDF,
Coefficient q = nullptr 
)
inline

Define a time-dependent square matrix coefficient from a std function.

Parameters
dim- the size of the matrix
TDF- time-dependent function
q- optional scalar Coefficient to scale the matrix coefficient

Definition at line 1142 of file coefficient.hpp.

◆ ~MatrixFunctionCoefficient()

virtual mfem::MatrixFunctionCoefficient::~MatrixFunctionCoefficient ( )
inlinevirtual

Definition at line 1160 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

void mfem::MatrixFunctionCoefficient::Eval ( DenseMatrix K,
ElementTransformation T,
const IntegrationPoint ip 
)
virtual

Evaluate the matrix coefficient at ip.

Implements mfem::MatrixCoefficient.

Definition at line 673 of file coefficient.cpp.

◆ EvalSymmetric()

void mfem::MatrixFunctionCoefficient::EvalSymmetric ( Vector K,
ElementTransformation T,
const IntegrationPoint ip 
)
virtual

(DEPRECATED) Evaluate the symmetric matrix coefficient at ip.

Deprecated:
Use Eval() instead.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 728 of file coefficient.cpp.

◆ SetTime()

void mfem::MatrixFunctionCoefficient::SetTime ( double  t)
virtual

Set the time for internally stored coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 667 of file coefficient.cpp.


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