https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMQuadratureFunctionBase.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
16{
19 "order",
20 "order>=0",
21 "Order of the quadrature rule the projected values are stored on. This must match the "
22 "integration rule used by the objects consuming this coefficient.");
23 MooseEnum updates(MFEMQuadratureFunctionCoefficientBase::getUpdatePolicyOptions(), "NONLINEAR");
24 params.addParam<MooseEnum>(
25 "updates",
26 updates,
27 "When the stored values are re-projected from the source coefficient: 'none' projects "
28 "exactly once, 'time' re-projects when the simulation time changes, 'nonlinear' additionally "
29 "re-projects whenever solution variables change (i.e. on each nonlinear iteration).");
30 return params;
31}
32
34 : Function(parameters),
35 _mfem_problem(
36 cast_ref<MFEMProblem &>(*parameters.getCheckedPointerParam<SubProblem *>("_subproblem"))),
37 _qspace(&_mfem_problem.mesh().getMFEMParMesh(), getParam<int>("order"))
38{
39}
40
41MFEMQuadratureFunctionCoefficientBase::UpdatePolicy
43{
44 return getParam<MooseEnum>("updates")
45 .getEnum<MFEMQuadratureFunctionCoefficientBase::UpdatePolicy>();
46}
47
48#endif
void ErrorVector unsigned int
Base class for function objects.
Definition Function.h:30
static InputParameters validParams()
Class constructor.
Definition Function.C:16
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
These methods add an range checked parameters.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
static InputParameters validParams()
MFEMQuadratureFunctionCoefficientBase::UpdatePolicy updatePolicy() const
Return the update policy selected by the 'updates' input parameter, to hand to the coefficient (which...
MFEMQuadratureFunctionBase(const InputParameters &parameters)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
MeshBase & mesh