MFEM v4.7.0
Finite element discretization library
|
A piecewise vector-valued coefficient with the pieces keyed off the element attribute numbers. More...
#include <coefficient.hpp>
Public Member Functions | |
PWVectorCoefficient (int vd) | |
Constructs a piecewise vector coefficient of dimension vd. | |
PWVectorCoefficient (int vd, const Array< int > &attr, const Array< VectorCoefficient * > &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< VectorCoefficient * > &coefs) |
Replace a set of coefficients. | |
void | UpdateCoefficient (int attr, VectorCoefficient &coef) |
Replace a single Coefficient for a particular attribute. | |
void | ZeroCoefficient (int attr) |
Remove a single VectorCoefficient for a particular attribute. | |
virtual void | Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip) |
Evaluate the coefficient. | |
virtual void | Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationRule &ir) |
Evaluate the vector coefficient in the element described by T at all points of ir, storing the result in M. | |
Public Member Functions inherited from mfem::VectorCoefficient | |
VectorCoefficient (int vd) | |
Initialize the VectorCoefficient with vector dimension vd. | |
real_t | GetTime () |
Get the time for time dependent coefficients. | |
int | GetVDim () |
Returns dimension of the vector. | |
virtual void | Project (QuadratureFunction &qf) |
Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. | |
virtual | ~VectorCoefficient () |
Additional Inherited Members | |
Protected Attributes inherited from mfem::VectorCoefficient | |
int | vdim |
real_t | time |
A piecewise vector-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 VectorCoefficient objects passed to it. Consequently, the caller must ensure that the individual VectorCoefficient objects are not deleted while this PWVectorCoefficient is still in use.
Definition at line 655 of file coefficient.hpp.
|
inlineexplicit |
Constructs a piecewise vector coefficient of dimension vd.
Definition at line 684 of file coefficient.hpp.
|
inline |
Construct the coefficient using arrays describing the pieces.
vd | - dimension of the vector-valued result |
attr | - an array of attribute numbers for each piece |
coefs | - the corresponding array of VectorCoefficient pointers Any missing attributes or NULL coefficient pointers will result in a zero vector being returned for that attribute. |
Definition at line 696 of file coefficient.hpp.
|
virtual |
Evaluate the vector coefficient in the element described by T at all points of ir, storing the result in M.
The dimensions of M are GetVDim() by ir.GetNPoints() and they must be set by the implementation of this method.
The general implementation provided by the base class (using the Eval method for one IntegrationPoint at a time) can be overloaded for more efficient implementation.
Reimplemented from mfem::VectorCoefficient.
Definition at line 605 of file coefficient.cpp.
|
virtual |
Evaluate the coefficient.
Implements mfem::VectorCoefficient.
Definition at line 341 of file coefficient.cpp.
|
virtual |
Set the time for time dependent coefficients.
Reimplemented from mfem::VectorCoefficient.
Definition at line 327 of file coefficient.cpp.
void mfem::PWVectorCoefficient::UpdateCoefficient | ( | int | attr, |
VectorCoefficient & | coef ) |
Replace a single Coefficient for a particular attribute.
Definition at line 319 of file coefficient.cpp.
|
inline |
Replace a set of coefficients.
Definition at line 704 of file coefficient.hpp.
|
inline |
Remove a single VectorCoefficient for a particular attribute.
Definition at line 712 of file coefficient.hpp.