https://mooseframework.inl.gov
MooseMesh.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 #pragma once
11 
12 #ifdef MOOSE_KOKKOS_ENABLED
13 #include "KokkosMesh.h"
14 #endif
15 
16 #include "MooseObject.h"
17 #include "BndNode.h"
18 #include "BndElement.h"
19 #include "Restartable.h"
20 #include "MooseEnum.h"
21 #include "PerfGraphInterface.h"
22 #include "MooseHashing.h"
23 #include "MooseApp.h"
24 #include "FaceInfo.h"
25 #include "ElemInfo.h"
26 
27 #include <memory> //std::unique_ptr
28 #include <unordered_map>
29 #include <unordered_set>
30 
31 // libMesh
32 #include "libmesh/elem_range.h"
33 #include "libmesh/mesh_base.h"
34 #include "libmesh/replicated_mesh.h"
35 #include "libmesh/distributed_mesh.h"
36 #include "libmesh/node_range.h"
37 #include "libmesh/nanoflann.hpp"
38 #include "libmesh/vector_value.h"
39 #include "libmesh/point.h"
40 #include "libmesh/partitioner.h"
41 
42 class Assembly;
44 class MooseVariableBase;
46 class MooseUnits;
47 
48 // libMesh forward declarations
49 namespace libMesh
50 {
51 class ExodusII_IO;
52 class QBase;
53 class PeriodicBoundaries;
54 class Partitioner;
55 class GhostingFunctor;
56 class BoundingBox;
57 }
58 // Useful typedefs
60 
61 // List of supported geometrical elements
62 const std::string LIST_GEOM_ELEM = "EDGE EDGE2 EDGE3 EDGE4 "
63  "QUAD QUAD4 QUAD8 QUAD9 "
64  "TRI TRI3 TRI6 TRI7 "
65  "HEX HEX8 HEX20 HEX27 "
66  "TET TET4 TET10 TET14 "
67  "PRISM PRISM6 PRISM15 PRISM18 "
68  "PYRAMID PYRAMID5 PYRAMID13 PYRAMID14 "
69  "C0POLYGON C0POLYHEDRON";
70 
74 class QpMap
75 {
76 public:
77  QpMap() : _distance(std::numeric_limits<Real>::max()) {}
78 
80  unsigned int _from;
81 
83  unsigned int _to;
84 
87 };
88 
93 class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterface
94 {
95 public:
100 
106  static const std::array<bool, 3> periodic_dim_default;
107 
109  MooseMesh(const MooseMesh & other_mesh);
110  MooseMesh() = delete;
111  MooseMesh & operator=(const MooseMesh & other_mesh) = delete;
112 
113  virtual ~MooseMesh();
114 
115  // The type of libMesh::MeshBase that will be used
116  enum class ParallelType
117  {
118  DEFAULT,
119  REPLICATED,
121  };
122 
126  virtual MooseMesh & clone() const;
127 
133  virtual std::unique_ptr<MooseMesh> safeClone() const = 0;
134 
139 
145  std::unique_ptr<MeshBase> buildMeshBaseObject(unsigned int dim = libMesh::invalid_uint);
146 
154  template <typename T>
155  std::unique_ptr<T> buildTypedMesh(unsigned int dim = libMesh::invalid_uint);
156 
161  void setMeshBase(std::unique_ptr<MeshBase> mesh_base);
162 
164  static MooseEnum partitioning();
165 
167  static MooseEnum elemTypes();
168 
175  virtual void init();
176 
182  virtual void buildMesh() = 0;
183 
189  virtual unsigned int dimension() const;
190 
194  virtual unsigned int spatialDimension() const { return _mesh->spatial_dimension(); }
195 
201  virtual unsigned int effectiveSpatialDimension() const;
202 
206  unsigned int getBlocksMaxDimension(const std::vector<SubdomainName> & blocks) const;
207 
212  std::vector<BoundaryID> getBoundaryIDs(const Elem * const elem,
213  const unsigned short int side) const;
214 
218  std::vector<std::vector<BoundaryID>> getBoundaryIDs(const Elem * const elem) const;
219 
226  const Elem * getLowerDElem(const Elem *, unsigned short int) const;
227 
231  unsigned int getHigherDSide(const Elem * elem) const;
232 
240  const std::set<BoundaryID> & getBoundaryIDs() const;
241 
248  void buildNodeList();
249  void buildBndElemList();
250 
255  const std::unordered_map<dof_id_type, std::vector<dof_id_type>> & nodeToElemMap();
256 
261  struct bnd_node_iterator;
262  struct const_bnd_node_iterator;
263 
264  struct bnd_elem_iterator;
265  struct const_bnd_elem_iterator;
266 
270  virtual bnd_node_iterator bndNodesBegin();
271  virtual bnd_node_iterator bndNodesEnd();
272 
276  virtual bnd_elem_iterator bndElemsBegin();
277  virtual bnd_elem_iterator bndElemsEnd();
278 
283 
288  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> buildSideList();
289 
294  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>>
295  buildActiveSideList() const;
296 
300  unsigned int sideWithBoundaryID(const Elem * const elem, const BoundaryID boundary_id) const;
301 
305  MeshBase::node_iterator localNodesBegin();
306  MeshBase::node_iterator localNodesEnd();
307  MeshBase::const_node_iterator localNodesBegin() const;
308  MeshBase::const_node_iterator localNodesEnd() const;
309 
313  MeshBase::element_iterator activeLocalElementsBegin();
314  const MeshBase::element_iterator activeLocalElementsEnd();
315  MeshBase::const_element_iterator activeLocalElementsBegin() const;
316  const MeshBase::const_element_iterator activeLocalElementsEnd() const;
317 
321  virtual dof_id_type nNodes() const;
322  virtual dof_id_type nElem() const;
323 
324  virtual dof_id_type nLocalNodes() const { return _mesh->n_local_nodes(); }
325  virtual dof_id_type nActiveElem() const { return _mesh->n_active_elem(); }
326  virtual dof_id_type nActiveLocalElem() const { return _mesh->n_active_local_elem(); }
327  // NOTE: Expensive operation (iterates through all elements to gather subdomains)
328  virtual SubdomainID nSubdomains() const { return _mesh->n_subdomains(); }
329  virtual unsigned int nPartitions() const { return _mesh->n_partitions(); }
330  virtual bool skipPartitioning() const { return _mesh->skip_partitioning(); }
331  virtual bool skipNoncriticalPartitioning() const;
332 
338  virtual dof_id_type maxNodeId() const;
339  virtual dof_id_type maxElemId() const;
340 
347  virtual const Node & node(const dof_id_type i) const;
348  virtual Node & node(const dof_id_type i);
349  virtual const Node & nodeRef(const dof_id_type i) const;
350  virtual Node & nodeRef(const dof_id_type i);
351  virtual const Node * nodePtr(const dof_id_type i) const;
352  virtual Node * nodePtr(const dof_id_type i);
353  virtual const Node * queryNodePtr(const dof_id_type i) const;
354  virtual Node * queryNodePtr(const dof_id_type i);
355 
362  virtual Elem * elem(const dof_id_type i);
363  virtual const Elem * elem(const dof_id_type i) const;
364  virtual Elem * elemPtr(const dof_id_type i);
365  virtual const Elem * elemPtr(const dof_id_type i) const;
366  virtual Elem * queryElemPtr(const dof_id_type i);
367  virtual const Elem * queryElemPtr(const dof_id_type i) const;
368 
372  bool prepared() const;
373  virtual void prepared(bool state);
374 
380  void needsPrepareForUse();
381 
387  void meshChanged();
388 
394  virtual void onMeshChanged();
395 
399  void cacheChangedLists();
400 
408 
416 
423  const std::vector<const Elem *> & coarsenedElementChildren(const Elem * elem) const;
424 
429  void updateActiveSemiLocalNodeRange(std::set<dof_id_type> & ghosted_elems);
430 
436  bool isSemiLocal(Node * const node) const;
437 
439 
452 
456  const std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> &
457  getBoundariesToElems() const;
458 
462  const std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> &
464 
470  std::unordered_set<dof_id_type> getBoundaryActiveSemiLocalElemIds(BoundaryID bid) const;
471 
481  std::unordered_set<dof_id_type> getBoundaryActiveNeighborElemIds(BoundaryID bid) const;
482 
491  const std::set<SubdomainID> & blk_group) const;
492 
497  const std::set<SubdomainID> & meshSubdomains() const;
498 
503  const std::set<BoundaryID> & meshBoundaryIds() const;
504 
509  const std::set<BoundaryID> & meshSidesetIds() const;
510 
515  const std::set<BoundaryID> & meshNodesetIds() const;
516 
521  void setBoundaryToNormalMap(std::unique_ptr<std::map<BoundaryID, RealVectorValue>> boundary_map);
522 
523  // DEPRECATED METHOD
524  void setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map);
525 
530  void setMeshBoundaryIDs(std::set<BoundaryID> boundary_IDs);
531 
537 
555  bool prepare(const MeshBase * mesh_to_clone);
556 
560  void update();
561 
565  unsigned int uniformRefineLevel() const;
566 
570  void setUniformRefineLevel(unsigned int, bool deletion = true);
571 
583 
588 
592  void addGhostedBoundary(BoundaryID boundary_id);
593 
598  void setGhostedBoundaryInflation(const std::vector<Real> & inflation);
599 
603  const std::set<unsigned int> & getGhostedBoundaries() const;
604 
608  const std::vector<Real> & getGhostedBoundaryInflation() const;
609 
613  void ghostGhostedBoundaries();
614 
618  void needGhostGhostedBoundaries(bool needghost) { _need_ghost_ghosted_boundaries = needghost; }
619 
623  unsigned int getPatchSize() const;
624 
628  unsigned int getGhostingPatchSize() const { return _ghosting_patch_size; }
629 
633  unsigned int getMaxLeafSize() const { return _max_leaf_size; }
634 
638  void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy);
639 
644 
651  libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const;
652 
656  operator libMesh::MeshBase &();
657  operator const libMesh::MeshBase &() const;
658 
662  MeshBase & getMesh();
663  MeshBase & getMesh(const std::string & name);
664  const MeshBase & getMesh() const;
665  const MeshBase & getMesh(const std::string & name) const;
666  const MeshBase * getMeshPtr() const;
667 
671 #ifdef MOOSE_KOKKOS_ENABLED
673  const Moose::Kokkos::Mesh * getKokkosMesh() const { return _kokkos_mesh.get(); }
674 #endif
675 
679  void printInfo(std::ostream & os = libMesh::out, const unsigned int verbosity = 0) const;
680 
684  const std::set<SubdomainID> & getNodeBlockIds(const Node & node) const;
685 
690  const std::vector<dof_id_type> & getNodeList(boundary_id_type nodeset_id) const;
691 
697  const Node * addUniqueNode(const Point & p, Real tol = 1e-6);
698 
712  Node * addQuadratureNode(const Elem * elem,
713  const unsigned short int side,
714  const unsigned int qp,
715  BoundaryID bid,
716  const Point & point);
717 
725  Node * getQuadratureNode(const Elem * elem, const unsigned short int side, const unsigned int qp);
726 
731  void clearQuadratureNodes();
732 
739  BoundaryID getBoundaryID(const BoundaryName & boundary_name) const;
740 
747  std::vector<BoundaryID> getBoundaryIDs(const std::vector<BoundaryName> & boundary_name,
748  bool generate_unknown = false) const;
749 
756  SubdomainID getSubdomainID(const SubdomainName & subdomain_name) const;
757 
764  std::vector<SubdomainID>
765  getSubdomainIDs(const std::vector<SubdomainName> & subdomain_names) const;
766  std::set<SubdomainID> getSubdomainIDs(const std::set<SubdomainName> & subdomain_names) const;
767 
771  void setSubdomainName(SubdomainID subdomain_id, const SubdomainName & name);
772 
776  static void
777  setSubdomainName(MeshBase & mesh, SubdomainID subdomain_id, const SubdomainName & name);
778 
782  const std::string & getSubdomainName(SubdomainID subdomain_id) const;
783 
790  std::vector<SubdomainName>
791  getSubdomainNames(const std::vector<SubdomainID> & subdomain_ids) const;
792 
796  void setBoundaryName(BoundaryID boundary_id, BoundaryName name);
797 
801  const std::string & getBoundaryName(const BoundaryID boundary_id) const;
802 
807  std::string getBoundaryString(const BoundaryID boundary_id) const;
808 
814  void buildPeriodicNodeMap(std::multimap<dof_id_type, dof_id_type> & periodic_node_map,
815  unsigned int var_number,
816  libMesh::PeriodicBoundaries * pbs) const;
817 
821  void buildPeriodicNodeSets(std::map<BoundaryID, std::set<dof_id_type>> & periodic_node_sets,
822  unsigned int var_number,
823  libMesh::PeriodicBoundaries * pbs) const;
824 
828  Real dimensionWidth(unsigned int component) const;
829 
831 
834  virtual Real getMinInDimension(unsigned int component) const;
835  virtual Real getMaxInDimension(unsigned int component) const;
837 
848  bool detectOrthogonalDimRanges(Real tol = 1e-6);
849 
854  void addPeriodicVariable(const unsigned int sys_num,
855  const unsigned int var_num,
856  const BoundaryID primary,
857  const BoundaryID secondary);
858 
868  const std::array<bool, 3> & queryPeriodicDimensions(const unsigned int sys_num,
869  const unsigned int var_num) const;
878  const std::array<bool, 3> & queryPeriodicDimensions(const MooseVariableBase & var) const;
879 
887  bool isTranslatedPeriodic(const unsigned int sys_num,
888  const unsigned int var_num,
889  const unsigned int component) const;
890 
896  bool isTranslatedPeriodic(const MooseVariableBase & var, const unsigned int component) const;
897 
907  bool isTranslatedPeriodic(const unsigned int var_num, const unsigned int component) const;
908 
918  minPeriodicVector(const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const;
919 
928  minPeriodicVector(const MooseVariableBase & var, const Point & p, const Point & q) const;
929 
942  minPeriodicVector(const unsigned int var_num, const Point & p, const Point & q) const;
943 
952  Real minPeriodicDistance(const unsigned int sys_num,
953  const unsigned int var_num,
954  const Point & p,
955  const Point & q) const;
956 
964  Real minPeriodicDistance(const MooseVariableBase & var, const Point & p, const Point & q) const;
965 
977  Real minPeriodicDistance(const unsigned int var_num, const Point & p, const Point & q) const;
978 
985  void detectPairedSidesets();
986 
990  bool hasDetectedPairedSidesets() const { return _paired_boundary.has_value(); }
991 
1001  const std::pair<BoundaryID, BoundaryID> * getPairedBoundaryMapping(unsigned int component) const;
1002 
1009  void buildRefinementAndCoarseningMaps(Assembly * assembly);
1010 
1020  const std::vector<std::vector<QpMap>> &
1021  getRefinementMap(const Elem & elem, int parent_side, int child, int child_side);
1022 
1030  const std::vector<std::pair<unsigned int, QpMap>> & getCoarseningMap(const Elem & elem,
1031  int input_side);
1032 
1037  void
1038  changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev);
1039 
1044  static void changeBoundaryId(MeshBase & mesh,
1045  const boundary_id_type old_id,
1046  const boundary_id_type new_id,
1047  bool delete_prev);
1048 
1055  const std::set<BoundaryID> & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const;
1056 
1063  std::set<BoundaryID> getSubdomainInterfaceBoundaryIds(const SubdomainID subdomain_id) const;
1064 
1071  std::set<SubdomainID> getBoundaryConnectedBlocks(const BoundaryID bid) const;
1072 
1079  std::set<SubdomainID> getBoundaryConnectedSecondaryBlocks(const BoundaryID bid) const;
1080 
1087  std::set<SubdomainID> getInterfaceConnectedBlocks(const BoundaryID bid) const;
1088 
1095  const std::set<SubdomainID> & getBlockConnectedBlocks(const SubdomainID subdomain_id) const;
1096 
1100  bool isBoundaryNode(dof_id_type node_id) const;
1101 
1106  bool isBoundaryNode(dof_id_type node_id, BoundaryID bnd_id) const;
1107 
1111  bool isBoundaryElem(dof_id_type elem_id) const;
1112 
1117  bool isBoundaryElem(dof_id_type elem_id, BoundaryID bnd_id) const;
1118 
1126  void errorIfDistributedMesh(std::string name) const;
1127 
1131  virtual bool isDistributedMesh() const { return _use_distributed_mesh; }
1132 
1137 
1141  void setParallelType(ParallelType parallel_type);
1142 
1147 
1148  /*
1149  * Set/Get the partitioner name
1150  */
1151  const MooseEnum & partitionerName() const { return _partitioner_name; }
1152 
1157 
1161  void allowRecovery(bool allow) { _allow_recovery = allow; }
1162 
1166  static void setPartitioner(MeshBase & mesh_base,
1167  MooseEnum & partitioner,
1168  bool use_distributed_mesh,
1169  const InputParameters & params,
1170  MooseObject & context_obj);
1171 
1175  void setCustomPartitioner(libMesh::Partitioner * partitioner);
1176 
1178 
1181  bool isCustomPartitionerRequested() const;
1182  void setIsCustomPartitionerRequested(bool cpr);
1184 
1187 
1189  bool hasSecondOrderElements();
1190 
1195  virtual std::unique_ptr<libMesh::PointLocatorBase> getPointLocator() const;
1196 
1201  virtual std::string getFileName() const { return ""; }
1202 
1204  using PeriodicNodeInfo = std::pair<const Node *, BoundaryID>;
1205 
1209  void needsRemoteElemDeletion(bool need_delete) { _need_delete = need_delete; }
1210 
1214  bool needsRemoteElemDeletion() const { return _need_delete; }
1215 
1219  void allowRemoteElementRemoval(bool allow_removal);
1220 
1225 
1229  void deleteRemoteElements();
1230 
1234  bool hasMeshBase() const { return _mesh.get() != nullptr; }
1235 
1239  bool hasElementID(const std::string & id_name) const;
1240 
1244  unsigned int getElementIDIndex(const std::string & id_name) const;
1245 
1249  dof_id_type maxElementID(unsigned int elem_id_index) const { return _max_ids[elem_id_index]; }
1250 
1254  dof_id_type minElementID(unsigned int elem_id_index) const { return _min_ids[elem_id_index]; }
1255 
1259  bool areElemIDsIdentical(const std::string & id_name1, const std::string & id_name2) const;
1260 
1264  std::set<dof_id_type> getAllElemIDs(unsigned int elem_id_index) const;
1265 
1270  std::set<dof_id_type> getElemIDsOnBlocks(unsigned int elem_id_index,
1271  const std::set<SubdomainID> & blks) const;
1272 
1276  unsigned int getMaxSidesPerElem() const { return _max_sides_per_elem; }
1277 
1281  unsigned int getMaxNodesPerElem() const { return _max_nodes_per_elem; }
1282 
1286  unsigned int getMaxNodesPerSide() const { return _max_nodes_per_side; }
1287 
1288  std::unordered_map<dof_id_type, std::set<dof_id_type>>
1289  getElemIDMapping(const std::string & from_id_name, const std::string & to_id_name) const;
1290 
1292  unsigned int nFace() const { return _face_info.size(); }
1293 
1295  const std::vector<const FaceInfo *> & faceInfo() const;
1296 
1298  struct face_info_iterator;
1299  struct const_face_info_iterator;
1300 
1305  face_info_iterator ownedFaceInfoBegin();
1306  face_info_iterator ownedFaceInfoEnd();
1307 
1309  struct elem_info_iterator;
1310  struct const_elem_info_iterator;
1311 
1316  elem_info_iterator ownedElemInfoBegin();
1317  elem_info_iterator ownedElemInfoEnd();
1318 
1320  const FaceInfo * faceInfo(const Elem * elem, unsigned int side) const;
1321 
1323  const ElemInfo & elemInfo(const dof_id_type id) const;
1324 
1326  const std::vector<const ElemInfo *> & elemInfoVector() const { return _elem_info; }
1327 
1329  const std::vector<FaceInfo> & allFaceInfo() const;
1331 
1335  void cacheFaceInfoVariableOwnership() const;
1336 
1341  void cacheFVElementalDoFs() const;
1342 
1348  void computeFiniteVolumeCoords() const;
1349 
1353  void isDisplaced(bool is_displaced) { _is_displaced = is_displaced; }
1354 
1358  bool isDisplaced() const { return _is_displaced; }
1359 
1363  const std::map<boundary_id_type, std::vector<dof_id_type>> & nodeSetNodes() const;
1364 
1370 
1376 
1380  const std::map<SubdomainID, Moose::CoordinateSystemType> & getCoordSystem() const;
1381 
1385  void setCoordSystem(const std::vector<SubdomainName> & blocks, const MultiMooseEnum & coord_sys);
1386 
1391  void setAxisymmetricCoordAxis(const MooseEnum & rz_coord_axis);
1392 
1407  void setGeneralAxisymmetricCoordAxes(const std::vector<SubdomainName> & blocks,
1408  const std::vector<std::pair<Point, RealVectorValue>> & axes);
1409 
1415  const std::pair<Point, RealVectorValue> &
1416  getGeneralAxisymmetricCoordAxis(SubdomainID subdomain_id) const;
1417 
1421  bool usingGeneralAxisymmetricCoordAxes() const;
1422 
1427  unsigned int getAxisymmetricRadialCoord() const;
1428 
1434  void checkCoordinateSystems();
1435 
1439  void setCoordData(const MooseMesh & other_mesh);
1440 
1445 
1450 
1456 
1460  const MooseUnits & lengthUnit() const;
1461 
1466  const std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *> &
1467  getLowerDElemMap() const;
1468 
1472  bool isSplit() const { return _is_split; }
1473 
1480  void buildFiniteVolumeInfo() const;
1481 
1487  void setupFiniteVolumeMeshData() const;
1488 
1492  void doingPRefinement(bool doing_p_refinement) { _doing_p_refinement = doing_p_refinement; }
1493 
1497  [[nodiscard]] bool doingPRefinement() const { return _doing_p_refinement; }
1498 
1502  unsigned int maxPLevel() const { return _max_p_level; }
1503 
1507  unsigned int maxHLevel() const { return _max_h_level; }
1508 
1513  const std::vector<QpMap> & getPRefinementMap(const Elem & elem) const;
1518  const std::vector<QpMap> & getPRefinementSideMap(const Elem & elem) const;
1523  const std::vector<QpMap> & getPCoarseningMap(const Elem & elem) const;
1528  const std::vector<QpMap> & getPCoarseningSideMap(const Elem & elem) const;
1529 
1531 
1535  bool hasLowerD() const { return getMesh().elem_dimensions().size() > 1; }
1536 
1540  const std::set<SubdomainID> & interiorLowerDBlocks() const { return _lower_d_interior_blocks; }
1544  const std::set<SubdomainID> & boundaryLowerDBlocks() const { return _lower_d_boundary_blocks; }
1545 
1548 
1551 
1558 
1559 protected:
1561  std::vector<std::unique_ptr<libMesh::GhostingFunctor>> _ghosting_functors;
1562 
1564  std::vector<std::shared_ptr<RelationshipManager>> _relationship_managers;
1565 
1568 
1572 
1579 
1581  std::unique_ptr<libMesh::MeshBase> _mesh;
1582 
1584 #ifdef MOOSE_KOKKOS_ENABLED
1585  std::unique_ptr<Moose::Kokkos::Mesh> _kokkos_mesh;
1586 #endif
1587 
1591 
1593  std::unique_ptr<libMesh::Partitioner> _custom_partitioner;
1595 
1597  enum
1598  {
1599  X = 0,
1600  Y,
1602  };
1603  enum
1604  {
1605  MIN = 0,
1607  };
1608 
1611 
1614 
1617 
1620 
1623 
1625  bool _moose_mesh_prepared = false;
1626 
1628  std::unique_ptr<ConstElemPointerRange> _refined_elements;
1629 
1631  std::unique_ptr<ConstElemPointerRange> _coarsened_elements;
1632 
1638  std::map<const Elem *, std::vector<const Elem *>> _coarsened_element_children;
1639 
1641  std::set<Node *> _semilocal_node_list;
1642 
1647  std::unique_ptr<libMesh::ConstElemRange> _active_local_elem_range;
1648 
1649  std::unique_ptr<SemiLocalNodeRange> _active_semilocal_node_range;
1650  std::unique_ptr<libMesh::NodeRange> _active_node_range;
1651  std::unique_ptr<libMesh::ConstNodeRange> _local_node_range;
1652  std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *>>
1654  std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *>>
1656 
1658  std::unordered_map<dof_id_type, std::vector<dof_id_type>> _node_to_elem_map;
1659 
1662 
1667  std::set<SubdomainID> _mesh_subdomains;
1668 
1670 
1675  std::set<BoundaryID> _mesh_boundary_ids;
1676  std::set<BoundaryID> _mesh_sideset_ids;
1677  std::set<BoundaryID> _mesh_nodeset_ids;
1679 
1681  std::unique_ptr<std::map<BoundaryID, RealVectorValue>> _boundary_to_normal_map;
1682 
1684  std::vector<BndNode *> _bnd_nodes;
1685  typedef std::vector<BndNode *>::iterator bnd_node_iterator_imp;
1686  typedef std::vector<BndNode *>::const_iterator const_bnd_node_iterator_imp;
1688  std::map<boundary_id_type, std::set<dof_id_type>> _bnd_node_ids;
1689 
1691  std::vector<BndElement *> _bnd_elems;
1692  typedef std::vector<BndElement *>::iterator bnd_elem_iterator_imp;
1693  typedef std::vector<BndElement *>::const_iterator const_bnd_elem_iterator_imp;
1694 
1696  std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> _bnd_elem_ids;
1697 
1698  std::map<dof_id_type, Node *> _quadrature_nodes;
1699  std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *>>>
1701  std::vector<BndNode> _extra_bnd_nodes;
1702 
1704  std::map<dof_id_type, std::set<SubdomainID>> _block_node_list;
1705 
1707  std::map<boundary_id_type, std::vector<dof_id_type>> _node_set_nodes;
1708 
1709  std::set<unsigned int> _ghosted_boundaries;
1711 
1713  unsigned int _patch_size;
1714 
1716  unsigned int _ghosting_patch_size;
1717 
1718  // The maximum number of points in each leaf of the KDTree used in the nearest neighbor search.
1719  unsigned int _max_leaf_size;
1720 
1723 
1725  std::vector<Node *> _node_map;
1726 
1729 
1731  std::vector<std::vector<Real>> _bounds;
1732 
1734  std::optional<std::vector<std::pair<BoundaryID, BoundaryID>>> _paired_boundary;
1735 
1737  const bool _is_split;
1738 
1739  void cacheInfo();
1740  void freeBndNodes();
1741  void freeBndElems();
1742  void setPartitionerHelper(MeshBase * mesh = nullptr);
1743 
1744 private:
1749  std::unordered_map<dof_id_type, std::vector<dof_id_type>> & internalNodeToElemMap();
1750 
1753  mutable std::unordered_map<dof_id_type, ElemInfo> _elem_to_elem_info;
1754 
1757  mutable std::vector<const ElemInfo *> _elem_info;
1758 
1761  mutable std::vector<FaceInfo> _all_face_info;
1762 
1765  mutable std::vector<const FaceInfo *> _face_info;
1766 
1768  mutable std::unordered_map<std::pair<const Elem *, unsigned int>, FaceInfo *>
1770 
1771  // true if the _face_info member needs to be rebuilt/updated.
1772  mutable bool _finite_volume_info_dirty = true;
1773 
1774  // True if we have cached elemental dofs ids for the linear finite volume variables.
1775  // This happens in the first system which has a linear finite volume variable, considering
1776  // that currently we only support one variable per linear system.
1778 
1785  std::map<std::pair<unsigned int, unsigned int>, std::array<bool, 3>> _periodic_dim;
1786 
1791 
1793  std::vector<Node *> _extreme_nodes;
1794 
1806  void buildRefinementMap(const Elem & elem,
1807  libMesh::QBase & qrule,
1808  libMesh::QBase & qrule_face,
1809  int parent_side,
1810  int child,
1811  int child_side);
1812 
1822  void buildCoarseningMap(const Elem & elem,
1823  libMesh::QBase & qrule,
1824  libMesh::QBase & qrule_face,
1825  int input_side);
1826 
1835  void mapPoints(const std::vector<Point> & from,
1836  const std::vector<Point> & to,
1837  std::vector<QpMap> & qp_map);
1838 
1861  void findAdaptivityQpMaps(const Elem * template_elem,
1862  libMesh::QBase & qrule,
1863  libMesh::QBase & qrule_face,
1864  std::vector<std::vector<QpMap>> & refinement_map,
1865  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map,
1866  int parent_side,
1867  int child,
1868  int child_side);
1869 
1871 
1872  const std::vector<QpMap> & getPRefinementMapHelper(
1873  const Elem & elem,
1874  const std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>> &) const;
1875  const std::vector<QpMap> & getPCoarseningMapHelper(
1876  const Elem & elem,
1877  const std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>> &) const;
1878 
1883  void updateCoordTransform();
1884 
1890 
1904  std::map<std::pair<int, libMesh::ElemType>, std::vector<std::vector<QpMap>>>
1906 
1907  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1909  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1911 
1913  std::map<libMesh::ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap>>>>
1915 
1930  std::map<std::pair<int, libMesh::ElemType>, std::vector<std::pair<unsigned int, QpMap>>>
1932 
1933  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1935  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1937 
1939  {
1941  std::set<SubdomainID> neighbor_subs;
1942 
1945  std::set<BoundaryID> boundary_ids;
1946  };
1947 
1949  std::unordered_map<SubdomainID, SubdomainData> _sub_to_data;
1950 
1952  std::unordered_map<SubdomainID, std::set<BoundaryID>> _neighbor_subdomain_boundary_ids;
1953 
1955  std::set<SubdomainID> _lower_d_interior_blocks;
1957  std::set<SubdomainID> _lower_d_boundary_blocks;
1959  std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *>
1961  std::unordered_map<const Elem *, unsigned short int> _lower_d_elem_to_higher_d_elem_side;
1962 
1965 
1968 
1972 
1975 
1978 
1981 
1987 
1989  std::vector<std::unordered_map<SubdomainID, std::set<dof_id_type>>> _block_id_mapping;
1991  std::vector<dof_id_type> _max_ids;
1993  std::vector<dof_id_type> _min_ids;
1995  std::vector<std::vector<bool>> _id_identical_flag;
1996 
1998  unsigned int _max_sides_per_elem;
1999 
2001  unsigned int _max_nodes_per_elem;
2002 
2004  unsigned int _max_nodes_per_side;
2005 
2007  void computeMaxPerElemAndSide();
2008 
2011 
2013  void buildElemIDInfo();
2014 
2016  void buildLowerDMesh();
2017 
2019  std::map<SubdomainID, Moose::CoordinateSystemType> & _coord_sys;
2020 
2022  unsigned int _rz_coord_axis;
2023 
2025  std::unordered_map<SubdomainID, std::pair<Point, RealVectorValue>> _subdomain_id_to_rz_coord_axis;
2026 
2029  std::unique_ptr<MooseAppCoordTransform> _coord_transform;
2030 
2033 
2035  std::vector<SubdomainName> _provided_coord_blocks;
2036 
2040  unsigned int _max_p_level;
2042  unsigned int _max_h_level;
2043 
2044  template <typename T>
2045  struct MeshType;
2046 };
2047 
2048 inline MooseAppCoordTransform &
2050 {
2051  mooseAssert(_coord_transform, "The coordinate transformation object is null.");
2052  return *_coord_transform;
2053 }
2054 
2055 template <>
2056 struct MooseMesh::MeshType<libMesh::ReplicatedMesh>
2057 {
2059 };
2060 
2061 template <>
2062 struct MooseMesh::MeshType<libMesh::DistributedMesh>
2063 {
2065 };
2066 
2071  : variant_filter_iterator<MeshBase::Predicate, const FaceInfo *>
2072 {
2073  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2074  template <typename PredType, typename IterType>
2075  face_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2076  : variant_filter_iterator<MeshBase::Predicate, const FaceInfo *>(d, e, p)
2077  {
2078  }
2079 };
2080 
2086  const FaceInfo * const,
2087  const FaceInfo * const &,
2088  const FaceInfo * const *>
2089 {
2090  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2091  template <typename PredType, typename IterType>
2092  const_face_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2093  : variant_filter_iterator<MeshBase::Predicate,
2094  const FaceInfo * const,
2095  const FaceInfo * const &,
2096  const FaceInfo * const *>(d, e, p)
2097  {
2098  }
2099 
2100  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2101  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2103  : variant_filter_iterator<MeshBase::Predicate,
2104  const FaceInfo * const,
2105  const FaceInfo * const &,
2106  const FaceInfo * const *>(rhs)
2107  {
2108  }
2109 };
2110 
2115  : variant_filter_iterator<MeshBase::Predicate, const ElemInfo *>
2116 {
2117  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2118  template <typename PredType, typename IterType>
2119  elem_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2120  : variant_filter_iterator<MeshBase::Predicate, const ElemInfo *>(d, e, p)
2121  {
2122  }
2123 };
2124 
2130  const ElemInfo * const,
2131  const ElemInfo * const &,
2132  const ElemInfo * const *>
2133 {
2134  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2135  template <typename PredType, typename IterType>
2136  const_elem_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2137  : variant_filter_iterator<MeshBase::Predicate,
2138  const ElemInfo * const,
2139  const ElemInfo * const &,
2140  const ElemInfo * const *>(d, e, p)
2141  {
2142  }
2143 
2144  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2145  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2147  : variant_filter_iterator<MeshBase::Predicate,
2148  const ElemInfo * const,
2149  const ElemInfo * const &,
2150  const ElemInfo * const *>(rhs)
2151  {
2152  }
2153 };
2154 
2158 struct MooseMesh::bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate, BndNode *>
2159 {
2160  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2161  template <typename PredType, typename IterType>
2162  bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
2163  : variant_filter_iterator<MeshBase::Predicate, BndNode *>(d, e, p)
2164  {
2165  }
2166 };
2167 
2173  BndNode * const,
2174  BndNode * const &,
2175  BndNode * const *>
2176 {
2177  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2178  template <typename PredType, typename IterType>
2179  const_bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
2180  : variant_filter_iterator<MeshBase::Predicate,
2181  BndNode * const,
2182  BndNode * const &,
2183  BndNode * const *>(d, e, p)
2184  {
2185  }
2186 
2187  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2188  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2190  : variant_filter_iterator<MeshBase::Predicate,
2191  BndNode * const,
2192  BndNode * const &,
2193  BndNode * const *>(rhs)
2194  {
2195  }
2196 };
2197 
2201 struct MooseMesh::bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate, BndElement *>
2202 {
2203  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2204  template <typename PredType, typename IterType>
2205  bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
2206  : variant_filter_iterator<MeshBase::Predicate, BndElement *>(d, e, p)
2207  {
2208  }
2209 };
2210 
2216  BndElement * const,
2217  BndElement * const &,
2218  BndElement * const *>
2219 {
2220  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2221  template <typename PredType, typename IterType>
2222  const_bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
2223  : variant_filter_iterator<MeshBase::Predicate,
2224  BndElement * const,
2225  BndElement * const &,
2226  BndElement * const *>(d, e, p)
2227  {
2228  }
2229 
2230  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2231  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2233  : variant_filter_iterator<MeshBase::Predicate,
2234  BndElement * const,
2235  BndElement * const &,
2236  BndElement * const *>(rhs)
2237  {
2238  }
2239 };
2240 
2248 
2249 template <typename T>
2250 std::unique_ptr<T>
2252 {
2253  // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh,
2254  // then we need to make sure to make our state consistent because other objects, like the periodic
2255  // boundary condition action, will be querying isDistributedMesh()
2256  if (_use_distributed_mesh != std::is_same<T, libMesh::DistributedMesh>::value)
2257  {
2258  if (getMeshPtr())
2259  mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different "
2260  "parallel type than the libMesh mesh that it wraps. This is not allowed. Please "
2261  "create another MooseMesh object to wrap the new libMesh mesh");
2263  }
2264 
2265  if (dim == libMesh::invalid_uint)
2266  {
2267  if (isParamValid("dim"))
2268  dim = getParam<MooseEnum>("dim");
2269  else
2270  // Legacy selection of the default for the 'dim' parameter
2271  dim = 1;
2272  }
2273 
2274  auto mesh = std::make_unique<T>(_communicator, dim);
2275 
2276  if (!getParam<bool>("allow_renumbering"))
2277  mesh->allow_renumbering(false);
2278 
2279  mesh->allow_remote_element_removal(_allow_remote_element_removal);
2281 
2283  {
2284  // Check of partitioner is supplied (not allowed if custom partitioner is used)
2285  if (!parameters().isParamSetByAddParam("partitioner"))
2286  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2287  // Set custom partitioner
2288  if (!_custom_partitioner.get())
2289  mooseError("Custom partitioner requested but not set!");
2290  mesh->partitioner() = _custom_partitioner->clone();
2291  }
2292  else
2293  setPartitionerHelper(mesh.get());
2294 
2295  return mesh;
2296 }
2297 
2298 inline bool
2300 {
2302 }
2303 
2304 inline void
2306 {
2307  _parallel_type = parallel_type;
2309 }
2310 
2311 inline bool
2312 MooseMesh::hasElementID(const std::string & id_name) const
2313 {
2314  return getMesh().has_elem_integer(id_name);
2315 }
2316 
2317 inline unsigned int
2318 MooseMesh::getElementIDIndex(const std::string & id_name) const
2319 {
2320  if (!hasElementID(id_name))
2321  mooseError("Mesh does not have element ID for ", id_name);
2322  return getMesh().get_elem_integer_index(id_name);
2323 }
2324 
2325 inline bool
2326 MooseMesh::areElemIDsIdentical(const std::string & id_name1, const std::string & id_name2) const
2327 {
2328  auto id1 = getElementIDIndex(id_name1);
2329  auto id2 = getElementIDIndex(id_name2);
2330  return _id_identical_flag[id1][id2];
2331 }
2332 
2333 inline const std::vector<const FaceInfo *> &
2335 {
2336  return _face_info;
2337 }
2338 
2339 inline const std::vector<FaceInfo> &
2341 {
2342  return _all_face_info;
2343 }
2344 
2345 inline const std::map<boundary_id_type, std::vector<dof_id_type>> &
2347 {
2348  return _node_set_nodes;
2349 }
2350 
2351 inline const std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *> &
2353 {
2355 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1571
bool hasDetectedPairedSidesets() const
Whether or not detectedPairedSidesets() has been called.
Definition: MooseMesh.h:990
static InputParameters validParams()
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:82
virtual std::string getFileName() const
Returns the name of the mesh file read to produce this mesh if any or an empty string otherwise...
Definition: MooseMesh.h:1201
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:1549
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:1565
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1731
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes() const
Definition: MooseMesh.h:2346
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:1641
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1698
const std::vector< QpMap > & getPCoarseningSideMap(const Elem &elem) const
Get the map describing for each side quadrature point (qp) on the coarse level which qp on the previo...
Definition: MooseMesh.C:4516
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:2193
virtual unsigned int spatialDimension() const
Returns MeshBase::spatial_dimension.
Definition: MooseMesh.h:194
bool _node_to_elem_map_built
Whether _node_to_elem_map has been built.
Definition: MooseMesh.h:1661
std::unique_ptr< libMesh::NodeRange > _active_node_range
Definition: MooseMesh.h:1650
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1793
RealVectorValue minPeriodicVector(const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const
Returns the minimum vector between two points on the mesh taking into account periodicity for the giv...
Node * addQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
Adds a fictitious "QuadratureNode".
Definition: MooseMesh.C:1606
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList()
Calls BoundaryInfo::build_side_list(), returns a std::vector of (elem-id, side-id, bc-id) tuples.
Definition: MooseMesh.C:3109
const_bnd_elem_iterator(const bnd_elem_iterator &rhs)
Definition: MooseMesh.h:2232
bool isFiniteVolumeInfoDirty() const
Definition: MooseMesh.h:1449
void computeMaxPerElemAndSide()
Compute the maximum numbers per element and side.
Definition: MooseMesh.C:1063
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition: MooseMesh.C:3289
void buildElemIDInfo()
Build extra data for faster access to the information of extra element integers.
Definition: MooseMesh.C:1086
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1761
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1765
bool allowRemoteElementRemoval() const
Whether we are allow remote element removal.
Definition: MooseMesh.h:1224
bool getConstructNodeListFromSideList()
Return construct node list from side list boolean.
Definition: MooseMesh.h:1547
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:2184
bool possiblyRebuildNodeToElemMap()
rebuild the node to element map if it&#39;s been requsted previously
Definition: MooseMesh.C:602
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1240
The Kokkos mesh object.
Definition: KokkosMesh.h:52
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:912
bool prepared() const
Setter/getter for whether the mesh is prepared.
Definition: MooseMesh.C:3237
void needsPrepareForUse()
If this method is called, we will call libMesh&#39;s prepare_for_use method when we call Moose&#39;s prepare ...
Definition: MooseMesh.C:3265
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:3042
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1622
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:2035
virtual MooseMesh & clone() const
Clone method.
Definition: MooseMesh.C:2883
void allowRecovery(bool allow)
Set whether or not this mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1161
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4488
const std::string LIST_GEOM_ELEM
Definition: MooseMesh.h:62
bool isCustomPartitionerRequested() const
Setter and getter for _custom_partitioner_requested.
Definition: MooseMesh.C:3809
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1986
A class for creating restricted objects.
Definition: Restartable.h:28
bool isDisplaced() const
whether this mesh is a displaced mesh
Definition: MooseMesh.h:1358
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1610
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4477
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition: MooseMesh.h:1993
std::unordered_set< dof_id_type > getBoundaryActiveSemiLocalElemIds(BoundaryID bid) const
Return all ids of elements which have a side which is part of a sideset.
Definition: MooseMesh.C:1331
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1540
const MooseUnits & lengthUnit() const
Definition: MooseMesh.C:4450
void checkDuplicateSubdomainNames()
Loop through all subdomain IDs and check if there is name duplication used for the subdomains with sa...
Definition: MooseMesh.C:4457
const unsigned int invalid_uint
const std::set< BoundaryID > & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundary ids associated with the given subdomain id.
Definition: MooseMesh.C:3597
unsigned int _max_leaf_size
Definition: MooseMesh.h:1719
The definition of the const_bnd_elem_iterator struct.
Definition: MooseMesh.h:2215
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1790
Keeps track of stuff related to assembling.
Definition: Assembly.h:109
const_bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2222
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).
Definition: MooseMesh.h:1914
void setCoordData(const MooseMesh &other_mesh)
Set the coordinate system data to that of other_mesh.
Definition: MooseMesh.C:4442
virtual ~MooseMesh()
Definition: MooseMesh.C:344
void freeBndElems()
Definition: MooseMesh.C:371
const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > & getLowerDElemMap() const
This function attempts to return the map from a high-order element side to its corresponding lower-d ...
Definition: MooseMesh.h:2352
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1772
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3213
elem_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2119
const_bnd_node_iterator(const MooseMesh::bnd_node_iterator &rhs)
Definition: MooseMesh.h:2189
char ** blocks
The definition of the bnd_elem_iterator struct.
Definition: MooseMesh.h:2201
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:2019
const std::vector< const ElemInfo * > & elemInfoVector() const
Accessor for the element info objects owned by this process.
Definition: MooseMesh.h:1326
bool isBoundaryNode(dof_id_type node_id) const
Returns true if the requested node is in the list of boundary nodes, false otherwise.
Definition: MooseMesh.C:3665
face_info_iterator ownedFaceInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1506
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
Calls BoundaryInfo::build_active_side_list.
Definition: MooseMesh.C:3115
static void setPartitioner(MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
Method for setting the partitioner on the passed in mesh_base object.
Definition: MooseMesh.C:3740
void buildLowerDMesh()
Build lower-d mesh for all sides.
Definition: MooseMesh.C:662
const std::set< BoundaryID > & meshSidesetIds() const
Returns a read-only reference to the set of sidesets currently present in the Mesh.
Definition: MooseMesh.C:3283
void setParallelType(ParallelType parallel_type)
Allow to change parallel type.
Definition: MooseMesh.h:2305
unsigned int getMaxNodesPerSide() const
Get the maximum number of nodes per side.
Definition: MooseMesh.h:1286
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1961
void cacheFVElementalDoFs() const
Cache the DoF indices for FV variables on each element.
Definition: MooseMesh.C:4139
void cacheFaceInfoVariableOwnership() const
Cache if variables live on the elements connected by the FaceInfo objects.
Definition: MooseMesh.C:4061
bool _custom_partitioner_requested
Definition: MooseMesh.h:1594
unsigned int _max_nodes_per_side
The maximum number of nodes per side.
Definition: MooseMesh.h:2004
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems() const
Returns a map of boundaries to ids of elements on the boundary.
Definition: MooseMesh.C:1317
Moose::CoordinateSystemType getUniqueCoordSystem() const
Get the coordinate system from the mesh, it must be the same in all subdomains otherwise this will er...
Definition: MooseMesh.C:4305
MooseMesh()=delete
unsigned int _max_sides_per_elem
The maximum number of sides per element.
Definition: MooseMesh.h:1998
const_face_info_iterator(const MooseMesh::face_info_iterator &rhs)
Definition: MooseMesh.h:2102
const_bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2179
bool isSemiLocal(Node *const node) const
Returns true if the node is semi-local.
Definition: MooseMesh.C:996
Moose::Kokkos::Mesh * getKokkosMesh()
Accessor for Kokkos mesh object.
Definition: MooseMesh.h:672
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:2247
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
Definition: MooseMesh.C:1696
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1655
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap(const Elem &elem, int input_side)
Get the coarsening map for a given element type.
Definition: MooseMesh.C:2637
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1696
bool _is_changed
true if mesh is changed (i.e. after adaptivity step)
Definition: MooseMesh.h:1619
bool _doing_p_refinement
Whether we have p-refinement (whether exclusively p- or hp-refinement)
Definition: MooseMesh.h:2038
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2889
const std::vector< std::vector< QpMap > > & getRefinementMap(const Elem &elem, int parent_side, int child, int child_side)
Get the refinement map for a given element type.
Definition: MooseMesh.C:2573
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition: MooseMesh.C:917
std::set< SubdomainID > neighbor_subs
Neighboring subdomain ids.
Definition: MooseMesh.h:1941
unsigned int getGhostingPatchSize() const
Getter for the ghosting_patch_size parameter.
Definition: MooseMesh.h:628
std::vector< BndNode * >::iterator bnd_node_iterator_imp
Definition: MooseMesh.h:1685
const_face_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2092
The definition of the bnd_node_iterator struct.
Definition: MooseMesh.h:2158
const std::string & getBoundaryName(const BoundaryID boundary_id) const
Return the name of the boundary given the id.
Definition: MooseMesh.C:1787
face_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2075
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1757
MeshBase & mesh
void buildHRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2369
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:4399
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1905
const std::set< SubdomainID > & getBlockConnectedBlocks(const SubdomainID subdomain_id) const
Get the list of subdomains neighboring a given subdomain.
Definition: MooseMesh.C:3654
virtual const Node * queryNodePtr(const dof_id_type i) const
Definition: MooseMesh.C:864
libMesh::StoredRange< std::set< Node * >::iterator, Node * > SemiLocalNodeRange
Definition: MooseMesh.h:59
void addPeriodicVariable(const unsigned int sys_num, const unsigned int var_num, const BoundaryID primary, const BoundaryID secondary)
For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primar...
Definition: MooseMesh.C:2202
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
Holds a map from a high-order element side to its corresponding lower-d element.
Definition: MooseMesh.h:1960
Helper object for holding qp mapping info.
Definition: MooseMesh.h:74
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< Real > & getGhostedBoundaryInflation() const
Return a writable reference to the _ghosted_boundaries_inflation vector.
Definition: MooseMesh.C:3347
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1628
dof_id_type maxElementID(unsigned int elem_id_index) const
Return the maximum element ID for an extra element integer with its accessing index.
Definition: MooseMesh.h:1249
std::vector< std::vector< bool > > _id_identical_flag
Flags to indicate whether or not any two extra element integers are the same.
Definition: MooseMesh.h:1995
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:3193
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:164
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:1557
The definition of the const_bnd_node_iterator struct.
Definition: MooseMesh.h:2172
void setUniformRefineLevel(unsigned int, bool deletion=true)
Set uniform refinement level.
Definition: MooseMesh.C:3322
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1589
std::unique_ptr< libMesh::ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1647
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1704
bool areElemIDsIdentical(const std::string &id_name1, const std::string &id_name2) const
Whether or not two extra element integers are identical.
Definition: MooseMesh.h:2326
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1688
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:935
virtual void init()
Initialize the Mesh object.
Definition: MooseMesh.C:2936
The definition of the const_face_info_iterator struct.
Definition: MooseMesh.h:2085
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1613
unsigned int getHigherDSide(const Elem *elem) const
Returns the local side ID of the interior parent aligned with the lower dimensional element...
Definition: MooseMesh.C:1707
std::unordered_map< std::pair< const Elem *, unsigned int >, FaceInfo * > _elem_side_to_face_info
Map from elem-side pair to FaceInfo.
Definition: MooseMesh.h:1769
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:2001
const std::set< SubdomainID > & getNodeBlockIds(const Node &node) const
Return list of blocks to which the given node belongs.
Definition: MooseMesh.C:1495
unsigned int getMaxNodesPerElem() const
Get the maximum number of nodes per element.
Definition: MooseMesh.h:1281
const Parallel::Communicator & _communicator
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition: MooseMesh.h:1936
void setMeshBoundaryIDs(std::set< BoundaryID > boundary_IDs)
Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.
Definition: MooseMesh.C:3295
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] ...
Definition: MooseMesh.h:1707
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::set< SubdomainID > _lower_d_boundary_blocks
Mesh blocks for boundary lower-d elements in different types.
Definition: MooseMesh.h:1957
bool _linear_finite_volume_dofs_cached
Definition: MooseMesh.h:1777
void markFiniteVolumeInfoDirty()
Mark the finite volume information as dirty.
Definition: MooseMesh.h:1444
void cacheInfo()
Definition: MooseMesh.C:1407
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:34
void changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
Change all the boundary IDs for a given side from old_id to new_id.
Definition: MooseMesh.C:2820
std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
Deprecated (DO NOT USE)
Definition: MooseMesh.h:1561
std::set< Elem * > _ghost_elems_from_ghost_boundaries
Set of elements ghosted by ghostGhostedBoundaries.
Definition: MooseMesh.h:1980
virtual void buildMesh()=0
Must be overridden by child classes.
void setPartitionerHelper(MeshBase *mesh=nullptr)
Definition: MooseMesh.C:3728
void deleteRemoteElements()
Delete remote elements.
Definition: MooseMesh.C:4049
unsigned int _to
The qp to map to.
Definition: MooseMesh.h:83
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1277
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:838
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1964
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_names) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition: MooseMesh.C:1732
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:3048
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1758
void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy)
Set the patch size update strategy.
Definition: MooseMesh.C:3507
void buildFiniteVolumeInfo() const
Builds the face and elem info vectors that store meta-data needed for looping over and doing calculat...
Definition: MooseMesh.C:3843
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1952
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis(SubdomainID subdomain_id) const
Gets the general axisymmetric coordinate axis for a block.
Definition: MooseMesh.C:4389
auto max(const L &left, const R &right)
const std::set< BoundaryID > & meshBoundaryIds() const
Returns a read-only reference to the set of boundary IDs currently present in the Mesh...
Definition: MooseMesh.C:3277
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition: MooseMesh.h:1955
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:3225
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1524
void setIsCustomPartitionerRequested(bool cpr)
Definition: MooseMesh.C:3831
std::set< BoundaryID > boundary_ids
The boundary ids that are attached.
Definition: MooseMesh.h:1945
unsigned int _max_h_level
Maximum h-refinement level of all elements.
Definition: MooseMesh.h:2042
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:1541
void mapPoints(const std::vector< Point > &from, const std::vector< Point > &to, std::vector< QpMap > &qp_map)
Find the closest points that map "from" to "to" and fill up "qp_map".
Definition: MooseMesh.C:2648
bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2205
void attachRelationshipManagers(Moose::RelationshipManagerType rm_type, bool attach_geometric_rm_final=false)
Attach the relationship managers of the given type Note: Geometric relationship managers that are sup...
Definition: MooseApp.C:2975
const Moose::Kokkos::Mesh * getKokkosMesh() const
Definition: MooseMesh.h:673
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:3717
const MeshBase * getMeshPtr() const
Definition: MooseMesh.C:3542
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:37
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4405
const std::vector< const FaceInfo * > & faceInfo() const
Accessor for local FaceInfo objects.
Definition: MooseMesh.h:2334
dof_id_type minElementID(unsigned int elem_id_index) const
Return the minimum element ID for an extra element integer with its accessing index.
Definition: MooseMesh.h:1254
const std::vector< FaceInfo > & allFaceInfo() const
Accessor for all FaceInfo objects.
Definition: MooseMesh.h:2340
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1576
bool isSplit() const
Definition: MooseMesh.h:1472
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
The boundary to normal map - valid only when AddAllSideSetsByNormals is active.
Definition: MooseMesh.h:1681
std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
Definition: MooseMesh.h:1693
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
static const std::array< bool, 3 > periodic_dim_default
Default value for the automatically detected paired boundaries for each unit dimension, in which the value for each unit dimension is false (not detected).
Definition: MooseMesh.h:106
bool hasElementID(const std::string &id_name) const
Whether mesh has an extra element integer with a given name.
Definition: MooseMesh.h:2312
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1567
virtual dof_id_type nLocalNodes() const
Definition: MooseMesh.h:324
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1977
std::unique_ptr< Moose::Kokkos::Mesh > _kokkos_mesh
Pointer to Kokkos mesh object.
Definition: MooseMesh.h:1585
bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2162
virtual bool skipNoncriticalPartitioning() const
Definition: MooseMesh.C:4522
SemiLocalNodeRange * getActiveSemiLocalNodeRange() const
Definition: MooseMesh.C:1268
int8_t boundary_id_type
std::unordered_set< dof_id_type > getBoundaryActiveNeighborElemIds(BoundaryID bid) const
Return all ids of neighbors of elements which have a side which is part of a sideset.
Definition: MooseMesh.C:1342
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)
This method sets the name for subdomain_id to name.
Definition: MooseMesh.C:1744
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1673
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3548
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem() const
Get the map from subdomain ID to coordinate system type, e.g.
Definition: MooseMesh.C:4327
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1684
std::unique_ptr< T > buildTypedMesh(unsigned int dim=libMesh::invalid_uint)
Shortcut method to construct a unique pointer to a libMesh mesh instance.
Definition: MooseMesh.h:2251
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
The list of active geometric relationship managers (bound to the underlying MeshBase object)...
Definition: MooseMesh.h:1564
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2985
unsigned int _from
The qp to map from.
Definition: MooseMesh.h:80
std::pair< const Node *, BoundaryID > PeriodicNodeInfo
Helper type for building periodic node maps.
Definition: MooseMesh.h:1204
virtual SubdomainID nSubdomains() const
Definition: MooseMesh.h:328
const_elem_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2136
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
Method to construct a libMesh::MeshBase object that is normally set and used by the MooseMesh object ...
Definition: MooseMesh.C:2917
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4414
bool isPartitionerForced() const
Tell the user if the partitioner was overriden for any reason.
Definition: MooseMesh.h:1156
const std::set< unsigned int > & getGhostedBoundaries() const
Return a writable reference to the set of ghosted boundary IDs.
Definition: MooseMesh.C:3341
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1967
boundary_id_type BoundaryID
const std::array< bool, 3 > & queryPeriodicDimensions(const unsigned int sys_num, const unsigned int var_num) const
Query the translated periodic dimension flags for the given variable on the given system...
Definition: MooseMesh.C:2240
unsigned int sideWithBoundaryID(const Elem *const elem, const BoundaryID boundary_id) const
Calls BoundaryInfo::side_with_boundary_id().
Definition: MooseMesh.C:3121
const std::vector< dof_id_type > & getNodeList(boundary_id_type nodeset_id) const
Return a writable reference to a vector of node IDs that belong to nodeset_id.
Definition: MooseMesh.C:3570
unsigned int getMaxLeafSize() const
Getter for the maximum leaf size parameter.
Definition: MooseMesh.h:633
std::map< std::pair< unsigned int, unsigned int >, std::array< bool, 3 > > _periodic_dim
A map from (system number, vector number) to which dimensions are periodic in a regular orthogonal me...
Definition: MooseMesh.h:1785
virtual const Node * nodePtr(const dof_id_type i) const
Definition: MooseMesh.C:852
bool hasLowerD() const
Definition: MooseMesh.h:1535
std::vector< dof_id_type > _max_ids
Maximum integer ID for each extra element integer.
Definition: MooseMesh.h:1991
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:93
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:619
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:54
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:1677
std::unique_ptr< MooseAppCoordTransform > _coord_transform
A coordinate transformation object that describes how to transform this problem&#39;s coordinate system i...
Definition: MooseMesh.h:2029
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
Definition: MooseMesh.C:3621
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4427
ParallelType getParallelType() const
Definition: MooseMesh.h:1146
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1910
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1934
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1737
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
Set the coordinate system for the provided blocks to coord_sys.
Definition: MooseMesh.C:4201
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1631
std::set< dof_id_type > getAllElemIDs(unsigned int elem_id_index) const
Return all the unique element IDs for an extra element integer with its index.
Definition: MooseMesh.C:1156
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1675
const Node * addUniqueNode(const Point &p, Real tol=1e-6)
Add a new node to the mesh.
Definition: MooseMesh.C:1572
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1701
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:385
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1625
void buildRefinementMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition: MooseMesh.C:2530
The definition of the face_info_iterator struct.
Definition: MooseMesh.h:2070
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:3316
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1691
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:2032
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition: MooseMesh.h:1544
std::vector< SubdomainName > getSubdomainNames(const std::vector< SubdomainID > &subdomain_ids) const
Get the associated subdomainNames for the subdomain ids that are passed in.
Definition: MooseMesh.C:1764
MooseMesh & operator=(const MooseMesh &other_mesh)=delete
const std::vector< QpMap > & getPRefinementMap(const Elem &elem) const
Get the map describing for each volumetric quadrature point (qp) on the refined level which qp on the...
Definition: MooseMesh.C:4498
virtual dof_id_type nActiveLocalElem() const
Definition: MooseMesh.h:326
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping(unsigned int component) const
This function attempts to return the paired boundary ids for the given component. ...
Definition: MooseMesh.C:2350
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3815
unsigned int getPatchSize() const
Getter for the patch_size parameter.
Definition: MooseMesh.C:3501
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
Definition: MooseMesh.C:2520
std::string getBoundaryString(const BoundaryID boundary_id) const
Return the name of the boundary given the id, if it exists.
Definition: MooseMesh.C:1799
bool _parallel_type_overridden
Definition: MooseMesh.h:1578
bool isRegularOrthogonal()
Getter to query if the mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1186
unsigned int getMaxSidesPerElem() const
Get the maximum number of sides per element.
Definition: MooseMesh.h:1276
Interface for objects interacting with the PerfGraph.
MeshBase::element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3151
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:1725
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
Definition: MooseMesh.h:1700
const std::vector< QpMap > & getPRefinementSideMap(const Elem &elem) const
Get the map describing for each side quadrature point (qp) on the refined level which qp on the previ...
Definition: MooseMesh.C:4504
bool _displace_node_list_by_side_list
Whether or not to displace unrelated nodesets by nodesets constructed from sidesets.
Definition: MooseMesh.h:1971
std::unordered_map< dof_id_type, ElemInfo > _elem_to_elem_info
Map connecting elems with their corresponding ElemInfo, we use the element ID as the key...
Definition: MooseMesh.h:1753
bool skipRefineWhenUseSplit() const
Whether or not skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:587
std::vector< BndElement * >::iterator bnd_elem_iterator_imp
Definition: MooseMesh.h:1692
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
Definition: MooseMesh.C:1655
void printInfo(std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
Calls print_info() on the underlying Mesh.
Definition: MooseMesh.C:3562
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:2245
virtual dof_id_type nNodes() const
Calls n_nodes/elem() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3175
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition: MooseMesh.C:4018
std::unordered_map< dof_id_type, std::vector< dof_id_type > > & internalNodeToElemMap()
If not already created, creates a map from every node to all elements to which they are connected...
Definition: MooseMesh.C:1205
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:2049
void buildCoarseningMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition: MooseMesh.C:2609
const std::vector< const Elem * > & coarsenedElementChildren(const Elem *elem) const
Get the newly removed children element ids for an element that was just coarsened.
Definition: MooseMesh.C:947
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping(const std::string &from_id_name, const std::string &to_id_name) const
Definition: MooseMesh.C:1127
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1931
void setBoundaryName(BoundaryID boundary_id, BoundaryName name)
This method sets the boundary name of the boundary based on the id parameter.
Definition: MooseMesh.C:1775
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1722
const std::unordered_map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap()
If not already created, creates a map from every node to all elements to which they are connected...
Definition: MooseMesh.C:1234
Physical unit management class with runtime unit string parsing, unit checking, unit conversion...
Definition: Units.h:32
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:1676
void setGeneralAxisymmetricCoordAxes(const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue >> &axes)
Sets the general coordinate axes for axisymmetric blocks.
Definition: MooseMesh.C:4341
void setBoundaryToNormalMap(std::unique_ptr< std::map< BoundaryID, RealVectorValue >> boundary_map)
Sets the mapping between BoundaryID and normal vector Is called by AddAllSideSetsByNormals.
Definition: MooseMesh.C:3301
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool _partitioner_overridden
Definition: MooseMesh.h:1590
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1927
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
void updateActiveSemiLocalNodeRange(std::set< dof_id_type > &ghosted_elems)
Clears the "semi-local" node list and rebuilds it.
Definition: MooseMesh.C:955
void isDisplaced(bool is_displaced)
Set whether this mesh is a displaced mesh.
Definition: MooseMesh.h:1353
CoordinateSystemType
Definition: MooseTypes.h:858
std::set< dof_id_type > getElemIDsOnBlocks(unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
Return all the unique element IDs for an extra element integer with its index on a set of subdomains...
Definition: MooseMesh.C:1166
unsigned int getBlocksMaxDimension(const std::vector< SubdomainName > &blocks) const
Returns the maximum element dimension on the given blocks.
Definition: MooseMesh.C:3006
virtual std::unique_ptr< MooseMesh > safeClone() const =0
A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer...
bool _is_displaced
Whether this mesh is displaced.
Definition: MooseMesh.h:2010
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition: MooseMesh.h:1234
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1581
libMesh::NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:1254
virtual unsigned int nPartitions() const
Definition: MooseMesh.h:329
void setGhostedBoundaryInflation(const std::vector< Real > &inflation)
This sets the inflation amount for the bounding box for each partition for use in ghosting boundaries...
Definition: MooseMesh.C:3335
bool isTranslatedPeriodic(const unsigned int sys_num, const unsigned int var_num, const unsigned int component) const
Returns whether this generated mesh is periodic in the given dimension for the given variable on the ...
Definition: MooseMesh.C:2255
void freeBndNodes()
Definition: MooseMesh.C:352
The definition of the elem_info_iterator struct.
Definition: MooseMesh.h:2114
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:2178
PatchUpdateType
Type of patch update strategy for modeling node-face constraints or contact.
Definition: MooseTypes.h:1001
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1616
std::set< SubdomainID > getBoundaryConnectedSecondaryBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary of its secondary side.
Definition: MooseMesh.C:3632
unsigned int _max_nodes_per_elem
The maximum number of nodes per element.
Definition: MooseMesh.h:2001
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1974
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1908
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:4333
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1734
std::set< BoundaryID > getSubdomainInterfaceBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundaries that contact the given subdomain.
Definition: MooseMesh.C:3608
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:824
unsigned int maxPLevel() const
Returns the maximum p-refinement level of all elements.
Definition: MooseMesh.h:1502
libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier=0.01) const
Get a (slightly inflated) processor bounding box.
Definition: MooseMesh.C:3519
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:281
void setMeshBase(std::unique_ptr< MeshBase > mesh_base)
Method to set the mesh_base object.
Definition: MooseMesh.C:2929
void buildBndElemList()
Definition: MooseMesh.C:1182
bool getDisplaceNodeListBySideList()
Return displace node list by side list boolean.
Definition: MooseMesh.h:1550
std::set< SubdomainID > getInterfaceConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains contacting the given boundary.
Definition: MooseMesh.C:3643
bool isParallelTypeForced() const
Tell the user if the distribution was overriden for any reason.
Definition: MooseMesh.h:1136
Real minPeriodicDistance(const unsigned int sys_num, const unsigned int var_num, const Point &p, const Point &q) const
Returns the distance between two points on the mesh taking into account periodicity for the given var...
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:1710
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
Unique element integer IDs for each subdomain and each extra element integers.
Definition: MooseMesh.h:1989
void needGhostGhostedBoundaries(bool needghost)
Whether or not we want to ghost ghosted boundaries.
Definition: MooseMesh.h:618
void findAdaptivityQpMaps(const Elem *template_elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, std::vector< std::vector< QpMap >> &refinement_map, std::vector< std::pair< unsigned int, QpMap >> &coarsen_map, int parent_side, int child, int child_side)
Given an elem type, get maps that tell us what qp&#39;s are closest to each other between a parent and it...
Definition: MooseMesh.C:2679
bool needsRemoteElemDeletion() const
Whether we need to delete remote elements.
Definition: MooseMesh.h:1214
std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
Definition: MooseMesh.h:1686
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1713
bool skipDeletionRepartitionAfterRefine() const
Return a flag indicating whether or not we should skip remote deletion and repartition after uniform ...
Definition: MooseMesh.h:2299
elem_info_iterator ownedElemInfoEnd()
Definition: MooseMesh.C:1532
void buildPeriodicNodeSets(std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
This routine builds a datastructure of node ids organized by periodic boundary ids.
Definition: MooseMesh.C:1900
virtual std::unique_ptr< libMesh::PointLocatorBase > getPointLocator() const
Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default)...
Definition: MooseMesh.C:3837
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:3329
virtual dof_id_type maxNodeId() const
Calls max_node/elem_id() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3187
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3199
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1304
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:209
virtual dof_id_type nActiveElem() const
Definition: MooseMesh.h:325
const_elem_info_iterator(const MooseMesh::elem_info_iterator &rhs)
Definition: MooseMesh.h:2146
face_info_iterator ownedFaceInfoEnd()
Definition: MooseMesh.C:1515
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:2025
const MooseEnum & partitionerName() const
Definition: MooseMesh.h:1151
Class used for caching additional information for elements such as the volume and centroid...
Definition: ElemInfo.h:25
MeshBase::node_iterator localNodesEnd()
Definition: MooseMesh.C:3133
const RealVectorValue & getNormalByBoundaryID(BoundaryID id) const
Returns the normal vector associated with a given BoundaryID.
Definition: MooseMesh.C:2873
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing includes p-refinement.
Definition: MooseMesh.h:1492
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1667
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened...
Definition: MooseMesh.C:941
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
Definition: MooseMesh.C:3513
bool doingPRefinement() const
Query whether the kind of adaptivity we&#39;re doing includes p-refinement.
Definition: MooseMesh.h:1497
virtual bool skipPartitioning() const
Definition: MooseMesh.h:330
unsigned int maxHLevel() const
Returns the maximum h-refinement level of all elements.
Definition: MooseMesh.h:1507
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor. ...
Definition: MooseMesh.C:3414
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1709
MeshBase::node_iterator localNodesBegin()
Calls local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3127
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:2022
void computeFiniteVolumeCoords() const
Compute the face coordinate value for all FaceInfo and ElemInfo objects.
Definition: MooseMesh.C:3997
bool _distribution_overridden
Definition: MooseMesh.h:1577
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:1029
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1949
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1593
bool isBoundaryElem(dof_id_type elem_id) const
Returns true if the requested element is in the list of boundary elements, false otherwise.
Definition: MooseMesh.C:3691
unsigned int getElementIDIndex(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Definition: MooseMesh.h:2318
void needsRemoteElemDeletion(bool need_delete)
Set whether we need to delete remote elements.
Definition: MooseMesh.h:1209
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened.
Definition: MooseMesh.h:1638
virtual bool isDistributedMesh() const
Returns the final Mesh distribution type.
Definition: MooseMesh.h:1131
const std::vector< QpMap > & getPCoarseningMap(const Elem &elem) const
Get the map describing for each volumetric quadrature point (qp) on the coarse level which qp on the ...
Definition: MooseMesh.C:4510
OStreamProxy out(std::cout)
void buildPeriodicNodeMap(std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundarie...
Definition: MooseMesh.C:1815
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1716
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds() const
Returns a map of boundaries to ids of elements on the boundary.
Definition: MooseMesh.C:1325
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:3157
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1651
QpMap()
Definition: MooseMesh.h:77
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1291
The definition of the const_elem_info_iterator struct.
Definition: MooseMesh.h:2129
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1728
bool prepare(const MeshBase *mesh_to_clone)
Calls prepare_for_use() if the underlying MeshBase object isn&#39;t prepared, then communicates various b...
Definition: MooseMesh.C:385
const ElemInfo & elemInfo(const dof_id_type id) const
Accessor for the elemInfo object for a given element ID.
Definition: MooseMesh.C:3991
void setCustomPartitioner(libMesh::Partitioner *partitioner)
Setter for custom partitioner.
Definition: MooseMesh.C:3799
Real _distance
The distance between them.
Definition: MooseMesh.h:86
unsigned int nFace() const
accessors for the FaceInfo objects
Definition: MooseMesh.h:1292
static MooseEnum elemTypes()
returns MooseMesh element type options
Definition: MooseMesh.C:4026
Base variable class.
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:886
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2426
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1687
std::unordered_map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:1658
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1653
uint8_t dof_id_type
virtual dof_id_type nElem() const
Definition: MooseMesh.C:3181
bool isBoundaryFullyExternalToSubdomains(BoundaryID bid, const std::set< SubdomainID > &blk_group) const
Returns whether a boundary (given by its id) is not crossing through a group of blocks, by which we mean that elements on both sides of the boundary are in those blocks.
Definition: MooseMesh.C:1373
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1649
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3271
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1726
unsigned int _max_p_level
Maximum p-refinement level of all elements.
Definition: MooseMesh.h:2040
ParallelType
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
Definition: MooseMesh.C:4192
virtual unsigned int effectiveSpatialDimension() const
Returns the effective spatial dimension determined by the coordinates actually used by the mesh...
Definition: MooseMesh.C:2991