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

Coefficient defined by a GridFunction. This coefficient is mesh dependent. More...

#include <coefficient.hpp>

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

Public Member Functions

 GridFunctionCoefficient ()
 
 GridFunctionCoefficient (const GridFunction *gf, int comp=1)
 
void SetGridFunction (const GridFunction *gf)
 Set the internal GridFunction.
 
const GridFunctionGetGridFunction () const
 Get the internal GridFunction.
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient at ip.
 
virtual void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points.
 
- Public Member Functions inherited from mfem::Coefficient
 Coefficient ()
 
virtual void SetTime (real_t t)
 Set the time for time dependent coefficients.
 
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 ~Coefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::Coefficient
real_t time
 

Detailed Description

Coefficient defined by a GridFunction. This coefficient is mesh dependent.

Definition at line 382 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ GridFunctionCoefficient() [1/2]

mfem::GridFunctionCoefficient::GridFunctionCoefficient ( )
inline

Definition at line 389 of file coefficient.hpp.

◆ GridFunctionCoefficient() [2/2]

mfem::GridFunctionCoefficient::GridFunctionCoefficient ( const GridFunction * gf,
int comp = 1 )
inline

Construct GridFunctionCoefficient from a given GridFunction, and optionally specify a component to use if it is a vector GridFunction.

Definition at line 392 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

real_t mfem::GridFunctionCoefficient::Eval ( ElementTransformation & T,
const IntegrationPoint & ip )
virtual

Evaluate the coefficient at ip.

Implements mfem::Coefficient.

Reimplemented in mfem::DiffMappedGridFunctionCoefficient, mfem::electromagnetics::ScaledGFCoefficient, and mfem::MappedGridFunctionCoefficient.

Definition at line 190 of file coefficient.cpp.

◆ GetGridFunction()

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

Get the internal GridFunction.

Definition at line 399 of file coefficient.hpp.

◆ Project()

void mfem::GridFunctionCoefficient::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::Coefficient.

Definition at line 206 of file coefficient.cpp.

◆ SetGridFunction()

void mfem::GridFunctionCoefficient::SetGridFunction ( const GridFunction * gf)
inline

Set the internal GridFunction.

Definition at line 396 of file coefficient.hpp.


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