MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::MatrixArrayCoefficient Class Reference

Matrix coefficient defined by a matrix of scalar coefficients. Coefficients that are not set will evaluate to zero in the vector. The coefficient is stored as a flat Array with indexing (i,j) -> i*width+j. More...

#include <coefficient.hpp>

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

Public Member Functions

 MatrixArrayCoefficient (int dim)
 Construct a coefficient matrix of dimensions dim * dim. The actual coefficients still need to be added with Set().
 
void SetTime (real_t t)
 Set the time for internally stored coefficients.
 
CoefficientGetCoeff (int i, int j)
 Get the coefficient located at (i,j) in the matrix.
 
void Set (int i, int j, Coefficient *c, bool own=true)
 Set the coefficient located at (i,j) in the matrix. By default by default this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter.
 
real_t Eval (int i, int j, ElementTransformation &T, const IntegrationPoint &ip)
 
virtual void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the matrix coefficient ip.
 
virtual ~MatrixArrayCoefficient ()
 
- Public Member Functions inherited from mfem::MatrixCoefficient
 MatrixCoefficient (int dim, bool symm=false)
 Construct a dim x dim matrix coefficient.
 
 MatrixCoefficient (int h, int w, bool symm=false)
 Construct a h x w matrix coefficient.
 
real_t GetTime ()
 Get the time for time dependent coefficients.
 
int GetHeight () const
 Get the height of the matrix.
 
int GetWidth () const
 Get the width of the matrix.
 
int GetVDim () const
 For backward compatibility get the width of the matrix.
 
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.
 
virtual void EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
 (DEPRECATED) Evaluate a symmetric matrix coefficient.
 
virtual ~MatrixCoefficient ()
 

Additional Inherited Members

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

Detailed Description

Matrix coefficient defined by a matrix of scalar coefficients. Coefficients that are not set will evaluate to zero in the vector. The coefficient is stored as a flat Array with indexing (i,j) -> i*width+j.

Definition at line 1301 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ MatrixArrayCoefficient()

mfem::MatrixArrayCoefficient::MatrixArrayCoefficient ( int dim)
explicit

Construct a coefficient matrix of dimensions dim * dim. The actual coefficients still need to be added with Set().

Definition at line 878 of file coefficient.cpp.

◆ ~MatrixArrayCoefficient()

mfem::MatrixArrayCoefficient::~MatrixArrayCoefficient ( )
virtual

Definition at line 906 of file coefficient.cpp.

Member Function Documentation

◆ Eval() [1/2]

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

Evaluate the matrix coefficient ip.

Implements mfem::MatrixCoefficient.

Definition at line 914 of file coefficient.cpp.

◆ Eval() [2/2]

real_t mfem::MatrixArrayCoefficient::Eval ( int i,
int j,
ElementTransformation & T,
const IntegrationPoint & ip )
inline

Evaluate coefficient located at (i,j) in the matrix using integration point ip.

Definition at line 1327 of file coefficient.hpp.

◆ GetCoeff()

Coefficient * mfem::MatrixArrayCoefficient::GetCoeff ( int i,
int j )
inline

Get the coefficient located at (i,j) in the matrix.

Definition at line 1316 of file coefficient.hpp.

◆ Set()

void mfem::MatrixArrayCoefficient::Set ( int i,
int j,
Coefficient * c,
bool own = true )

Set the coefficient located at (i,j) in the matrix. By default by default this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter.

Definition at line 899 of file coefficient.cpp.

◆ SetTime()

void mfem::MatrixArrayCoefficient::SetTime ( real_t t)
virtual

Set the time for internally stored coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 890 of file coefficient.cpp.


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