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 "MFEMBoundaryCondition.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 78316 : MFEMBoundaryCondition::validParams() 20 : { 21 78316 : InputParameters params = MFEMGeneralUserObject::validParams(); 22 78316 : params += MFEMBoundaryRestrictable::validParams(); 23 : 24 78316 : params.addClassDescription("Base class for applying boundary conditions to MFEM problems."); 25 78316 : params.registerBase("BoundaryCondition"); 26 78316 : params.addParam<VariableName>("variable", "Variable on which to apply the boundary condition"); 27 78316 : return params; 28 0 : } 29 : 30 323 : MFEMBoundaryCondition::MFEMBoundaryCondition(const InputParameters & parameters) 31 : : MFEMGeneralUserObject(parameters), 32 : MFEMBoundaryRestrictable(parameters, 33 323 : *getMFEMProblem() 34 323 : .getProblemData() 35 646 : .gridfunctions.GetRef(getParam<VariableName>("variable")) 36 : .ParFESpace() 37 323 : ->GetParMesh()), 38 969 : _test_var_name(getParam<VariableName>("variable")) 39 : { 40 323 : } 41 : 42 : #endif