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

Matrix coefficient defined as the linear combination of two matrices. More...

#include <coefficient.hpp>

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

Public Member Functions

 MatrixSumCoefficient (MatrixCoefficient &A, MatrixCoefficient &B, real_t alpha_=1.0, real_t beta_=1.0)
 Construct with the two coefficients. Result is alpha_ * A + beta_ * B.
 
void SetTime (real_t t)
 Set the time for internally stored coefficients.
 
void SetACoef (MatrixCoefficient &A)
 Reset the first matrix coefficient.
 
MatrixCoefficientGetACoef () const
 Return the first matrix coefficient.
 
void SetBCoef (MatrixCoefficient &B)
 Reset the second matrix coefficient.
 
MatrixCoefficientGetBCoef () const
 Return the second matrix coefficient.
 
void SetAlpha (real_t alpha_)
 Reset the factor in front of the first matrix coefficient.
 
real_t GetAlpha () const
 Return the factor in front of the first matrix coefficient.
 
void SetBeta (real_t beta_)
 Reset the factor in front of the second matrix coefficient.
 
real_t GetBeta () const
 Return the factor in front of the second matrix coefficient.
 
virtual void Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip)
 Evaluate the matrix coefficient at ip.
 
- Public Member Functions inherited from mfem::MatrixCoefficient
 MatrixCoefficient (int dim, bool symm=false)
 Construct a dim x dim matrix coefficient.
 
 MatrixCoefficient (int h, int w, bool symm=false)
 Construct a h x w matrix coefficient.
 
real_t GetTime ()
 Get the time for time dependent coefficients.
 
int GetHeight () const
 Get the height of the matrix.
 
int GetWidth () const
 Get the width of the matrix.
 
int GetVDim () const
 For backward compatibility get the width of the matrix.
 
bool IsSymmetric () const
 
virtual void Project (QuadratureFunction &qf, bool transpose=false)
 Fill the QuadratureFunction qf by evaluating the coefficient at the quadrature points. The matrix will be transposed or not according to the boolean argument transpose.
 
virtual void EvalSymmetric (Vector &K, ElementTransformation &T, const IntegrationPoint &ip)
 (DEPRECATED) Evaluate a symmetric matrix coefficient.
 
virtual ~MatrixCoefficient ()
 

Additional Inherited Members

- Protected Attributes inherited from mfem::MatrixCoefficient
int height
 
int width
 
real_t time
 
bool symmetric
 

Detailed Description

Matrix coefficient defined as the linear combination of two matrices.

Definition at line 2003 of file coefficient.hpp.

Constructor & Destructor Documentation

◆ MatrixSumCoefficient()

mfem::MatrixSumCoefficient::MatrixSumCoefficient ( MatrixCoefficient & A,
MatrixCoefficient & B,
real_t alpha_ = 1.0,
real_t beta_ = 1.0 )

Construct with the two coefficients. Result is alpha_ * A + beta_ * B.

Definition at line 1213 of file coefficient.cpp.

Member Function Documentation

◆ Eval()

void mfem::MatrixSumCoefficient::Eval ( DenseMatrix & M,
ElementTransformation & T,
const IntegrationPoint & ip )
virtual

Evaluate the matrix coefficient at ip.

Implements mfem::MatrixCoefficient.

Definition at line 1232 of file coefficient.cpp.

◆ GetACoef()

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

Return the first matrix coefficient.

Definition at line 2025 of file coefficient.hpp.

◆ GetAlpha()

real_t mfem::MatrixSumCoefficient::GetAlpha ( ) const
inline

Return the factor in front of the first matrix coefficient.

Definition at line 2035 of file coefficient.hpp.

◆ GetBCoef()

MatrixCoefficient * mfem::MatrixSumCoefficient::GetBCoef ( ) const
inline

Return the second matrix coefficient.

Definition at line 2030 of file coefficient.hpp.

◆ GetBeta()

real_t mfem::MatrixSumCoefficient::GetBeta ( ) const
inline

Return the factor in front of the second matrix coefficient.

Definition at line 2040 of file coefficient.hpp.

◆ SetACoef()

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

Reset the first matrix coefficient.

Definition at line 2023 of file coefficient.hpp.

◆ SetAlpha()

void mfem::MatrixSumCoefficient::SetAlpha ( real_t alpha_)
inline

Reset the factor in front of the first matrix coefficient.

Definition at line 2033 of file coefficient.hpp.

◆ SetBCoef()

void mfem::MatrixSumCoefficient::SetBCoef ( MatrixCoefficient & B)
inline

Reset the second matrix coefficient.

Definition at line 2028 of file coefficient.hpp.

◆ SetBeta()

void mfem::MatrixSumCoefficient::SetBeta ( real_t beta_)
inline

Reset the factor in front of the second matrix coefficient.

Definition at line 2038 of file coefficient.hpp.

◆ SetTime()

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

Set the time for internally stored coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 1225 of file coefficient.cpp.


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