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 "MFEMKernel.h" 13 : #include "MFEMProblem.h" 14 : #include "libmesh/ignore_warnings.h" 15 : #include "mfem/miniapps/common/mesh_extras.hpp" 16 : #include "libmesh/restore_warnings.h" 17 : 18 : InputParameters 19 158112 : MFEMKernel::validParams() 20 : { 21 158112 : InputParameters params = MFEMGeneralUserObject::validParams(); 22 158112 : params += MFEMBlockRestrictable::validParams(); 23 316224 : params.registerBase("Kernel"); 24 474336 : params.addParam<VariableName>("variable", 25 : "Variable labelling the weak form this kernel is added to"); 26 158112 : return params; 27 0 : } 28 : 29 584 : MFEMKernel::MFEMKernel(const InputParameters & parameters) 30 : : MFEMGeneralUserObject(parameters), 31 : MFEMBlockRestrictable(parameters, 32 584 : *getMFEMProblem() 33 584 : .getProblemData() 34 1752 : .gridfunctions.GetRef(getParam<VariableName>("variable")) 35 : .ParFESpace() 36 584 : ->GetParMesh()), 37 2336 : _test_var_name(getParam<VariableName>("variable")) 38 : { 39 584 : } 40 : 41 : #endif