https://mooseframework.inl.gov
Public Member Functions | Private Attributes | List of all members
MFEMVectorMagnitudeCoefficient Class Reference

Scalar coefficient that evaluates the magnitude of a vector coefficient. More...

#include <MFEMVectorMagnitudeCoefficient.h>

Inheritance diagram for MFEMVectorMagnitudeCoefficient:
[legend]

Public Member Functions

 MFEMVectorMagnitudeCoefficient (mfem::VectorCoefficient &vec_coef)
 
void SetTime (mfem::real_t t) override
 Set the time for internally stored coefficients. More...
 
mfem::real_t Eval (mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
 Evaluate the vector coefficient magnitude at ip. More...
 

Private Attributes

mfem::VectorCoefficient * _vec_coef
 
mfem::Vector _vec
 

Detailed Description

Scalar coefficient that evaluates the magnitude of a vector coefficient.

Definition at line 21 of file MFEMVectorMagnitudeCoefficient.h.

Constructor & Destructor Documentation

◆ MFEMVectorMagnitudeCoefficient()

MFEMVectorMagnitudeCoefficient::MFEMVectorMagnitudeCoefficient ( mfem::VectorCoefficient &  vec_coef)

Definition at line 14 of file MFEMVectorMagnitudeCoefficient.C.

15  : mfem::Coefficient(), _vec_coef(&vec_coef)
16 {
17 }

Member Function Documentation

◆ Eval()

mfem::real_t MFEMVectorMagnitudeCoefficient::Eval ( mfem::ElementTransformation &  T,
const mfem::IntegrationPoint &  ip 
)
override

Evaluate the vector coefficient magnitude at ip.

Definition at line 27 of file MFEMVectorMagnitudeCoefficient.C.

29 {
30  _vec_coef->Eval(_vec, T, ip);
31  return _vec.Norml2();
32 }

◆ SetTime()

void MFEMVectorMagnitudeCoefficient::SetTime ( mfem::real_t  t)
override

Set the time for internally stored coefficients.

Definition at line 20 of file MFEMVectorMagnitudeCoefficient.C.

21 {
22  _vec_coef->SetTime(t);
23  this->mfem::Coefficient::SetTime(t);
24 }

Member Data Documentation

◆ _vec

mfem::Vector MFEMVectorMagnitudeCoefficient::_vec
mutableprivate

Definition at line 34 of file MFEMVectorMagnitudeCoefficient.h.

Referenced by Eval().

◆ _vec_coef

mfem::VectorCoefficient* MFEMVectorMagnitudeCoefficient::_vec_coef
private

Definition at line 33 of file MFEMVectorMagnitudeCoefficient.h.

Referenced by Eval(), and SetTime().


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