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

Scalar coefficient defined as the ratio of two scalars where one or both scalars are scalar coefficients. More...

#include <coefficient.hpp>

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

Public Member Functions

 RatioCoefficient (real_t A, Coefficient &B)
 
 RatioCoefficient (Coefficient &A, Coefficient &B)
 
 RatioCoefficient (Coefficient &A, real_t B)
 
void SetTime (real_t t)
 Set the time for internally stored coefficients.
 
void SetAConst (real_t A)
 Reset the numerator in the ratio as a constant.
 
real_t GetAConst () const
 Return the numerator of the ratio.
 
void SetBConst (real_t B)
 Reset the denominator in the ratio as a constant.
 
real_t GetBConst () const
 Return the denominator of the ratio.
 
void SetACoef (Coefficient &A)
 Reset the numerator in the ratio.
 
CoefficientGetACoef () const
 Return the numerator of the ratio.
 
void SetBCoef (Coefficient &B)
 Reset the denominator in the ratio.
 
CoefficientGetBCoef () const
 Return the denominator of the ratio.
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient.
 
- Public Member Functions inherited from mfem::Coefficient
 Coefficient ()
 
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 ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::Coefficient
real_t time
 

Detailed Description

Scalar coefficient defined as the ratio of two scalars where one or both scalars are scalar coefficients.

Definition at line 1588 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ RatioCoefficient() [1/3]

mfem::RatioCoefficient::RatioCoefficient ( real_t A,
Coefficient & B )
inline

Initialize a coefficient which returns A / B where A is a constant and B is a scalar coefficient

Definition at line 1599 of file coefficient.hpp.

◆ RatioCoefficient() [2/3]

mfem::RatioCoefficient::RatioCoefficient ( Coefficient & A,
Coefficient & B )
inline

Initialize a coefficient which returns A / B where A and B are both scalar coefficients

Definition at line 1603 of file coefficient.hpp.

◆ RatioCoefficient() [3/3]

mfem::RatioCoefficient::RatioCoefficient ( Coefficient & A,
real_t B )
inline

Initialize a coefficient which returns A / B where A is a scalar coefficient and B is a constant

Definition at line 1607 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

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

Evaluate the coefficient.

Implements mfem::Coefficient.

Definition at line 1634 of file coefficient.hpp.

◆ GetACoef()

Coefficient * mfem::RatioCoefficient::GetACoef ( ) const
inline

Return the numerator of the ratio.

Definition at line 1626 of file coefficient.hpp.

◆ GetAConst()

real_t mfem::RatioCoefficient::GetAConst ( ) const
inline

Return the numerator of the ratio.

Definition at line 1616 of file coefficient.hpp.

◆ GetBCoef()

Coefficient * mfem::RatioCoefficient::GetBCoef ( ) const
inline

Return the denominator of the ratio.

Definition at line 1631 of file coefficient.hpp.

◆ GetBConst()

real_t mfem::RatioCoefficient::GetBConst ( ) const
inline

Return the denominator of the ratio.

Definition at line 1621 of file coefficient.hpp.

◆ SetACoef()

void mfem::RatioCoefficient::SetACoef ( Coefficient & A)
inline

Reset the numerator in the ratio.

Definition at line 1624 of file coefficient.hpp.

◆ SetAConst()

void mfem::RatioCoefficient::SetAConst ( real_t A)
inline

Reset the numerator in the ratio as a constant.

Definition at line 1614 of file coefficient.hpp.

◆ SetBCoef()

void mfem::RatioCoefficient::SetBCoef ( Coefficient & B)
inline

Reset the denominator in the ratio.

Definition at line 1629 of file coefficient.hpp.

◆ SetBConst()

void mfem::RatioCoefficient::SetBConst ( real_t B)
inline

Reset the denominator in the ratio as a constant.

Definition at line 1619 of file coefficient.hpp.

◆ SetTime()

void mfem::RatioCoefficient::SetTime ( real_t t)
virtual

Set the time for internally stored coefficients.

Reimplemented from mfem::Coefficient.

Definition at line 962 of file coefficient.cpp.


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