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

#include <sbm_solver.hpp>

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

Public Member Functions

 ShiftedFunctionCoefficient (std::function< real_t(const Vector &v)> F)
 
 ShiftedFunctionCoefficient (real_t constant_)
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient in the element described by T at the point ip.
 
real_t Eval (ElementTransformation &T, const IntegrationPoint &ip, const Vector &D)
 Evaluate the coefficient at ip + D.
 
- 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 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 Vector &)> Function
 
real_t constant = 0.0
 
bool constantcoefficient
 
- Protected Attributes inherited from mfem::Coefficient
real_t time
 

Detailed Description

ShiftedFunctionCoefficient, similar to FunctionCoefficient, but also takes into account a displacement vector if specified.

Definition at line 23 of file sbm_solver.hpp.

Constructor & Destructor Documentation

◆ ShiftedFunctionCoefficient() [1/2]

mfem::ShiftedFunctionCoefficient::ShiftedFunctionCoefficient ( std::function< real_t(const Vector &v)> F)
inline

Definition at line 31 of file sbm_solver.hpp.

◆ ShiftedFunctionCoefficient() [2/2]

mfem::ShiftedFunctionCoefficient::ShiftedFunctionCoefficient ( real_t constant_)
inline

Definition at line 33 of file sbm_solver.hpp.

Member Function Documentation

◆ Eval() [1/2]

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

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

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).

Implements mfem::Coefficient.

Definition at line 36 of file sbm_solver.hpp.

◆ Eval() [2/2]

real_t mfem::ShiftedFunctionCoefficient::Eval ( ElementTransformation & T,
const IntegrationPoint & ip,
const Vector & D )

Evaluate the coefficient at ip + D.

Definition at line 17 of file sbm_solver.cpp.

Member Data Documentation

◆ constant

real_t mfem::ShiftedFunctionCoefficient::constant = 0.0
protected

Definition at line 27 of file sbm_solver.hpp.

◆ constantcoefficient

bool mfem::ShiftedFunctionCoefficient::constantcoefficient
protected

Definition at line 28 of file sbm_solver.hpp.

◆ Function

std::function<real_t(const Vector &)> mfem::ShiftedFunctionCoefficient::Function
protected

Definition at line 26 of file sbm_solver.hpp.


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