https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSubMesh.h
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 MOOSE_MFEM_ENABLED
11
12#pragma once
13
14#include "MFEMObject.h"
15
20class MFEMSubMesh : public MFEMObject
21{
22public:
24
26
28 inline std::shared_ptr<mfem::ParSubMesh> getSubMesh()
29 {
30 if (!_submesh)
32 return _submesh;
33 }
34
35protected:
37 std::shared_ptr<mfem::ParSubMesh> _submesh{nullptr};
39 virtual void buildSubMesh() = 0;
40};
41
42#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
Base class for construction of a mfem::ParSubMesh object.
Definition MFEMSubMesh.h:21
std::shared_ptr< mfem::ParSubMesh > _submesh
Stores the constructed submesh.
Definition MFEMSubMesh.h:37
std::shared_ptr< mfem::ParSubMesh > getSubMesh()
Returns a shared pointer to the constructed fespace.
Definition MFEMSubMesh.h:28
virtual void buildSubMesh()=0
Constructs the submesh.
static InputParameters validParams()
Definition MFEMSubMesh.C:16
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131