https://mooseframework.inl.gov
MFEMScalarQuadratureFunction.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 
14 #include "MFEMProblem.h"
15 
17 
20 {
22  params.addClassDescription(
23  "Declares a scalar MFEM coefficient holding precomputed values of a source coefficient at "
24  "quadrature points. Values are (re)projected lazily when the coefficient is used.");
25  params.addRequiredParam<MFEMScalarCoefficientName>(
26  "coefficient", "Scalar coefficient to project onto the quadrature points.");
27  return params;
28 }
29 
31  : MFEMQuadratureFunctionBase(parameters), _qf(&_qspace)
32 {
33  // Zero-initialize the storage; real values are projected lazily on first use.
34  _qf = 0.0;
36  name(), getScalarCoefficient("coefficient"), _qf, updatePolicy(), name());
37 }
38 
39 #endif
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Definition: MFEMObject.h:45
mfem::QuadratureFunction _qf
Storage for the projected values of the source coefficient.
Declares a scalar MFEM coefficient represented as a precomputed vector of values of a source coeffici...
Scalar coefficient holding precomputed values of a source coefficient at the quadrature points of a Q...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MFEMQuadratureFunctionCoefficientBase::UpdatePolicy updatePolicy() const
Return the update policy selected by the &#39;updates&#39; input parameter, to hand to the coefficient (which...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
registerMooseObject("MooseApp", MFEMScalarQuadratureFunction)
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
mfem::Coefficient & declareScalar(const std::string &name, const std::string &existing_or_literal)
Declare an alias to an existing scalar coefficient or, if it does not exist, try interpreting the nam...
Moose::MFEM::CoefficientManager & getCoefficients()
Method to get the PropertyManager object for storing material properties and converting them to MFEM ...
Definition: MFEMProblem.h:260
Base class for MOOSE objects declaring an MFEM coefficient backed by precomputed values of a source c...
MFEMScalarQuadratureFunction(const InputParameters &parameters)
mfem::Coefficient & getScalarCoefficient(const std::string &name)
Retrieve a scalar MFEM coefficient using the value of an input parameter.
Definition: MFEMObject.C:58
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...