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 MFEM_ENABLED 11 : 12 : #include "MFEMAuxKernel.h" 13 : #include "MFEMProblem.h" 14 : 15 : InputParameters 16 25970 : MFEMAuxKernel::validParams() 17 : { 18 25970 : InputParameters params = MFEMGeneralUserObject::validParams(); 19 25970 : params.registerBase("AuxKernel"); 20 25970 : params.addClassDescription("Base class for MFEMGeneralUserObjects that update auxiliary " 21 : "variables outside of the main solve step."); 22 25970 : params.addRequiredParam<AuxVariableName>("variable", 23 : "The name of the variable that this object applies to"); 24 25970 : return params; 25 0 : } 26 : 27 40 : MFEMAuxKernel::MFEMAuxKernel(const InputParameters & parameters) 28 : : MFEMGeneralUserObject(parameters), 29 40 : _result_var_name(getParam<AuxVariableName>("variable")), 30 80 : _result_var(*getMFEMProblem().getProblemData().gridfunctions.Get(_result_var_name)) 31 : { 32 40 : _result_var = 0.0; 33 40 : } 34 : 35 : #endif