MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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.
 
 PWMatrixCoefficient (int h, int w, bool symm=false)
 Constructs a piecewise matrix coefficient of dimension h by w.
 
 PWMatrixCoefficient (int dim, const Array< int > &attr, const Array< MatrixCoefficient * > &coefs, bool symm=false)
 Construct the coefficient using arrays describing the pieces.
 
 PWMatrixCoefficient (int h, int w, const Array< int > &attr, const Array< MatrixCoefficient * > &coefs, bool symm=false)
 Construct the coefficient using arrays describing the pieces.
 
virtual void SetTime (real_t t)
 Set the time for time dependent coefficients.
 
void UpdateCoefficients (const Array< int > &attr, const Array< MatrixCoefficient * > &coefs)
 Replace a set of coefficients.
 
void UpdateCoefficient (int attr, MatrixCoefficient &coef)
 Replace a single coefficient for a particular attribute.
 
void ZeroCoefficient (int attr)
 Remove a single MatrixCoefficient for a particular attribute.
 
virtual void Eval (DenseMatrix &K, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient.
 
- 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

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 ( real_t 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: