MFEM  v4.4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::PWVectorCoefficient Class Reference

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

#include <coefficient.hpp>

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

Public Member Functions

 PWVectorCoefficient (int vd)
 Constructs a piecewise vector coefficient of dimension vd. More...
 
 PWVectorCoefficient (int vd, const Array< int > &attr, const Array< VectorCoefficient * > &coefs)
 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< VectorCoefficient * > &coefs)
 Replace a set of coefficients. More...
 
void UpdateCoefficient (int attr, VectorCoefficient &coef)
 Replace a single Coefficient for a particular attribute. More...
 
void ZeroCoefficient (int attr)
 Remove a single VectorCoefficient for a particular attribute. More...
 
virtual void Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient. More...
 
- Public Member Functions inherited from mfem::VectorCoefficient
 VectorCoefficient (int vd)
 Initialize the VectorCoefficient with vector dimension vd. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
int GetVDim ()
 Returns dimension of the vector. More...
 
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. More...
 
virtual ~VectorCoefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::VectorCoefficient
int vdim
 
double time
 

Detailed Description

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.

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

Definition at line 514 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::PWVectorCoefficient::PWVectorCoefficient ( int  vd)
inlineexplicit

Constructs a piecewise vector coefficient of dimension vd.

Definition at line 543 of file coefficient.hpp.

mfem::PWVectorCoefficient::PWVectorCoefficient ( int  vd,
const Array< int > &  attr,
const Array< VectorCoefficient * > &  coefs 
)
inline

Construct the coefficient using arrays describing the pieces.

Parameters
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.
Note
Ownership of the VectorCoefficient objects will NOT be transferred to this object.

Definition at line 555 of file coefficient.hpp.

Member Function Documentation

void mfem::PWVectorCoefficient::Eval ( Vector V,
ElementTransformation T,
const IntegrationPoint ip 
)
virtual

Evaluate the coefficient.

Implements mfem::VectorCoefficient.

Definition at line 245 of file coefficient.cpp.

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

Set the time for time dependent coefficients.

Reimplemented from mfem::VectorCoefficient.

Definition at line 231 of file coefficient.cpp.

void mfem::PWVectorCoefficient::UpdateCoefficient ( int  attr,
VectorCoefficient coef 
)

Replace a single Coefficient for a particular attribute.

Definition at line 223 of file coefficient.cpp.

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

Replace a set of coefficients.

Definition at line 563 of file coefficient.hpp.

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

Remove a single VectorCoefficient for a particular attribute.

Definition at line 571 of file coefficient.hpp.


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