MFEM  v4.5.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
mfem::VectorCoefficient Class Referenceabstract

Base class for vector Coefficients that optionally depend on time and space. More...

#include <coefficient.hpp>

Inheritance diagram for mfem::VectorCoefficient:
[legend]

Public Member Functions

 VectorCoefficient (int vd)
 Initialize the VectorCoefficient with vector dimension vd. More...
 
virtual void SetTime (double t)
 Set the time for time dependent coefficients. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
int GetVDim ()
 Returns dimension of the vector. More...
 
virtual void Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
 Evaluate the vector coefficient in the element described by T at the point ip, storing the result in V. 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 void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. More...
 
virtual ~VectorCoefficient ()
 

Protected Attributes

int vdim
 
double time
 

Detailed Description

Base class for vector Coefficients that optionally depend on time and space.

Definition at line 448 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::VectorCoefficient::VectorCoefficient ( int  vd)
inline

Initialize the VectorCoefficient with vector dimension vd.

Definition at line 456 of file coefficient.hpp.

virtual mfem::VectorCoefficient::~VectorCoefficient ( )
inlinevirtual

Definition at line 497 of file coefficient.hpp.

Member Function Documentation

virtual void mfem::VectorCoefficient::Eval ( Vector V,
ElementTransformation T,
const IntegrationPoint ip 
)
pure virtual
void mfem::VectorCoefficient::Eval ( DenseMatrix M,
ElementTransformation T,
const IntegrationRule ir 
)
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.

Note
The IntegrationPoint associated with T is not used, and this method will generally modify this IntegrationPoint associated with T.

Reimplemented in mfem::VectorRestrictedCoefficient, mfem::GradientGridFunctionCoefficient, and mfem::VectorGridFunctionCoefficient.

Definition at line 222 of file coefficient.cpp.

double mfem::VectorCoefficient::GetTime ( )
inline

Get the time for time dependent coefficients.

Definition at line 462 of file coefficient.hpp.

int mfem::VectorCoefficient::GetVDim ( )
inline

Returns dimension of the vector.

Definition at line 465 of file coefficient.hpp.

void mfem::VectorCoefficient::Project ( QuadratureFunction qf)
virtual

Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points.

The vdim of the VectorCoefficient should be equal to the vdim of the QuadratureFunction.

Reimplemented in mfem::VectorQuadratureFunctionCoefficient, and mfem::VectorGridFunctionCoefficient.

Definition at line 236 of file coefficient.cpp.

virtual void mfem::VectorCoefficient::SetTime ( double  t)
inlinevirtual

Member Data Documentation

double mfem::VectorCoefficient::time
protected

Definition at line 452 of file coefficient.hpp.

int mfem::VectorCoefficient::vdim
protected

Definition at line 451 of file coefficient.hpp.


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