MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::VectorGridFunctionCoefficient Class Reference

Vector coefficient defined by a vector GridFunction. More...

#include <coefficient.hpp>

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

Public Member Functions

 VectorGridFunctionCoefficient ()
 Construct an empty coefficient. Calling Eval() before the grid function is set will cause a segfault.
 
 VectorGridFunctionCoefficient (const GridFunction *gf)
 Construct the coefficient with grid function gf. The grid function is not owned by the coefficient.
 
void SetGridFunction (const GridFunction *gf)
 Set the grid function for this coefficient. Also sets the Vector dimension to match that of the gf.
 
const GridFunctionGetGridFunction () const
 Returns a pointer to the grid function in this Coefficient.
 
virtual void Eval (Vector &V, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the vector coefficient at ip.
 
virtual void Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationRule &ir)
 Evaluate the vector coefficients at all of the locations in the integration rule and write the vectors into the columns of matrix M.
 
virtual void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points.
 
virtual ~VectorGridFunctionCoefficient ()
 
- Public Member Functions inherited from mfem::VectorCoefficient
 VectorCoefficient (int vd)
 Initialize the VectorCoefficient with vector dimension vd.
 
virtual void SetTime (real_t t)
 Set the time for time dependent coefficients.
 
real_t GetTime ()
 Get the time for time dependent coefficients.
 
int GetVDim ()
 Returns dimension of the vector.
 
virtual ~VectorCoefficient ()
 

Protected Attributes

const GridFunctionGridFunc
 
- Protected Attributes inherited from mfem::VectorCoefficient
int vdim
 
real_t time
 

Detailed Description

Vector coefficient defined by a vector GridFunction.

Definition at line 817 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ VectorGridFunctionCoefficient() [1/2]

mfem::VectorGridFunctionCoefficient::VectorGridFunctionCoefficient ( )
inline

Construct an empty coefficient. Calling Eval() before the grid function is set will cause a segfault.

Definition at line 825 of file coefficient.hpp.

◆ VectorGridFunctionCoefficient() [2/2]

mfem::VectorGridFunctionCoefficient::VectorGridFunctionCoefficient ( const GridFunction * gf)

Construct the coefficient with grid function gf. The grid function is not owned by the coefficient.

Definition at line 433 of file coefficient.cpp.

◆ ~VectorGridFunctionCoefficient()

virtual mfem::VectorGridFunctionCoefficient::~VectorGridFunctionCoefficient ( )
inlinevirtual

Definition at line 855 of file coefficient.hpp.

Member Function Documentation

◆ Eval() [1/2]

void mfem::VectorGridFunctionCoefficient::Eval ( DenseMatrix & M,
ElementTransformation & T,
const IntegrationRule & ir )
virtual

Evaluate the vector coefficients at all of the locations in the integration rule and write the vectors into the columns of matrix M.

Reimplemented from mfem::VectorCoefficient.

Definition at line 461 of file coefficient.cpp.

◆ Eval() [2/2]

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

Evaluate the vector coefficient at ip.

Implements mfem::VectorCoefficient.

Definition at line 445 of file coefficient.cpp.

◆ GetGridFunction()

const GridFunction * mfem::VectorGridFunctionCoefficient::GetGridFunction ( ) const
inline

Returns a pointer to the grid function in this Coefficient.

Definition at line 836 of file coefficient.hpp.

◆ Project()

void mfem::VectorGridFunctionCoefficient::Project ( QuadratureFunction & qf)
virtual

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

This function uses the efficient QuadratureFunction::ProjectGridFunction to fill the QuadratureFunction.

Reimplemented from mfem::VectorCoefficient.

Definition at line 474 of file coefficient.cpp.

◆ SetGridFunction()

void mfem::VectorGridFunctionCoefficient::SetGridFunction ( const GridFunction * gf)

Set the grid function for this coefficient. Also sets the Vector dimension to match that of the gf.

Definition at line 440 of file coefficient.cpp.

Member Data Documentation

◆ GridFunc

const GridFunction* mfem::VectorGridFunctionCoefficient::GridFunc
protected

Definition at line 820 of file coefficient.hpp.


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