Line data Source code
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 "MFEMInitialCondition.h" 13 : 14 : InputParameters 15 8452 : MFEMInitialCondition::validParams() 16 : { 17 8452 : auto params = MFEMExecutedObject::validParams(); 18 33808 : params.addRequiredParam<VariableName>("variable", 19 : "The variable to apply the initial condition on."); 20 16904 : params.registerBase("InitialCondition"); 21 8452 : params.addClassDescription( 22 : "Base class for objects that set the initial condition on an MFEM variable."); 23 : // We cannot generally execute this at construction time since the coefficient may be based on a 24 : // MOOSE function which is not itself setup until its initialSetup is called. MFEM initial 25 : // conditions therefore run in the explicit executed-object pass on EXEC_INITIAL. 26 25356 : params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL}; 27 8452 : params.suppressParameter<ExecFlagEnum>("execute_on"); 28 8452 : return params; 29 8452 : } 30 : 31 1079 : MFEMInitialCondition::MFEMInitialCondition(const InputParameters & params) 32 1079 : : MFEMExecutedObject(params) 33 : { 34 1079 : } 35 : 36 : std::optional<std::string> 37 1079 : MFEMInitialCondition::suppliedVariableName() const 38 : { 39 3237 : return getParam<VariableName>("variable"); 40 : } 41 : 42 : #endif