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

A coefficient that is constant across space and time. More...

#include <coefficient.hpp>

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

Public Member Functions

 ConstantCoefficient (real_t c=1.0)
 c is value of constant function
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient at ip.
 
void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf with the constant value.
 
- 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 ()
 

Public Attributes

real_t constant
 

Additional Inherited Members

- Protected Attributes inherited from mfem::Coefficient
real_t time
 

Detailed Description

A coefficient that is constant across space and time.

Definition at line 84 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ ConstantCoefficient()

mfem::ConstantCoefficient::ConstantCoefficient ( real_t c = 1.0)
inlineexplicit

c is value of constant function

Definition at line 90 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

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

Evaluate the coefficient at ip.

Implements mfem::Coefficient.

Definition at line 93 of file coefficient.hpp.

◆ Project()

void mfem::ConstantCoefficient::Project ( QuadratureFunction & qf)
virtual

Fill the QuadratureFunction qf with the constant value.

Reimplemented from mfem::Coefficient.

Definition at line 71 of file coefficient.cpp.

Member Data Documentation

◆ constant

real_t mfem::ConstantCoefficient::constant

Definition at line 87 of file coefficient.hpp.


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