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 "MFEMBoundarySubMesh.h" 13 : #include "MFEMProblem.h" 14 : 15 : registerMooseObject("MooseApp", MFEMBoundarySubMesh); 16 : 17 : InputParameters 18 8638 : MFEMBoundarySubMesh::validParams() 19 : { 20 8638 : InputParameters params = MFEMSubMesh::validParams(); 21 8638 : params += MFEMBoundaryRestrictable::validParams(); 22 : 23 8638 : params.addClassDescription("Class to construct an MFEMSubMesh formed from the subspace of the " 24 : "parent mesh restricted to the set of user-specified boundaries."); 25 8638 : return params; 26 0 : } 27 : 28 4 : MFEMBoundarySubMesh::MFEMBoundarySubMesh(const InputParameters & parameters) 29 : : MFEMSubMesh(parameters), 30 4 : MFEMBoundaryRestrictable(parameters, getMFEMProblem().mesh().getMFEMParMesh()) 31 : { 32 4 : } 33 : 34 : void 35 4 : MFEMBoundarySubMesh::buildSubMesh() 36 : { 37 8 : _submesh = std::make_shared<mfem::ParSubMesh>( 38 12 : mfem::ParSubMesh::CreateFromBoundary(getMesh(), getBoundaryAttributes())); 39 4 : } 40 : 41 : #endif