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

A piecewise matrix-valued coefficient with the pieces keyed off the element attribute numbers. More...

#include <coefficient.hpp>

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

Public Member Functions

 PWMatrixCoefficient (int dim, bool symm=false)
 Constructs a piecewise matrix coefficient of dimension dim by dim. More...
 
 PWMatrixCoefficient (int h, int w, bool symm=false)
 Constructs a piecewise matrix coefficient of dimension h by w. More...
 
 PWMatrixCoefficient (int dim, const Array< int > &attr, const Array< MatrixCoefficient *> &coefs, bool symm=false)
 Construct the coefficient using arrays describing the pieces. More...
 
 PWMatrixCoefficient (int h, int w, const Array< int > &attr, const Array< MatrixCoefficient *> &coefs, bool symm=false)
 Construct the coefficient using arrays describing the pieces. More...
 
virtual void SetTime (double t)
 Set the time for time dependent coefficients. More...
 
void UpdateCoefficients (const Array< int > &attr, const Array< MatrixCoefficient *> &coefs)
 Replace a set of coefficients. More...
 
void UpdateCoefficient (int attr, MatrixCoefficient &coef)
 Replace a single coefficient for a particular attribute. More...
 
void ZeroCoefficient (int attr)
 Remove a single MatrixCoefficient for a particular attribute. More...
 
virtual void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient. More...
 
- 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 void EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
 (DEPRECATED) Evaluate a symmetric matrix coefficient. More...
 
virtual ~MatrixCoefficient ()
 

Additional Inherited Members

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

Detailed Description

A piecewise matrix-valued coefficient with the pieces keyed off the element attribute numbers.

A value of zero will be returned for any missing attribute numbers.

This object will not assume ownership of any MatrixCoefficient objects passed to it. Consequently, the caller must ensure that the individual MatrixCoefficient objects are not deleted while this PWMatrixCoefficient is still in use.

Note
The keys may either be domain attribute numbers or boundary attribute numbers. If the PWMatrixCoefficient is used with a domain integrator the keys are assumed to be domain attribute numbers. Similarly, if the PWMatrixCoefficient is used with a boundary integrator the keys are assumed to be boundary attribute numbers.

Definition at line 1140 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ PWMatrixCoefficient() [1/4]

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

Constructs a piecewise matrix coefficient of dimension dim by dim.

Definition at line 1169 of file coefficient.hpp.

◆ PWMatrixCoefficient() [2/4]

mfem::PWMatrixCoefficient::PWMatrixCoefficient ( int  h,
int  w,
bool  symm = false 
)
inlineexplicit

Constructs a piecewise matrix coefficient of dimension h by w.

Definition at line 1173 of file coefficient.hpp.

◆ PWMatrixCoefficient() [3/4]

mfem::PWMatrixCoefficient::PWMatrixCoefficient ( int  dim,
const Array< int > &  attr,
const Array< MatrixCoefficient *> &  coefs,
bool  symm = false 
)
inline

Construct the coefficient using arrays describing the pieces.

Parameters
dim- size of the square matrix-valued result
attr- an array of attribute numbers for each piece
coefs- the corresponding array of MatrixCoefficient pointers
symm- true if the result will be symmetric, false otherwise Any missing attributes or NULL coefficient pointers will result in a zero matrix being returned.
Note
Ownership of the MatrixCoefficient objects will NOT be transferred to this object.

Definition at line 1187 of file coefficient.hpp.

◆ PWMatrixCoefficient() [4/4]

mfem::PWMatrixCoefficient::PWMatrixCoefficient ( int  h,
int  w,
const Array< int > &  attr,
const Array< MatrixCoefficient *> &  coefs,
bool  symm = false 
)
inline

Construct the coefficient using arrays describing the pieces.

Parameters
h- height of the matrix-valued result
w- width of the matrix-valued result
attr- an array of attribute numbers for each piece
coefs- the corresponding array of MatrixCoefficient pointers
symm- true if the result will be symmetric, false otherwise Any missing attributes or NULL coefficient pointers will result in a zero matrix being returned for that attribute.
Note
Ownership of the MatrixCoefficient objects will NOT be transferred to this object.

Definition at line 1204 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

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

Evaluate the coefficient.

Implements mfem::MatrixCoefficient.

Definition at line 699 of file coefficient.cpp.

◆ SetTime()

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

Set the time for time dependent coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 685 of file coefficient.cpp.

◆ UpdateCoefficient()

void mfem::PWMatrixCoefficient::UpdateCoefficient ( int  attr,
MatrixCoefficient coef 
)

Replace a single coefficient for a particular attribute.

Definition at line 668 of file coefficient.cpp.

◆ UpdateCoefficients()

void mfem::PWMatrixCoefficient::UpdateCoefficients ( const Array< int > &  attr,
const Array< MatrixCoefficient *> &  coefs 
)
inline

Replace a set of coefficients.

Definition at line 1213 of file coefficient.hpp.

◆ ZeroCoefficient()

void mfem::PWMatrixCoefficient::ZeroCoefficient ( int  attr)
inline

Remove a single MatrixCoefficient for a particular attribute.

Definition at line 1221 of file coefficient.hpp.


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