https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13
15 : mfem::Coefficient(), _vec_coef(&vec_coef)
16{
17}
18
19void
21{
22 _vec_coef->SetTime(t);
23 this->mfem::Coefficient::SetTime(t);
24}
25
26mfem::real_t
27MFEMVectorMagnitudeCoefficient::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(mfem::VectorCoefficient &vec_coef)
void SetTime(mfem::real_t t) override
Set the time for internally stored coefficients.
mfem::real_t Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
Evaluate the vector coefficient magnitude at ip.