MFEM v4.8.0
Finite element discretization library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mfem::TraceCoefficient Class Reference

Scalar coefficient defined as the trace of a matrix coefficient. More...

#include <coefficient.hpp>

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

Public Member Functions

 TraceCoefficient (MatrixCoefficient &A)
 Construct with the matrix.
 
void SetTime (real_t t) override
 Set the time for internally stored coefficients.
 
void SetACoef (MatrixCoefficient &A)
 Reset the matrix coefficient.
 
MatrixCoefficientGetACoef () const
 Return the matrix coefficient.
 
real_t Eval (ElementTransformation &T, const IntegrationPoint &ip) override
 Evaluate the trace 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 trace of a matrix coefficient.

Definition at line 1829 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ TraceCoefficient()

mfem::TraceCoefficient::TraceCoefficient ( MatrixCoefficient & A)

Construct with the matrix.

Definition at line 1113 of file coefficient.cpp.

Member Function Documentation

◆ Eval()

real_t mfem::TraceCoefficient::Eval ( ElementTransformation & T,
const IntegrationPoint & ip )
overridevirtual

Evaluate the trace coefficient at ip.

Implements mfem::Coefficient.

Definition at line 1127 of file coefficient.cpp.

◆ GetACoef()

MatrixCoefficient * mfem::TraceCoefficient::GetACoef ( ) const
inline

Return the matrix coefficient.

Definition at line 1846 of file coefficient.hpp.

◆ SetACoef()

void mfem::TraceCoefficient::SetACoef ( MatrixCoefficient & A)
inline

Reset the matrix coefficient.

Definition at line 1844 of file coefficient.hpp.

◆ SetTime()

void mfem::TraceCoefficient::SetTime ( real_t t)
overridevirtual

Set the time for internally stored coefficients.

Reimplemented from mfem::Coefficient.

Definition at line 1121 of file coefficient.cpp.


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