MFEM v4.8.0
Finite element discretization library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mfem::MatrixArrayVectorCoefficient Class Reference

Matrix coefficient defined row-wise by an array of vector coefficients. Rows that are not set will evaluate to zero. The matrix coefficient is stored as an array indexing the rows of the matrix. More...

#include <coefficient.hpp>

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

Public Member Functions

 MatrixArrayVectorCoefficient (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) override
 Set the time for internally stored coefficients.
 
VectorCoefficientGetCoeff (int i)
 Get the vector coefficient located at the i-th row of the matrix.
 
void Set (int i, VectorCoefficient *c, bool own=true)
 Set the coefficient located at the i-th row of the matrix. By this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter.
 
void SetOwnership (int i, bool own)
 Set ownership of the i'th coefficient.
 
bool GetOwnership (int i) const
 Get ownership of the i'th coefficient.
 
void Eval (int i, Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
 
void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip) override
 Evaluate the matrix coefficient ip.
 
virtual ~MatrixArrayVectorCoefficient ()
 
- 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 row-wise by an array of vector coefficients. Rows that are not set will evaluate to zero. The matrix coefficient is stored as an array indexing the rows of the matrix.

Definition at line 1353 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ MatrixArrayVectorCoefficient()

mfem::MatrixArrayVectorCoefficient::MatrixArrayVectorCoefficient ( int dim)
explicit

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

Definition at line 927 of file coefficient.cpp.

◆ ~MatrixArrayVectorCoefficient()

mfem::MatrixArrayVectorCoefficient::~MatrixArrayVectorCoefficient ( )
virtual

Definition at line 958 of file coefficient.cpp.

Member Function Documentation

◆ Eval() [1/2]

void mfem::MatrixArrayVectorCoefficient::Eval ( DenseMatrix & K,
ElementTransformation & T,
const IntegrationPoint & ip )
overridevirtual

Evaluate the matrix coefficient ip.

Implements mfem::MatrixCoefficient.

Definition at line 983 of file coefficient.cpp.

◆ Eval() [2/2]

void mfem::MatrixArrayVectorCoefficient::Eval ( int i,
Vector & V,
ElementTransformation & T,
const IntegrationPoint & ip )

Evaluate coefficient located at the i-th row of the matrix using integration point ip.

Definition at line 966 of file coefficient.cpp.

◆ GetCoeff()

VectorCoefficient * mfem::MatrixArrayVectorCoefficient::GetCoeff ( int i)
inline

Get the vector coefficient located at the i-th row of the matrix.

Definition at line 1368 of file coefficient.hpp.

◆ GetOwnership()

bool mfem::MatrixArrayVectorCoefficient::GetOwnership ( int i) const
inline

Get ownership of the i'th coefficient.

Definition at line 1379 of file coefficient.hpp.

◆ Set()

void mfem::MatrixArrayVectorCoefficient::Set ( int i,
VectorCoefficient * c,
bool own = true )

Set the coefficient located at the i-th row of the matrix. By this will take ownership of the Coefficient passed in, but this can be overridden with the own parameter.

Definition at line 948 of file coefficient.cpp.

◆ SetOwnership()

void mfem::MatrixArrayVectorCoefficient::SetOwnership ( int i,
bool own )
inline

Set ownership of the i'th coefficient.

Definition at line 1376 of file coefficient.hpp.

◆ SetTime()

void mfem::MatrixArrayVectorCoefficient::SetTime ( real_t t)
overridevirtual

Set the time for internally stored coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 939 of file coefficient.cpp.


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