MFEM  v4.6.0
Finite element discretization library
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< double(const double)> fun_, int comp=1)
 
virtual double Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient at ip. More...
 
void SetFunction (std::function< double(const double)> 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. More...
 
const GridFunctionGetGridFunction () const
 Get the internal GridFunction. More...
 
virtual void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. More...
 
- Public Member Functions inherited from mfem::Coefficient
 Coefficient ()
 
virtual void SetTime (double t)
 Set the time for time dependent coefficients. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
double Eval (ElementTransformation &T, const IntegrationPoint &ip, double t)
 Evaluate the coefficient in the element described by T at the point ip at time t. More...
 
virtual ~Coefficient ()
 

Protected Attributes

std::function< double(const double)> fun
 
- Protected Attributes inherited from mfem::Coefficient
double 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< double(const double)>  fun_,
int  comp = 1 
)
inline

Definition at line 48 of file ex37.hpp.

Member Function Documentation

◆ Eval()

virtual double 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< double(const double)>  fun_)
inline

Definition at line 60 of file ex37.hpp.

Member Data Documentation

◆ fun

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

Definition at line 43 of file ex37.hpp.


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