MFEM  v4.5.2
Finite element discretization library
Public Member Functions | List of all members
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 (double A, Coefficient &B)
 
 RatioCoefficient (Coefficient &A, Coefficient &B)
 
 RatioCoefficient (Coefficient &A, double B)
 
void SetTime (double t)
 Set the time for internally stored coefficients. More...
 
void SetAConst (double A)
 Reset the numerator in the ratio as a constant. More...
 
double GetAConst () const
 Return the numerator of the ratio. More...
 
void SetBConst (double B)
 Reset the denominator in the ratio as a constant. More...
 
double GetBConst () const
 Return the denominator of the ratio. More...
 
void SetACoef (Coefficient &A)
 Reset the numerator in the ratio. More...
 
CoefficientGetACoef () const
 Return the numerator of the ratio. More...
 
void SetBCoef (Coefficient &B)
 Reset the denominator in the ratio. More...
 
CoefficientGetBCoef () const
 Return the denominator of the ratio. More...
 
virtual double Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient. More...
 
- Public Member Functions inherited from mfem::Coefficient
 Coefficient ()
 
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 void Project (QuadratureFunction &qf)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. More...
 
virtual ~Coefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::Coefficient
double time
 

Detailed Description

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

Definition at line 1454 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ RatioCoefficient() [1/3]

mfem::RatioCoefficient::RatioCoefficient ( double  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 1465 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 1469 of file coefficient.hpp.

◆ RatioCoefficient() [3/3]

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

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

Definition at line 1473 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

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

Evaluate the coefficient.

Implements mfem::Coefficient.

Definition at line 1500 of file coefficient.hpp.

◆ GetACoef()

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

Return the numerator of the ratio.

Definition at line 1492 of file coefficient.hpp.

◆ GetAConst()

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

Return the numerator of the ratio.

Definition at line 1482 of file coefficient.hpp.

◆ GetBCoef()

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

Return the denominator of the ratio.

Definition at line 1497 of file coefficient.hpp.

◆ GetBConst()

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

Return the denominator of the ratio.

Definition at line 1487 of file coefficient.hpp.

◆ SetACoef()

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

Reset the numerator in the ratio.

Definition at line 1490 of file coefficient.hpp.

◆ SetAConst()

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

Reset the numerator in the ratio as a constant.

Definition at line 1480 of file coefficient.hpp.

◆ SetBCoef()

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

Reset the denominator in the ratio.

Definition at line 1495 of file coefficient.hpp.

◆ SetBConst()

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

Reset the denominator in the ratio as a constant.

Definition at line 1485 of file coefficient.hpp.

◆ SetTime()

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

Set the time for internally stored coefficients.

Reimplemented from mfem::Coefficient.

Definition at line 912 of file coefficient.cpp.


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