MFEM v4.8.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) override
 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.
 
void Eval (DenseMatrix &M, ElementTransformation &T, const IntegrationPoint &ip) override
 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 2092 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 1303 of file coefficient.cpp.

Member Function Documentation

◆ Eval()

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

Evaluate the matrix coefficient at ip.

Implements mfem::MatrixCoefficient.

Definition at line 1322 of file coefficient.cpp.

◆ GetACoef()

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

Return the first matrix coefficient.

Definition at line 2114 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 2124 of file coefficient.hpp.

◆ GetBCoef()

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

Return the second matrix coefficient.

Definition at line 2119 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 2129 of file coefficient.hpp.

◆ SetACoef()

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

Reset the first matrix coefficient.

Definition at line 2112 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 2122 of file coefficient.hpp.

◆ SetBCoef()

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

Reset the second matrix coefficient.

Definition at line 2117 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 2127 of file coefficient.hpp.

◆ SetTime()

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

Set the time for internally stored coefficients.

Reimplemented from mfem::MatrixCoefficient.

Definition at line 1315 of file coefficient.cpp.


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