MFEM  v4.2.0
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::Coefficient Class Referenceabstract

Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormIntegrator, LinearFormIntegrator, and NonlinearFormIntegrator classes to represent the physical coefficients in the PDEs that are being discretized. This class can also be used in a more general way to represent functions that don't necessarily belong to a FE space, e.g., to project onto GridFunctions to use as initial conditions, exact solutions, etc. See, e.g., ex4 or ex22 for these uses. More...

#include <coefficient.hpp>

Inheritance diagram for mfem::Coefficient:
[legend]

Public Member Functions

 Coefficient ()
 
void SetTime (double t)
 Set the time for time dependent coefficients. More...
 
double GetTime ()
 Get the time for time dependent coefficients. More...
 
virtual double Eval (ElementTransformation &T, const IntegrationPoint &ip)=0
 Evaluate the coefficient in the element described by T at the point ip. 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

double time
 

Detailed Description

Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormIntegrator, LinearFormIntegrator, and NonlinearFormIntegrator classes to represent the physical coefficients in the PDEs that are being discretized. This class can also be used in a more general way to represent functions that don't necessarily belong to a FE space, e.g., to project onto GridFunctions to use as initial conditions, exact solutions, etc. See, e.g., ex4 or ex22 for these uses.

Definition at line 39 of file coefficient.hpp.

Constructor & Destructor Documentation

mfem::Coefficient::Coefficient ( )
inline

Definition at line 45 of file coefficient.hpp.

virtual mfem::Coefficient::~Coefficient ( )
inlinevirtual

Definition at line 73 of file coefficient.hpp.

Member Function Documentation

virtual double mfem::Coefficient::Eval ( ElementTransformation T,
const IntegrationPoint ip 
)
pure virtual
double mfem::Coefficient::Eval ( ElementTransformation T,
const IntegrationPoint ip,
double  t 
)
inline

Evaluate the coefficient in the element described by T at the point ip at time t.

Note
When this method is called, the caller must make sure that the IntegrationPoint associated with T is the same as ip. This can be achieved by calling T.SetIntPoint(&ip).

Definition at line 66 of file coefficient.hpp.

double mfem::Coefficient::GetTime ( )
inline

Get the time for time dependent coefficients.

Definition at line 51 of file coefficient.hpp.

void mfem::Coefficient::SetTime ( double  t)
inline

Set the time for time dependent coefficients.

Definition at line 48 of file coefficient.hpp.

Member Data Documentation

double mfem::Coefficient::time
protected

Definition at line 42 of file coefficient.hpp.


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