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 "MFEMAuxKernel.h" 13 : #include "MFEMProblem.h" 14 : 15 : InputParameters 16 21868 : MFEMAuxKernel::validParams() 17 : { 18 21868 : InputParameters params = MFEMExecutedObject::validParams(); 19 43736 : params.registerBase("AuxKernel"); 20 43736 : params.addClassDescription("Base class for MFEM objects that update auxiliary variables outside " 21 : "of the main solve step."); 22 65604 : params.addRequiredParam<AuxVariableName>("variable", 23 : "The name of the variable that this object applies to"); 24 21868 : return params; 25 0 : } 26 : 27 444 : MFEMAuxKernel::MFEMAuxKernel(const InputParameters & parameters) 28 : : MFEMExecutedObject(parameters), 29 444 : _result_var_name(getParam<AuxVariableName>("variable")), 30 888 : _result_var(*getMFEMProblem().getGridFunction(_result_var_name)) 31 : { 32 444 : } 33 : 34 : std::optional<std::string> 35 438 : MFEMAuxKernel::suppliedVariableName() const 36 : { 37 438 : return _result_var_name; 38 : } 39 : 40 : #endif