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

Scalar coefficient defined as the product of two scalar coefficients or a scalar and a scalar coefficient. More...

#include <coefficient.hpp>

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

Public Member Functions

 ProductCoefficient (real_t A, Coefficient &B)
 Constructor with one coefficient. Result is A * B.
 
 ProductCoefficient (Coefficient &A, Coefficient &B)
 Constructor with two coefficients. Result is A * B.
 
void SetTime (real_t t)
 Set the time for internally stored coefficients.
 
void SetAConst (real_t A)
 Reset the first term in the product as a constant.
 
real_t GetAConst () const
 Return the first term in the product.
 
void SetACoef (Coefficient &A)
 Reset the first term in the product.
 
CoefficientGetACoef () const
 Return the first term in the product.
 
void SetBCoef (Coefficient &B)
 Reset the second term in the product.
 
CoefficientGetBCoef () const
 Return the second term in the product.
 
virtual real_t Eval (ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the coefficient at ip.
 
- 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 product of two scalar coefficients or a scalar and a scalar coefficient.

Definition at line 1546 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ ProductCoefficient() [1/2]

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

Constructor with one coefficient. Result is A * B.

Definition at line 1555 of file coefficient.hpp.

◆ ProductCoefficient() [2/2]

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

Constructor with two coefficients. Result is A * B.

Definition at line 1559 of file coefficient.hpp.

Member Function Documentation

◆ Eval()

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

Evaluate the coefficient at ip.

Implements mfem::Coefficient.

Definition at line 1581 of file coefficient.hpp.

◆ GetACoef()

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

Return the first term in the product.

Definition at line 1573 of file coefficient.hpp.

◆ GetAConst()

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

Return the first term in the product.

Definition at line 1568 of file coefficient.hpp.

◆ GetBCoef()

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

Return the second term in the product.

Definition at line 1578 of file coefficient.hpp.

◆ SetACoef()

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

Reset the first term in the product.

Definition at line 1571 of file coefficient.hpp.

◆ SetAConst()

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

Reset the first term in the product as a constant.

Definition at line 1566 of file coefficient.hpp.

◆ SetBCoef()

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

Reset the second term in the product.

Definition at line 1576 of file coefficient.hpp.

◆ SetTime()

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

Set the time for internally stored coefficients.

Reimplemented from mfem::Coefficient.

Definition at line 955 of file coefficient.cpp.


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