https://mooseframework.inl.gov
MFEMDomainSubMesh.C
Go to the documentation of this file.
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 "MFEMDomainSubMesh.h"
13 #include "MFEMProblem.h"
14 
16 
19 {
22  params.addClassDescription("Class to construct an MFEMSubMesh formed from the subspace of the "
23  "parent mesh restricted to the set of user-specified subdomains.");
24  return params;
25 }
26 
28  : MFEMSubMesh(parameters),
29  MFEMBlockRestrictable(parameters, getMFEMProblem().mesh().getMFEMParMesh())
30 {
31 }
32 
33 void
35 {
36  _submesh = std::make_shared<mfem::ParSubMesh>(
37  mfem::ParSubMesh::CreateFromDomain(getMesh(), getSubdomainAttributes()));
38 }
39 
40 #endif
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const mfem::Array< int > & getSubdomainAttributes()
static InputParameters validParams()
static InputParameters validParams()
Definition: MFEMSubMesh.C:16
Constructs and stores an mfem::ParSubMesh object as as a restriction of the parent mesh to the set of...
Base class for construction of a mfem::ParSubMesh object.
Definition: MFEMSubMesh.h:22
MFEMDomainSubMesh(const InputParameters &parameters)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
const mfem::ParMesh & getMesh() const
registerMooseObject("MooseApp", MFEMDomainSubMesh)
std::shared_ptr< mfem::ParSubMesh > _submesh
Stores the constructed submesh.
Definition: MFEMSubMesh.h:39
Base class for construction of an object that is restricted to a subset of subdomains of the problem ...
virtual void buildSubMesh() override
Constructs the submesh.