MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
mfem::MappedGridFunctionCoefficient Class Reference

Returns f(u(x)) where u is a scalar GridFunction and f:R → R. More...

#include <ex37.hpp>

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

Public Member Functions

 MappedGridFunctionCoefficient ()
 
 MappedGridFunctionCoefficient (const GridFunction *gf, std::function< real_t(const real_t)> fun_, int comp=1)
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient at ip.
 
void SetFunction (std::function< real_t(const real_t)> fun_)
 
- Public Member Functions inherited from mfem::GridFunctionCoefficient
 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.
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)=0
 Evaluate the coefficient in the element described by T at the point ip.
 
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 void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points.
 
virtual ~Coefficient ()
 

Protected Attributes

std::function< real_t(const real_t)> fun
 
- Protected Attributes inherited from mfem::Coefficient
real_t time
 

Detailed Description

Returns f(u(x)) where u is a scalar GridFunction and f:R → R.

Definition at line 40 of file ex37.hpp.

Constructor & Destructor Documentation

◆ MappedGridFunctionCoefficient() [1/2]

mfem::MappedGridFunctionCoefficient::MappedGridFunctionCoefficient ( )
inline

Definition at line 45 of file ex37.hpp.

◆ MappedGridFunctionCoefficient() [2/2]

mfem::MappedGridFunctionCoefficient::MappedGridFunctionCoefficient ( const GridFunction gf,
std::function< real_t(const real_t)>  fun_,
int  comp = 1 
)
inline

Definition at line 48 of file ex37.hpp.

Member Function Documentation

◆ Eval()

virtual real_t mfem::MappedGridFunctionCoefficient::Eval ( ElementTransformation T,
const IntegrationPoint ip 
)
inlinevirtual

Evaluate the coefficient at ip.

Reimplemented from mfem::GridFunctionCoefficient.

Definition at line 55 of file ex37.hpp.

◆ SetFunction()

void mfem::MappedGridFunctionCoefficient::SetFunction ( std::function< real_t(const real_t)>  fun_)
inline

Definition at line 60 of file ex37.hpp.

Member Data Documentation

◆ fun

std::function<real_t(const real_t)> mfem::MappedGridFunctionCoefficient::fun
protected

Definition at line 43 of file ex37.hpp.


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