https://mooseframework.inl.gov
MFEMInitialCondition.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 MFEM_ENABLED
11 
12 #include "MFEMInitialCondition.h"
13 #include <mfem.hpp>
14 
17 {
18  auto params = MFEMGeneralUserObject::validParams();
19  params.addRequiredParam<VariableName>("variable",
20  "The variable to apply the initial condition on.");
21  params.registerBase("InitialCondition");
22  params.addClassDescription(
23  "Base class for objects that set the initial condition on an MFEM variable.");
24  // We cannot generally execute this at construction time since the coefficient may be based on a
25  // MOOSE function which is not itself setup until its initialSetup is called. UserObject initial
26  // execution occurs after function initialSetup
27  params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL};
28  params.suppressParameter<ExecFlagEnum>("execute_on");
29  return params;
30 }
31 
33  : MFEMGeneralUserObject(params)
34 {
35 }
36 
37 #endif
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MFEMInitialCondition(const InputParameters &params)
static InputParameters validParams()
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28