MFEM v4.7.0
Finite element discretization library
|
A piecewise coefficient with the pieces keyed off the element attribute numbers. More...
#include <coefficient.hpp>
Public Member Functions | |
PWCoefficient () | |
Constructs a piecewise coefficient. | |
PWCoefficient (const Array< int > &attr, const Array< Coefficient * > &coefs) | |
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< Coefficient * > &coefs) |
Replace a set of coefficients. | |
void | UpdateCoefficient (int attr, Coefficient &coef) |
Replace a single Coefficient for a particular attribute. | |
void | ZeroCoefficient (int attr) |
Remove a single Coefficient for a particular attribute. | |
virtual real_t | Eval (ElementTransformation &T, const IntegrationPoint &ip) |
Evaluate the coefficient. | |
Public Member Functions inherited from mfem::Coefficient | |
Coefficient () | |
real_t | GetTime () |
Get the time for time dependent coefficients. | |
real_t | Eval (ElementTransformation &T, const IntegrationPoint &ip, real_t t) |
Evaluate the coefficient in the element described by T at the point ip at time t. | |
virtual void | Project (QuadratureFunction &qf) |
Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. | |
virtual | ~Coefficient () |
Additional Inherited Members | |
Protected Attributes inherited from mfem::Coefficient | |
real_t | time |
A piecewise 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 Coefficient objects passed to it. Consequently, the caller must ensure that the individual Coefficient objects are not deleted while this PWCoefficient is still in use.
Definition at line 153 of file coefficient.hpp.
|
inlineexplicit |
Constructs a piecewise coefficient.
Definition at line 182 of file coefficient.hpp.
|
inline |
Construct the coefficient using arrays describing the pieces.
attr | - an array of attribute numbers for each piece |
coefs | - the corresponding array of Coefficient pointers Any missing attributes or NULL coefficient pointers will result in a value of zero being returned for that attribute. |
Definition at line 193 of file coefficient.hpp.
|
virtual |
Evaluate the coefficient.
Implements mfem::Coefficient.
Definition at line 114 of file coefficient.cpp.
|
virtual |
Set the time for time dependent coefficients.
Reimplemented from mfem::Coefficient.
Definition at line 100 of file coefficient.cpp.
|
inline |
Replace a single Coefficient for a particular attribute.
Definition at line 206 of file coefficient.hpp.
|
inline |
Replace a set of coefficients.
Definition at line 201 of file coefficient.hpp.
|
inline |
Remove a single Coefficient for a particular attribute.
Definition at line 210 of file coefficient.hpp.