https://mooseframework.inl.gov
Loading...
Searching...
No Matches
src
mfem
functions
MFEMVectorMagnitudeCoefficient.C
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://mooseframework.inl.gov
3
//*
4
//* All rights reserved, see COPYRIGHT for full restrictions
5
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6
//*
7
//* Licensed under LGPL 2.1, please see LICENSE for details
8
//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10
#ifdef MOOSE_MFEM_ENABLED
11
12
#include "
MFEMVectorMagnitudeCoefficient.h
"
13
14
MFEMVectorMagnitudeCoefficient::MFEMVectorMagnitudeCoefficient
(mfem::VectorCoefficient & vec_coef)
15
:
mfem
::Coefficient(), _vec_coef(&vec_coef)
16
{
17
}
18
19
void
20
MFEMVectorMagnitudeCoefficient::SetTime
(mfem::real_t t)
21
{
22
_vec_coef
->SetTime(t);
23
this->mfem::Coefficient::SetTime(t);
24
}
25
26
mfem::real_t
27
MFEMVectorMagnitudeCoefficient::Eval
(mfem::ElementTransformation & T,
28
const
mfem::IntegrationPoint & ip)
29
{
30
_vec_coef
->Eval(
_vec
, T, ip);
31
return
_vec
.Norml2();
32
}
33
34
#endif
MFEMVectorMagnitudeCoefficient.h
MFEMVectorMagnitudeCoefficient::_vec_coef
mfem::VectorCoefficient * _vec_coef
Definition
MFEMVectorMagnitudeCoefficient.h:33
MFEMVectorMagnitudeCoefficient::_vec
mfem::Vector _vec
Definition
MFEMVectorMagnitudeCoefficient.h:34
MFEMVectorMagnitudeCoefficient::MFEMVectorMagnitudeCoefficient
MFEMVectorMagnitudeCoefficient(mfem::VectorCoefficient &vec_coef)
Definition
MFEMVectorMagnitudeCoefficient.C:14
MFEMVectorMagnitudeCoefficient::SetTime
void SetTime(mfem::real_t t) override
Set the time for internally stored coefficients.
Definition
MFEMVectorMagnitudeCoefficient.C:20
MFEMVectorMagnitudeCoefficient::Eval
mfem::real_t Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
Evaluate the vector coefficient magnitude at ip.
Definition
MFEMVectorMagnitudeCoefficient.C:27
mfem
Definition
MFEMContainers.h:21
Generated on Fri Aug 21 2026 13:33:57 for https://mooseframework.inl.gov by
1.9.8