https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMBoundaryRestrictable.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 "GeneralUserObject.h"
15#include "libmesh/ignore_warnings.h"
16#include "mfem/miniapps/common/mfem-common.hpp"
17#include "libmesh/restore_warnings.h"
18
24{
25public:
27
28 MFEMBoundaryRestrictable(const InputParameters & parameters, const mfem::ParMesh & mfem_mesh);
29
31 mfem::Array<int> boundariesToAttributes(const InputParameters & parameters);
32 std::vector<std::string> boundariesToStrings();
33
35 bool isBoundaryRestricted() const { return _boundary_names.size(); }
36
37 const mfem::Array<int> & getBoundaryAttributes() { return _boundary_attributes; }
38 mfem::Array<int> & getBoundaryMarkers() { return _boundary_markers; }
39 const mfem::ParMesh & getMesh() { return _mfem_mesh; }
40
41protected:
43 const mfem::ParMesh & _mfem_mesh;
45 std::vector<BoundaryName> _boundary_names;
47 mfem::Array<int> _boundary_attributes;
49 mfem::Array<int> _boundary_markers;
50};
51
52#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for construction of an object that is restricted to a subset of boundaries of the problem ...
mfem::Array< int > _boundary_attributes
Array storing boundary attribute IDs for this object.
std::vector< BoundaryName > _boundary_names
Stores the names of the boundaries.
mfem::Array< int > _boundary_markers
Boolean array indicating which boundaries are active in this object.
std::vector< std::string > boundariesToStrings()
mfem::Array< int > & getBoundaryMarkers()
const mfem::Array< int > & getBoundaryAttributes()
const mfem::ParMesh & getMesh()
bool isBoundaryRestricted() const
Returns a bool indicating if the object is restricted to a subset of boundaries.
mfem::Array< int > boundariesToAttributes(const InputParameters &parameters)
Converts the boundary names and IDs to mesh attributes, checking that the mesh has them.
const mfem::ParMesh & _mfem_mesh
Stores the names of the boundaries.
static InputParameters validParams()