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::map<dof_id_type, std::vector<dof_id_type>> & nodeToElemMap();
256 
264  const std::map<dof_id_type, std::vector<dof_id_type>> & nodeToActiveSemilocalElemMap();
265 
270  struct bnd_node_iterator;
271  struct const_bnd_node_iterator;
272 
273  struct bnd_elem_iterator;
274  struct const_bnd_elem_iterator;
275 
279  virtual bnd_node_iterator bndNodesBegin();
280  virtual bnd_node_iterator bndNodesEnd();
281 
285  virtual bnd_elem_iterator bndElemsBegin();
286  virtual bnd_elem_iterator bndElemsEnd();
287 
292 
297  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> buildSideList();
298 
303  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>>
304  buildActiveSideList() const;
305 
309  unsigned int sideWithBoundaryID(const Elem * const elem, const BoundaryID boundary_id) const;
310 
314  MeshBase::node_iterator localNodesBegin();
315  MeshBase::node_iterator localNodesEnd();
316  MeshBase::const_node_iterator localNodesBegin() const;
317  MeshBase::const_node_iterator localNodesEnd() const;
318 
322  MeshBase::element_iterator activeLocalElementsBegin();
323  const MeshBase::element_iterator activeLocalElementsEnd();
324  MeshBase::const_element_iterator activeLocalElementsBegin() const;
325  const MeshBase::const_element_iterator activeLocalElementsEnd() const;
326 
330  virtual dof_id_type nNodes() const;
331  virtual dof_id_type nElem() const;
332 
333  virtual dof_id_type nLocalNodes() const { return _mesh->n_local_nodes(); }
334  virtual dof_id_type nActiveElem() const { return _mesh->n_active_elem(); }
335  virtual dof_id_type nActiveLocalElem() const { return _mesh->n_active_local_elem(); }
336  // NOTE: Expensive operation (iterates through all elements to gather subdomains)
337  virtual SubdomainID nSubdomains() const { return _mesh->n_subdomains(); }
338  virtual unsigned int nPartitions() const { return _mesh->n_partitions(); }
339  virtual bool skipPartitioning() const { return _mesh->skip_partitioning(); }
340  virtual bool skipNoncriticalPartitioning() const;
341 
347  virtual dof_id_type maxNodeId() const;
348  virtual dof_id_type maxElemId() const;
349 
356  virtual const Node & node(const dof_id_type i) const;
357  virtual Node & node(const dof_id_type i);
358  virtual const Node & nodeRef(const dof_id_type i) const;
359  virtual Node & nodeRef(const dof_id_type i);
360  virtual const Node * nodePtr(const dof_id_type i) const;
361  virtual Node * nodePtr(const dof_id_type i);
362  virtual const Node * queryNodePtr(const dof_id_type i) const;
363  virtual Node * queryNodePtr(const dof_id_type i);
364 
371  virtual Elem * elem(const dof_id_type i);
372  virtual const Elem * elem(const dof_id_type i) const;
373  virtual Elem * elemPtr(const dof_id_type i);
374  virtual const Elem * elemPtr(const dof_id_type i) const;
375  virtual Elem * queryElemPtr(const dof_id_type i);
376  virtual const Elem * queryElemPtr(const dof_id_type i) const;
377 
381  bool prepared() const;
382  virtual void prepared(bool state);
383 
389  void needsPrepareForUse();
390 
396  void meshChanged();
397 
403  virtual void onMeshChanged();
404 
408  void cacheChangedLists();
409 
417 
425 
432  const std::vector<const Elem *> & coarsenedElementChildren(const Elem * elem) const;
433 
438  void updateActiveSemiLocalNodeRange(std::set<dof_id_type> & ghosted_elems);
439 
445  bool isSemiLocal(Node * const node) const;
446 
448 
461 
465  const std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> &
466  getBoundariesToElems() const;
467 
471  const std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> &
473 
479  std::unordered_set<dof_id_type> getBoundaryActiveSemiLocalElemIds(BoundaryID bid) const;
480 
490  std::unordered_set<dof_id_type> getBoundaryActiveNeighborElemIds(BoundaryID bid) const;
491 
500  const std::set<SubdomainID> & blk_group) const;
501 
506  const std::set<SubdomainID> & meshSubdomains() const;
507 
512  const std::set<BoundaryID> & meshBoundaryIds() const;
513 
518  const std::set<BoundaryID> & meshSidesetIds() const;
519 
524  const std::set<BoundaryID> & meshNodesetIds() const;
525 
530  void setBoundaryToNormalMap(std::unique_ptr<std::map<BoundaryID, RealVectorValue>> boundary_map);
531 
532  // DEPRECATED METHOD
533  void setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map);
534 
539  void setMeshBoundaryIDs(std::set<BoundaryID> boundary_IDs);
540 
546 
564  bool prepare(const MeshBase * mesh_to_clone);
565 
569  void update();
570 
574  unsigned int uniformRefineLevel() const;
575 
579  void setUniformRefineLevel(unsigned int, bool deletion = true);
580 
592 
597 
601  void addGhostedBoundary(BoundaryID boundary_id);
602 
607  void setGhostedBoundaryInflation(const std::vector<Real> & inflation);
608 
612  const std::set<unsigned int> & getGhostedBoundaries() const;
613 
617  const std::vector<Real> & getGhostedBoundaryInflation() const;
618 
622  void ghostGhostedBoundaries();
623 
627  void needGhostGhostedBoundaries(bool needghost) { _need_ghost_ghosted_boundaries = needghost; }
628 
632  unsigned int getPatchSize() const;
633 
637  unsigned int getGhostingPatchSize() const { return _ghosting_patch_size; }
638 
642  unsigned int getMaxLeafSize() const { return _max_leaf_size; }
643 
647  void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy);
648 
653 
660  libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const;
661 
665  operator libMesh::MeshBase &();
666  operator const libMesh::MeshBase &() const;
667 
671  MeshBase & getMesh();
672  MeshBase & getMesh(const std::string & name);
673  const MeshBase & getMesh() const;
674  const MeshBase & getMesh(const std::string & name) const;
675  const MeshBase * getMeshPtr() const;
676 
680 #ifdef MOOSE_KOKKOS_ENABLED
682  const Moose::Kokkos::Mesh * getKokkosMesh() const { return _kokkos_mesh.get(); }
683 #endif
684 
688  void printInfo(std::ostream & os = libMesh::out, const unsigned int verbosity = 0) const;
689 
693  const std::set<SubdomainID> & getNodeBlockIds(const Node & node) const;
694 
699  const std::vector<dof_id_type> & getNodeList(boundary_id_type nodeset_id) const;
700 
706  const Node * addUniqueNode(const Point & p, Real tol = 1e-6);
707 
721  Node * addQuadratureNode(const Elem * elem,
722  const unsigned short int side,
723  const unsigned int qp,
724  BoundaryID bid,
725  const Point & point);
726 
734  Node * getQuadratureNode(const Elem * elem, const unsigned short int side, const unsigned int qp);
735 
740  void clearQuadratureNodes();
741 
748  BoundaryID getBoundaryID(const BoundaryName & boundary_name) const;
749 
756  std::vector<BoundaryID> getBoundaryIDs(const std::vector<BoundaryName> & boundary_name,
757  bool generate_unknown = false) const;
758 
765  SubdomainID getSubdomainID(const SubdomainName & subdomain_name) const;
766 
773  std::vector<SubdomainID>
774  getSubdomainIDs(const std::vector<SubdomainName> & subdomain_names) const;
775  std::set<SubdomainID> getSubdomainIDs(const std::set<SubdomainName> & subdomain_names) const;
776 
780  void setSubdomainName(SubdomainID subdomain_id, const SubdomainName & name);
781 
785  static void
786  setSubdomainName(MeshBase & mesh, SubdomainID subdomain_id, const SubdomainName & name);
787 
791  const std::string & getSubdomainName(SubdomainID subdomain_id) const;
792 
799  std::vector<SubdomainName>
800  getSubdomainNames(const std::vector<SubdomainID> & subdomain_ids) const;
801 
805  void setBoundaryName(BoundaryID boundary_id, BoundaryName name);
806 
810  const std::string & getBoundaryName(const BoundaryID boundary_id) const;
811 
816  std::string getBoundaryString(const BoundaryID boundary_id) const;
817 
823  void buildPeriodicNodeMap(std::multimap<dof_id_type, dof_id_type> & periodic_node_map,
824  unsigned int var_number,
825  libMesh::PeriodicBoundaries * pbs) const;
826 
830  void buildPeriodicNodeSets(std::map<BoundaryID, std::set<dof_id_type>> & periodic_node_sets,
831  unsigned int var_number,
832  libMesh::PeriodicBoundaries * pbs) const;
833 
837  Real dimensionWidth(unsigned int component) const;
838 
840 
843  virtual Real getMinInDimension(unsigned int component) const;
844  virtual Real getMaxInDimension(unsigned int component) const;
846 
857  bool detectOrthogonalDimRanges(Real tol = 1e-6);
858 
863  void addPeriodicVariable(const unsigned int sys_num,
864  const unsigned int var_num,
865  const BoundaryID primary,
866  const BoundaryID secondary);
867 
877  const std::array<bool, 3> & queryPeriodicDimensions(const unsigned int sys_num,
878  const unsigned int var_num) const;
887  const std::array<bool, 3> & queryPeriodicDimensions(const MooseVariableBase & var) const;
888 
896  bool isTranslatedPeriodic(const unsigned int sys_num,
897  const unsigned int var_num,
898  const unsigned int component) const;
899 
905  bool isTranslatedPeriodic(const MooseVariableBase & var, const unsigned int component) const;
906 
916  bool isTranslatedPeriodic(const unsigned int var_num, const unsigned int component) const;
917 
927  minPeriodicVector(const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const;
928 
937  minPeriodicVector(const MooseVariableBase & var, const Point & p, const Point & q) const;
938 
951  minPeriodicVector(const unsigned int var_num, const Point & p, const Point & q) const;
952 
961  Real minPeriodicDistance(const unsigned int sys_num,
962  const unsigned int var_num,
963  const Point & p,
964  const Point & q) const;
965 
973  Real minPeriodicDistance(const MooseVariableBase & var, const Point & p, const Point & q) const;
974 
986  Real minPeriodicDistance(const unsigned int var_num, const Point & p, const Point & q) const;
987 
994  void detectPairedSidesets();
995 
999  bool hasDetectedPairedSidesets() const { return _paired_boundary.has_value(); }
1000 
1010  const std::pair<BoundaryID, BoundaryID> * getPairedBoundaryMapping(unsigned int component) const;
1011 
1018  void buildRefinementAndCoarseningMaps(Assembly * assembly);
1019 
1029  const std::vector<std::vector<QpMap>> &
1030  getRefinementMap(const Elem & elem, int parent_side, int child, int child_side);
1031 
1039  const std::vector<std::pair<unsigned int, QpMap>> & getCoarseningMap(const Elem & elem,
1040  int input_side);
1041 
1046  void
1047  changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev);
1048 
1053  static void changeBoundaryId(MeshBase & mesh,
1054  const boundary_id_type old_id,
1055  const boundary_id_type new_id,
1056  bool delete_prev);
1057 
1064  const std::set<BoundaryID> & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const;
1065 
1072  std::set<BoundaryID> getSubdomainInterfaceBoundaryIds(const SubdomainID subdomain_id) const;
1073 
1080  std::set<SubdomainID> getBoundaryConnectedBlocks(const BoundaryID bid) const;
1081 
1088  std::set<SubdomainID> getBoundaryConnectedSecondaryBlocks(const BoundaryID bid) const;
1089 
1096  std::set<SubdomainID> getInterfaceConnectedBlocks(const BoundaryID bid) const;
1097 
1104  const std::set<SubdomainID> & getBlockConnectedBlocks(const SubdomainID subdomain_id) const;
1105 
1109  bool isBoundaryNode(dof_id_type node_id) const;
1110 
1115  bool isBoundaryNode(dof_id_type node_id, BoundaryID bnd_id) const;
1116 
1120  bool isBoundaryElem(dof_id_type elem_id) const;
1121 
1126  bool isBoundaryElem(dof_id_type elem_id, BoundaryID bnd_id) const;
1127 
1135  void errorIfDistributedMesh(std::string name) const;
1136 
1140  virtual bool isDistributedMesh() const { return _use_distributed_mesh; }
1141 
1146 
1150  void setParallelType(ParallelType parallel_type);
1151 
1156 
1157  /*
1158  * Set/Get the partitioner name
1159  */
1160  const MooseEnum & partitionerName() const { return _partitioner_name; }
1161 
1166 
1170  void allowRecovery(bool allow) { _allow_recovery = allow; }
1171 
1175  static void setPartitioner(MeshBase & mesh_base,
1176  MooseEnum & partitioner,
1177  bool use_distributed_mesh,
1178  const InputParameters & params,
1179  MooseObject & context_obj);
1180 
1184  void setCustomPartitioner(libMesh::Partitioner * partitioner);
1185 
1187 
1190  bool isCustomPartitionerRequested() const;
1191  void setIsCustomPartitionerRequested(bool cpr);
1193 
1196 
1198  bool hasSecondOrderElements();
1199 
1204  virtual std::unique_ptr<libMesh::PointLocatorBase> getPointLocator() const;
1205 
1210  virtual std::string getFileName() const { return ""; }
1211 
1213  using PeriodicNodeInfo = std::pair<const Node *, BoundaryID>;
1214 
1218  void needsRemoteElemDeletion(bool need_delete) { _need_delete = need_delete; }
1219 
1223  bool needsRemoteElemDeletion() const { return _need_delete; }
1224 
1228  void allowRemoteElementRemoval(bool allow_removal);
1229 
1234 
1238  void deleteRemoteElements();
1239 
1243  bool hasMeshBase() const { return _mesh.get() != nullptr; }
1244 
1248  bool hasElementID(const std::string & id_name) const;
1249 
1253  unsigned int getElementIDIndex(const std::string & id_name) const;
1254 
1258  dof_id_type maxElementID(unsigned int elem_id_index) const { return _max_ids[elem_id_index]; }
1259 
1263  dof_id_type minElementID(unsigned int elem_id_index) const { return _min_ids[elem_id_index]; }
1264 
1268  bool areElemIDsIdentical(const std::string & id_name1, const std::string & id_name2) const;
1269 
1273  std::set<dof_id_type> getAllElemIDs(unsigned int elem_id_index) const;
1274 
1279  std::set<dof_id_type> getElemIDsOnBlocks(unsigned int elem_id_index,
1280  const std::set<SubdomainID> & blks) const;
1281 
1285  unsigned int getMaxSidesPerElem() const { return _max_sides_per_elem; }
1286 
1290  unsigned int getMaxNodesPerElem() const { return _max_nodes_per_elem; }
1291 
1295  unsigned int getMaxNodesPerSide() const { return _max_nodes_per_side; }
1296 
1297  std::unordered_map<dof_id_type, std::set<dof_id_type>>
1298  getElemIDMapping(const std::string & from_id_name, const std::string & to_id_name) const;
1299 
1301  unsigned int nFace() const { return _face_info.size(); }
1302 
1304  const std::vector<const FaceInfo *> & faceInfo() const;
1305 
1307  struct face_info_iterator;
1308  struct const_face_info_iterator;
1309 
1314  face_info_iterator ownedFaceInfoBegin();
1315  face_info_iterator ownedFaceInfoEnd();
1316 
1318  struct elem_info_iterator;
1319  struct const_elem_info_iterator;
1320 
1325  elem_info_iterator ownedElemInfoBegin();
1326  elem_info_iterator ownedElemInfoEnd();
1327 
1329  const FaceInfo * faceInfo(const Elem * elem, unsigned int side) const;
1330 
1332  const ElemInfo & elemInfo(const dof_id_type id) const;
1333 
1335  const std::vector<const ElemInfo *> & elemInfoVector() const { return _elem_info; }
1336 
1338  const std::vector<FaceInfo> & allFaceInfo() const;
1340 
1344  void cacheFaceInfoVariableOwnership() const;
1345 
1350  void cacheFVElementalDoFs() const;
1351 
1357  void computeFiniteVolumeCoords() const;
1358 
1362  void isDisplaced(bool is_displaced) { _is_displaced = is_displaced; }
1363 
1367  bool isDisplaced() const { return _is_displaced; }
1368 
1372  const std::map<boundary_id_type, std::vector<dof_id_type>> & nodeSetNodes() const;
1373 
1379 
1385 
1389  const std::map<SubdomainID, Moose::CoordinateSystemType> & getCoordSystem() const;
1390 
1394  void setCoordSystem(const std::vector<SubdomainName> & blocks, const MultiMooseEnum & coord_sys);
1395 
1400  void setAxisymmetricCoordAxis(const MooseEnum & rz_coord_axis);
1401 
1416  void setGeneralAxisymmetricCoordAxes(const std::vector<SubdomainName> & blocks,
1417  const std::vector<std::pair<Point, RealVectorValue>> & axes);
1418 
1424  const std::pair<Point, RealVectorValue> &
1425  getGeneralAxisymmetricCoordAxis(SubdomainID subdomain_id) const;
1426 
1430  bool usingGeneralAxisymmetricCoordAxes() const;
1431 
1436  unsigned int getAxisymmetricRadialCoord() const;
1437 
1443  void checkCoordinateSystems();
1444 
1448  void setCoordData(const MooseMesh & other_mesh);
1449 
1454 
1459 
1465 
1469  const MooseUnits & lengthUnit() const;
1470 
1475  const std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *> &
1476  getLowerDElemMap() const;
1477 
1481  bool isSplit() const { return _is_split; }
1482 
1489  void buildFiniteVolumeInfo() const;
1490 
1496  void setupFiniteVolumeMeshData() const;
1497 
1501  void doingPRefinement(bool doing_p_refinement) { _doing_p_refinement = doing_p_refinement; }
1502 
1506  [[nodiscard]] bool doingPRefinement() const { return _doing_p_refinement; }
1507 
1511  unsigned int maxPLevel() const { return _max_p_level; }
1512 
1516  unsigned int maxHLevel() const { return _max_h_level; }
1517 
1522  const std::vector<QpMap> & getPRefinementMap(const Elem & elem) const;
1527  const std::vector<QpMap> & getPRefinementSideMap(const Elem & elem) const;
1532  const std::vector<QpMap> & getPCoarseningMap(const Elem & elem) const;
1537  const std::vector<QpMap> & getPCoarseningSideMap(const Elem & elem) const;
1538 
1540 
1544  bool hasLowerD() const { return getMesh().elem_dimensions().size() > 1; }
1545 
1549  const std::set<SubdomainID> & interiorLowerDBlocks() const { return _lower_d_interior_blocks; }
1553  const std::set<SubdomainID> & boundaryLowerDBlocks() const { return _lower_d_boundary_blocks; }
1554 
1557 
1560 
1561 protected:
1563  std::vector<std::unique_ptr<libMesh::GhostingFunctor>> _ghosting_functors;
1564 
1566  std::vector<std::shared_ptr<RelationshipManager>> _relationship_managers;
1567 
1570 
1574 
1581 
1583  std::unique_ptr<libMesh::MeshBase> _mesh;
1584 
1586 #ifdef MOOSE_KOKKOS_ENABLED
1587  std::unique_ptr<Moose::Kokkos::Mesh> _kokkos_mesh;
1588 #endif
1589 
1593 
1595  std::unique_ptr<libMesh::Partitioner> _custom_partitioner;
1597 
1599  enum
1600  {
1601  X = 0,
1602  Y,
1604  };
1605  enum
1606  {
1607  MIN = 0,
1609  };
1610 
1613 
1616 
1619 
1622 
1625 
1627  bool _moose_mesh_prepared = false;
1628 
1630  std::unique_ptr<ConstElemPointerRange> _refined_elements;
1631 
1633  std::unique_ptr<ConstElemPointerRange> _coarsened_elements;
1634 
1640  std::map<const Elem *, std::vector<const Elem *>> _coarsened_element_children;
1641 
1643  std::set<Node *> _semilocal_node_list;
1644 
1649  std::unique_ptr<libMesh::ConstElemRange> _active_local_elem_range;
1650 
1651  std::unique_ptr<SemiLocalNodeRange> _active_semilocal_node_range;
1652  std::unique_ptr<libMesh::NodeRange> _active_node_range;
1653  std::unique_ptr<libMesh::ConstNodeRange> _local_node_range;
1654  std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *>>
1656  std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *>>
1658 
1660  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_elem_map;
1662 
1664  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_active_semilocal_elem_map;
1666 
1671  std::set<SubdomainID> _mesh_subdomains;
1672 
1674 
1679  std::set<BoundaryID> _mesh_boundary_ids;
1680  std::set<BoundaryID> _mesh_sideset_ids;
1681  std::set<BoundaryID> _mesh_nodeset_ids;
1683 
1685  std::unique_ptr<std::map<BoundaryID, RealVectorValue>> _boundary_to_normal_map;
1686 
1688  std::vector<BndNode *> _bnd_nodes;
1689  typedef std::vector<BndNode *>::iterator bnd_node_iterator_imp;
1690  typedef std::vector<BndNode *>::const_iterator const_bnd_node_iterator_imp;
1692  std::map<boundary_id_type, std::set<dof_id_type>> _bnd_node_ids;
1693 
1695  std::vector<BndElement *> _bnd_elems;
1696  typedef std::vector<BndElement *>::iterator bnd_elem_iterator_imp;
1697  typedef std::vector<BndElement *>::const_iterator const_bnd_elem_iterator_imp;
1698 
1700  std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> _bnd_elem_ids;
1701 
1702  std::map<dof_id_type, Node *> _quadrature_nodes;
1703  std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *>>>
1705  std::vector<BndNode> _extra_bnd_nodes;
1706 
1708  std::map<dof_id_type, std::set<SubdomainID>> _block_node_list;
1709 
1711  std::map<boundary_id_type, std::vector<dof_id_type>> _node_set_nodes;
1712 
1713  std::set<unsigned int> _ghosted_boundaries;
1715 
1717  unsigned int _patch_size;
1718 
1720  unsigned int _ghosting_patch_size;
1721 
1722  // The maximum number of points in each leaf of the KDTree used in the nearest neighbor search.
1723  unsigned int _max_leaf_size;
1724 
1727 
1729  std::vector<Node *> _node_map;
1730 
1733 
1735  std::vector<std::vector<Real>> _bounds;
1736 
1738  std::optional<std::vector<std::pair<BoundaryID, BoundaryID>>> _paired_boundary;
1739 
1741  const bool _is_split;
1742 
1743  void cacheInfo();
1744  void freeBndNodes();
1745  void freeBndElems();
1746  void setPartitionerHelper(MeshBase * mesh = nullptr);
1747 
1748 private:
1751  mutable std::unordered_map<dof_id_type, ElemInfo> _elem_to_elem_info;
1752 
1755  mutable std::vector<const ElemInfo *> _elem_info;
1756 
1759  mutable std::vector<FaceInfo> _all_face_info;
1760 
1763  mutable std::vector<const FaceInfo *> _face_info;
1764 
1766  mutable std::unordered_map<std::pair<const Elem *, unsigned int>, FaceInfo *>
1768 
1769  // true if the _face_info member needs to be rebuilt/updated.
1770  mutable bool _finite_volume_info_dirty = true;
1771 
1772  // True if we have cached elemental dofs ids for the linear finite volume variables.
1773  // This happens in the first system which has a linear finite volume variable, considering
1774  // that currently we only support one variable per linear system.
1776 
1783  std::map<std::pair<unsigned int, unsigned int>, std::array<bool, 3>> _periodic_dim;
1784 
1789 
1791  std::vector<Node *> _extreme_nodes;
1792 
1804  void buildRefinementMap(const Elem & elem,
1805  libMesh::QBase & qrule,
1806  libMesh::QBase & qrule_face,
1807  int parent_side,
1808  int child,
1809  int child_side);
1810 
1820  void buildCoarseningMap(const Elem & elem,
1821  libMesh::QBase & qrule,
1822  libMesh::QBase & qrule_face,
1823  int input_side);
1824 
1833  void mapPoints(const std::vector<Point> & from,
1834  const std::vector<Point> & to,
1835  std::vector<QpMap> & qp_map);
1836 
1859  void findAdaptivityQpMaps(const Elem * template_elem,
1860  libMesh::QBase & qrule,
1861  libMesh::QBase & qrule_face,
1862  std::vector<std::vector<QpMap>> & refinement_map,
1863  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map,
1864  int parent_side,
1865  int child,
1866  int child_side);
1867 
1869 
1870  const std::vector<QpMap> & getPRefinementMapHelper(
1871  const Elem & elem,
1872  const std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>> &) const;
1873  const std::vector<QpMap> & getPCoarseningMapHelper(
1874  const Elem & elem,
1875  const std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>> &) const;
1876 
1881  void updateCoordTransform();
1882 
1888 
1902  std::map<std::pair<int, libMesh::ElemType>, std::vector<std::vector<QpMap>>>
1904 
1905  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1907  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1909 
1911  std::map<libMesh::ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap>>>>
1913 
1928  std::map<std::pair<int, libMesh::ElemType>, std::vector<std::pair<unsigned int, QpMap>>>
1930 
1931  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1933  std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap>>
1935 
1937  {
1939  std::set<SubdomainID> neighbor_subs;
1940 
1943  std::set<BoundaryID> boundary_ids;
1944  };
1945 
1947  std::unordered_map<SubdomainID, SubdomainData> _sub_to_data;
1948 
1950  std::unordered_map<SubdomainID, std::set<BoundaryID>> _neighbor_subdomain_boundary_ids;
1951 
1953  std::set<SubdomainID> _lower_d_interior_blocks;
1955  std::set<SubdomainID> _lower_d_boundary_blocks;
1957  std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *>
1959  std::unordered_map<const Elem *, unsigned short int> _lower_d_elem_to_higher_d_elem_side;
1960 
1963 
1966 
1970 
1973 
1976 
1979 
1985 
1987  std::vector<std::unordered_map<SubdomainID, std::set<dof_id_type>>> _block_id_mapping;
1989  std::vector<dof_id_type> _max_ids;
1991  std::vector<dof_id_type> _min_ids;
1993  std::vector<std::vector<bool>> _id_identical_flag;
1994 
1996  unsigned int _max_sides_per_elem;
1997 
1999  unsigned int _max_nodes_per_elem;
2000 
2002  unsigned int _max_nodes_per_side;
2003 
2005  void computeMaxPerElemAndSide();
2006 
2009 
2011  void buildElemIDInfo();
2012 
2014  void buildLowerDMesh();
2015 
2017  std::map<SubdomainID, Moose::CoordinateSystemType> & _coord_sys;
2018 
2020  unsigned int _rz_coord_axis;
2021 
2023  std::unordered_map<SubdomainID, std::pair<Point, RealVectorValue>> _subdomain_id_to_rz_coord_axis;
2024 
2027  std::unique_ptr<MooseAppCoordTransform> _coord_transform;
2028 
2031 
2033  std::vector<SubdomainName> _provided_coord_blocks;
2034 
2038  unsigned int _max_p_level;
2040  unsigned int _max_h_level;
2041 
2042  template <typename T>
2043  struct MeshType;
2044 };
2045 
2046 inline MooseAppCoordTransform &
2048 {
2049  mooseAssert(_coord_transform, "The coordinate transformation object is null.");
2050  return *_coord_transform;
2051 }
2052 
2053 template <>
2054 struct MooseMesh::MeshType<libMesh::ReplicatedMesh>
2055 {
2057 };
2058 
2059 template <>
2060 struct MooseMesh::MeshType<libMesh::DistributedMesh>
2061 {
2063 };
2064 
2069  : variant_filter_iterator<MeshBase::Predicate, const FaceInfo *>
2070 {
2071  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2072  template <typename PredType, typename IterType>
2073  face_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2074  : variant_filter_iterator<MeshBase::Predicate, const FaceInfo *>(d, e, p)
2075  {
2076  }
2077 };
2078 
2084  const FaceInfo * const,
2085  const FaceInfo * const &,
2086  const FaceInfo * const *>
2087 {
2088  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2089  template <typename PredType, typename IterType>
2090  const_face_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2091  : variant_filter_iterator<MeshBase::Predicate,
2092  const FaceInfo * const,
2093  const FaceInfo * const &,
2094  const FaceInfo * const *>(d, e, p)
2095  {
2096  }
2097 
2098  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2099  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2101  : variant_filter_iterator<MeshBase::Predicate,
2102  const FaceInfo * const,
2103  const FaceInfo * const &,
2104  const FaceInfo * const *>(rhs)
2105  {
2106  }
2107 };
2108 
2113  : variant_filter_iterator<MeshBase::Predicate, const ElemInfo *>
2114 {
2115  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2116  template <typename PredType, typename IterType>
2117  elem_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2118  : variant_filter_iterator<MeshBase::Predicate, const ElemInfo *>(d, e, p)
2119  {
2120  }
2121 };
2122 
2128  const ElemInfo * const,
2129  const ElemInfo * const &,
2130  const ElemInfo * const *>
2131 {
2132  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2133  template <typename PredType, typename IterType>
2134  const_elem_info_iterator(const IterType & d, const IterType & e, const PredType & p)
2135  : variant_filter_iterator<MeshBase::Predicate,
2136  const ElemInfo * const,
2137  const ElemInfo * const &,
2138  const ElemInfo * const *>(d, e, p)
2139  {
2140  }
2141 
2142  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2143  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2145  : variant_filter_iterator<MeshBase::Predicate,
2146  const ElemInfo * const,
2147  const ElemInfo * const &,
2148  const ElemInfo * const *>(rhs)
2149  {
2150  }
2151 };
2152 
2156 struct MooseMesh::bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate, BndNode *>
2157 {
2158  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2159  template <typename PredType, typename IterType>
2160  bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
2161  : variant_filter_iterator<MeshBase::Predicate, BndNode *>(d, e, p)
2162  {
2163  }
2164 };
2165 
2171  BndNode * const,
2172  BndNode * const &,
2173  BndNode * const *>
2174 {
2175  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2176  template <typename PredType, typename IterType>
2177  const_bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
2178  : variant_filter_iterator<MeshBase::Predicate,
2179  BndNode * const,
2180  BndNode * const &,
2181  BndNode * const *>(d, e, p)
2182  {
2183  }
2184 
2185  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2186  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2188  : variant_filter_iterator<MeshBase::Predicate,
2189  BndNode * const,
2190  BndNode * const &,
2191  BndNode * const *>(rhs)
2192  {
2193  }
2194 };
2195 
2199 struct MooseMesh::bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate, BndElement *>
2200 {
2201  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2202  template <typename PredType, typename IterType>
2203  bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
2204  : variant_filter_iterator<MeshBase::Predicate, BndElement *>(d, e, p)
2205  {
2206  }
2207 };
2208 
2214  BndElement * const,
2215  BndElement * const &,
2216  BndElement * const *>
2217 {
2218  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
2219  template <typename PredType, typename IterType>
2220  const_bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
2221  : variant_filter_iterator<MeshBase::Predicate,
2222  BndElement * const,
2223  BndElement * const &,
2224  BndElement * const *>(d, e, p)
2225  {
2226  }
2227 
2228  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
2229  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
2231  : variant_filter_iterator<MeshBase::Predicate,
2232  BndElement * const,
2233  BndElement * const &,
2234  BndElement * const *>(rhs)
2235  {
2236  }
2237 };
2238 
2246 
2247 template <typename T>
2248 std::unique_ptr<T>
2250 {
2251  // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh,
2252  // then we need to make sure to make our state consistent because other objects, like the periodic
2253  // boundary condition action, will be querying isDistributedMesh()
2254  if (_use_distributed_mesh != std::is_same<T, libMesh::DistributedMesh>::value)
2255  {
2256  if (getMeshPtr())
2257  mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different "
2258  "parallel type than the libMesh mesh that it wraps. This is not allowed. Please "
2259  "create another MooseMesh object to wrap the new libMesh mesh");
2261  }
2262 
2263  if (dim == libMesh::invalid_uint)
2264  {
2265  if (isParamValid("dim"))
2266  dim = getParam<MooseEnum>("dim");
2267  else
2268  // Legacy selection of the default for the 'dim' parameter
2269  dim = 1;
2270  }
2271 
2272  auto mesh = std::make_unique<T>(_communicator, dim);
2273 
2274  if (!getParam<bool>("allow_renumbering"))
2275  mesh->allow_renumbering(false);
2276 
2277  mesh->allow_remote_element_removal(_allow_remote_element_removal);
2279 
2281  {
2282  // Check of partitioner is supplied (not allowed if custom partitioner is used)
2283  if (!parameters().isParamSetByAddParam("partitioner"))
2284  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2285  // Set custom partitioner
2286  if (!_custom_partitioner.get())
2287  mooseError("Custom partitioner requested but not set!");
2288  mesh->partitioner() = _custom_partitioner->clone();
2289  }
2290  else
2291  setPartitionerHelper(mesh.get());
2292 
2293  return mesh;
2294 }
2295 
2296 inline bool
2298 {
2300 }
2301 
2302 inline void
2304 {
2305  _parallel_type = parallel_type;
2307 }
2308 
2309 inline bool
2310 MooseMesh::hasElementID(const std::string & id_name) const
2311 {
2312  return getMesh().has_elem_integer(id_name);
2313 }
2314 
2315 inline unsigned int
2316 MooseMesh::getElementIDIndex(const std::string & id_name) const
2317 {
2318  if (!hasElementID(id_name))
2319  mooseError("Mesh does not have element ID for ", id_name);
2320  return getMesh().get_elem_integer_index(id_name);
2321 }
2322 
2323 inline bool
2324 MooseMesh::areElemIDsIdentical(const std::string & id_name1, const std::string & id_name2) const
2325 {
2326  auto id1 = getElementIDIndex(id_name1);
2327  auto id2 = getElementIDIndex(id_name2);
2328  return _id_identical_flag[id1][id2];
2329 }
2330 
2331 inline const std::vector<const FaceInfo *> &
2333 {
2334  return _face_info;
2335 }
2336 
2337 inline const std::vector<FaceInfo> &
2339 {
2340  return _all_face_info;
2341 }
2342 
2343 inline const std::map<boundary_id_type, std::vector<dof_id_type>> &
2345 {
2346  return _node_set_nodes;
2347 }
2348 
2349 inline const std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *> &
2351 {
2353 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1573
bool hasDetectedPairedSidesets() const
Whether or not detectedPairedSidesets() has been called.
Definition: MooseMesh.h:999
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:1210
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:1570
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:1586
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1735
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes() const
Definition: MooseMesh.h:2344
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:1643
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1702
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:4543
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:2220
virtual unsigned int spatialDimension() const
Returns MeshBase::spatial_dimension.
Definition: MooseMesh.h:194
bool _node_to_elem_map_built
Definition: MooseMesh.h:1661
std::unique_ptr< libMesh::NodeRange > _active_node_range
Definition: MooseMesh.h:1652
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1791
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:1627
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:3136
const_bnd_elem_iterator(const bnd_elem_iterator &rhs)
Definition: MooseMesh.h:2230
bool isFiniteVolumeInfoDirty() const
Definition: MooseMesh.h:1458
void computeMaxPerElemAndSide()
Compute the maximum numbers per element and side.
Definition: MooseMesh.C:1059
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition: MooseMesh.C:3316
void buildElemIDInfo()
Build extra data for faster access to the information of extra element integers.
Definition: MooseMesh.C:1082
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1759
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:1763
bool allowRemoteElementRemoval() const
Whether we are allow remote element removal.
Definition: MooseMesh.h:1233
bool getConstructNodeListFromSideList()
Return construct node list from side list boolean.
Definition: MooseMesh.h:1556
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:2211
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1261
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:908
bool prepared() const
Setter/getter for whether the mesh is prepared.
Definition: MooseMesh.C:3264
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:3292
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:3069
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1624
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:2033
virtual MooseMesh & clone() const
Clone method.
Definition: MooseMesh.C:2910
void allowRecovery(bool allow)
Set whether or not this mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1170
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4515
const std::string LIST_GEOM_ELEM
Definition: MooseMesh.h:62
bool isCustomPartitionerRequested() const
Setter and getter for _custom_partitioner_requested.
Definition: MooseMesh.C:3836
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1984
A class for creating restricted objects.
Definition: Restartable.h:28
bool isDisplaced() const
whether this mesh is a displaced mesh
Definition: MooseMesh.h:1367
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1612
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4504
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition: MooseMesh.h:1991
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:1352
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition: MooseMesh.h:1549
const MooseUnits & lengthUnit() const
Definition: MooseMesh.C:4477
void checkDuplicateSubdomainNames()
Loop through all subdomain IDs and check if there is name duplication used for the subdomains with sa...
Definition: MooseMesh.C:4484
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:3624
unsigned int _max_leaf_size
Definition: MooseMesh.h:1723
The definition of the const_bnd_elem_iterator struct.
Definition: MooseMesh.h:2213
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1788
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:2220
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:1912
void setCoordData(const MooseMesh &other_mesh)
Set the coordinate system data to that of other_mesh.
Definition: MooseMesh.C:4469
virtual ~MooseMesh()
Definition: MooseMesh.C:348
void freeBndElems()
Definition: MooseMesh.C:375
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:2350
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1770
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3240
elem_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2117
const_bnd_node_iterator(const MooseMesh::bnd_node_iterator &rhs)
Definition: MooseMesh.h:2187
char ** blocks
The definition of the bnd_elem_iterator struct.
Definition: MooseMesh.h:2199
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:2017
const std::vector< const ElemInfo * > & elemInfoVector() const
Accessor for the element info objects owned by this process.
Definition: MooseMesh.h:1335
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:3692
face_info_iterator ownedFaceInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1527
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap()
If not already created, creates a map from every node to all active semilocal elements to which they ...
Definition: MooseMesh.C:1229
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
Calls BoundaryInfo::build_active_side_list.
Definition: MooseMesh.C:3142
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:3767
void buildLowerDMesh()
Build lower-d mesh for all sides.
Definition: MooseMesh.C:658
const std::set< BoundaryID > & meshSidesetIds() const
Returns a read-only reference to the set of sidesets currently present in the Mesh.
Definition: MooseMesh.C:3310
void setParallelType(ParallelType parallel_type)
Allow to change parallel type.
Definition: MooseMesh.h:2303
unsigned int getMaxNodesPerSide() const
Get the maximum number of nodes per side.
Definition: MooseMesh.h:1295
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1959
void cacheFVElementalDoFs() const
Cache the DoF indices for FV variables on each element.
Definition: MooseMesh.C:4166
void cacheFaceInfoVariableOwnership() const
Cache if variables live on the elements connected by the FaceInfo objects.
Definition: MooseMesh.C:4088
bool _custom_partitioner_requested
Definition: MooseMesh.h:1596
unsigned int _max_nodes_per_side
The maximum number of nodes per side.
Definition: MooseMesh.h:2002
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:1338
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:4332
std::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:1660
MooseMesh()=delete
unsigned int _max_sides_per_elem
The maximum number of sides per element.
Definition: MooseMesh.h:1996
const_face_info_iterator(const MooseMesh::face_info_iterator &rhs)
Definition: MooseMesh.h:2100
const_bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2177
bool isSemiLocal(Node *const node) const
Returns true if the node is semi-local.
Definition: MooseMesh.C:992
Moose::Kokkos::Mesh * getKokkosMesh()
Accessor for Kokkos mesh object.
Definition: MooseMesh.h:681
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:2245
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:1723
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1657
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:2664
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:1700
bool _is_changed
true if mesh is changed (i.e. after adaptivity step)
Definition: MooseMesh.h:1621
bool _doing_p_refinement
Whether we have p-refinement (whether exclusively p- or hp-refinement)
Definition: MooseMesh.h:2036
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2916
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:2600
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition: MooseMesh.C:913
std::set< SubdomainID > neighbor_subs
Neighboring subdomain ids.
Definition: MooseMesh.h:1939
unsigned int getGhostingPatchSize() const
Getter for the ghosting_patch_size parameter.
Definition: MooseMesh.h:637
std::vector< BndNode * >::iterator bnd_node_iterator_imp
Definition: MooseMesh.h:1689
const_face_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2090
The definition of the bnd_node_iterator struct.
Definition: MooseMesh.h:2156
const std::string & getBoundaryName(const BoundaryID boundary_id) const
Return the name of the boundary given the id.
Definition: MooseMesh.C:1814
face_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2073
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:1755
MeshBase & mesh
void buildHRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2396
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:4426
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:1903
const std::set< SubdomainID > & getBlockConnectedBlocks(const SubdomainID subdomain_id) const
Get the list of subdomains neighboring a given subdomain.
Definition: MooseMesh.C:3681
virtual const Node * queryNodePtr(const dof_id_type i) const
Definition: MooseMesh.C:860
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:2229
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:1958
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:3374
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1630
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:1258
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:1993
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:3220
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:163
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:1578
The definition of the const_bnd_node_iterator struct.
Definition: MooseMesh.h:2170
void setUniformRefineLevel(unsigned int, bool deletion=true)
Set uniform refinement level.
Definition: MooseMesh.C:3349
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1591
std::unique_ptr< libMesh::ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1649
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1708
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:2324
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1665
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:1692
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:931
virtual void init()
Initialize the Mesh object.
Definition: MooseMesh.C:2963
The definition of the const_face_info_iterator struct.
Definition: MooseMesh.h:2083
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1615
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:1734
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:1767
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:2028
const std::set< SubdomainID > & getNodeBlockIds(const Node &node) const
Return list of blocks to which the given node belongs.
Definition: MooseMesh.C:1516
unsigned int getMaxNodesPerElem() const
Get the maximum number of nodes per element.
Definition: MooseMesh.h:1290
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:1934
void setMeshBoundaryIDs(std::set< BoundaryID > boundary_IDs)
Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.
Definition: MooseMesh.C:3322
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:1711
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:1955
bool _linear_finite_volume_dofs_cached
Definition: MooseMesh.h:1775
void markFiniteVolumeInfoDirty()
Mark the finite volume information as dirty.
Definition: MooseMesh.h:1453
void cacheInfo()
Definition: MooseMesh.C:1428
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:2847
std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
Deprecated (DO NOT USE)
Definition: MooseMesh.h:1563
std::set< Elem * > _ghost_elems_from_ghost_boundaries
Set of elements ghosted by ghostGhostedBoundaries.
Definition: MooseMesh.h:1978
virtual void buildMesh()=0
Must be overridden by child classes.
void setPartitionerHelper(MeshBase *mesh=nullptr)
Definition: MooseMesh.C:3755
void deleteRemoteElements()
Delete remote elements.
Definition: MooseMesh.C:4076
unsigned int _to
The qp to map to.
Definition: MooseMesh.h:83
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1298
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1962
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:1759
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:3075
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1785
void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy)
Set the patch size update strategy.
Definition: MooseMesh.C:3534
void buildFiniteVolumeInfo() const
Builds the face and elem info vectors that store meta-data needed for looping over and doing calculat...
Definition: MooseMesh.C:3870
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:1950
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis(SubdomainID subdomain_id) const
Gets the general axisymmetric coordinate axis for a block.
Definition: MooseMesh.C:4416
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:3304
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition: MooseMesh.h:1953
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:3252
elem_info_iterator ownedElemInfoBegin()
Iterators to owned faceInfo objects.
Definition: MooseMesh.C:1545
void setIsCustomPartitionerRequested(bool cpr)
Definition: MooseMesh.C:3858
std::set< BoundaryID > boundary_ids
The boundary ids that are attached.
Definition: MooseMesh.h:1943
unsigned int _max_h_level
Maximum h-refinement level of all elements.
Definition: MooseMesh.h:2040
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:1562
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:2675
bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2203
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:2931
const Moose::Kokkos::Mesh * getKokkosMesh() const
Definition: MooseMesh.h:682
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:3744
const MeshBase * getMeshPtr() const
Definition: MooseMesh.C:3569
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:4432
const std::vector< const FaceInfo * > & faceInfo() const
Accessor for local FaceInfo objects.
Definition: MooseMesh.h:2332
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:1263
const std::vector< FaceInfo > & allFaceInfo() const
Accessor for all FaceInfo objects.
Definition: MooseMesh.h:2338
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1578
bool isSplit() const
Definition: MooseMesh.h:1481
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:1685
std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
Definition: MooseMesh.h:1697
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:2310
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1569
virtual dof_id_type nLocalNodes() const
Definition: MooseMesh.h:333
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1975
std::unique_ptr< Moose::Kokkos::Mesh > _kokkos_mesh
Pointer to Kokkos mesh object.
Definition: MooseMesh.h:1587
bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2160
virtual bool skipNoncriticalPartitioning() const
Definition: MooseMesh.C:4549
SemiLocalNodeRange * getActiveSemiLocalNodeRange() const
Definition: MooseMesh.C:1289
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:1363
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)
This method sets the name for subdomain_id to name.
Definition: MooseMesh.C:1771
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1700
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3575
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem() const
Get the map from subdomain ID to coordinate system type, e.g.
Definition: MooseMesh.C:4354
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1688
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:2249
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:1566
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:3012
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:1213
virtual SubdomainID nSubdomains() const
Definition: MooseMesh.h:337
const_elem_info_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:2134
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:2944
unsigned int getAxisymmetricRadialCoord() const
Returns the desired radial direction for RZ coordinate transformation.
Definition: MooseMesh.C:4441
bool isPartitionerForced() const
Tell the user if the partitioner was overriden for any reason.
Definition: MooseMesh.h:1165
const std::set< unsigned int > & getGhostedBoundaries() const
Return a writable reference to the set of ghosted boundary IDs.
Definition: MooseMesh.C:3368
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1965
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:2267
unsigned int sideWithBoundaryID(const Elem *const elem, const BoundaryID boundary_id) const
Calls BoundaryInfo::side_with_boundary_id().
Definition: MooseMesh.C:3148
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:3597
unsigned int getMaxLeafSize() const
Getter for the maximum leaf size parameter.
Definition: MooseMesh.h:642
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:1783
virtual const Node * nodePtr(const dof_id_type i) const
Definition: MooseMesh.C:848
bool hasLowerD() const
Definition: MooseMesh.h:1544
std::vector< dof_id_type > _max_ids
Maximum integer ID for each extra element integer.
Definition: MooseMesh.h:1989
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:599
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:1681
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:2027
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
Definition: MooseMesh.C:3648
void checkCoordinateSystems()
Performs a sanity check for every element in the mesh.
Definition: MooseMesh.C:4454
ParallelType getParallelType() const
Definition: MooseMesh.h:1155
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1908
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1932
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1741
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:4228
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1633
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:1152
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1679
const Node * addUniqueNode(const Point &p, Real tol=1e-6)
Add a new node to the mesh.
Definition: MooseMesh.C:1593
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1705
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:1627
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:2557
The definition of the face_info_iterator struct.
Definition: MooseMesh.h:2068
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:3343
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1695
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:2030
const std::set< SubdomainID > & boundaryLowerDBlocks() const
Definition: MooseMesh.h:1553
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:1791
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:4525
virtual dof_id_type nActiveLocalElem() const
Definition: MooseMesh.h:335
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:2377
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:3842
unsigned int getPatchSize() const
Getter for the patch_size parameter.
Definition: MooseMesh.C:3528
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
Definition: MooseMesh.C:2547
std::string getBoundaryString(const BoundaryID boundary_id) const
Return the name of the boundary given the id, if it exists.
Definition: MooseMesh.C:1826
bool _parallel_type_overridden
Definition: MooseMesh.h:1580
bool isRegularOrthogonal()
Getter to query if the mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1195
unsigned int getMaxSidesPerElem() const
Get the maximum number of sides per element.
Definition: MooseMesh.h:1285
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:3178
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:1729
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:1704
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:4531
bool _displace_node_list_by_side_list
Whether or not to displace unrelated nodesets by nodesets constructed from sidesets.
Definition: MooseMesh.h:1969
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:1751
bool skipRefineWhenUseSplit() const
Whether or not skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:596
std::vector< BndElement * >::iterator bnd_elem_iterator_imp
Definition: MooseMesh.h:1696
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
Definition: MooseMesh.C:1682
void printInfo(std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
Calls print_info() on the underlying Mesh.
Definition: MooseMesh.C:3589
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:2243
virtual dof_id_type nNodes() const
Calls n_nodes/elem() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3202
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition: MooseMesh.C:4045
MooseAppCoordTransform & coordTransform()
Definition: MooseMesh.h:2047
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:2636
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:943
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:1123
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:1929
void setBoundaryName(BoundaryID boundary_id, BoundaryName name)
This method sets the boundary name of the boundary based on the id parameter.
Definition: MooseMesh.C:1802
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1726
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:1680
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:4368
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:3328
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool _partitioner_overridden
Definition: MooseMesh.h:1592
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1954
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:951
void isDisplaced(bool is_displaced)
Set whether this mesh is a displaced mesh.
Definition: MooseMesh.h:1362
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:1162
unsigned int getBlocksMaxDimension(const std::vector< SubdomainName > &blocks) const
Returns the maximum element dimension on the given blocks.
Definition: MooseMesh.C:3033
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:2008
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition: MooseMesh.h:1243
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1583
libMesh::NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:1275
virtual unsigned int nPartitions() const
Definition: MooseMesh.h:338
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:3362
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:2282
void freeBndNodes()
Definition: MooseMesh.C:356
The definition of the elem_info_iterator struct.
Definition: MooseMesh.h:2112
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:2205
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:1618
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:3659
unsigned int _max_nodes_per_elem
The maximum number of nodes per element.
Definition: MooseMesh.h:1999
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1972
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1906
void setAxisymmetricCoordAxis(const MooseEnum &rz_coord_axis)
For axisymmetric simulations, set the symmetry coordinate axis.
Definition: MooseMesh.C:4360
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1738
std::set< BoundaryID > getSubdomainInterfaceBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundaries that contact the given subdomain.
Definition: MooseMesh.C:3635
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
unsigned int maxPLevel() const
Returns the maximum p-refinement level of all elements.
Definition: MooseMesh.h:1511
libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier=0.01) const
Get a (slightly inflated) processor bounding box.
Definition: MooseMesh.C:3546
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:2956
void buildBndElemList()
Definition: MooseMesh.C:1178
bool getDisplaceNodeListBySideList()
Return displace node list by side list boolean.
Definition: MooseMesh.h:1559
std::set< SubdomainID > getInterfaceConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains contacting the given boundary.
Definition: MooseMesh.C:3670
bool isParallelTypeForced() const
Tell the user if the distribution was overriden for any reason.
Definition: MooseMesh.h:1145
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:1714
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:1987
void needGhostGhostedBoundaries(bool needghost)
Whether or not we want to ghost ghosted boundaries.
Definition: MooseMesh.h:627
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:2706
bool needsRemoteElemDeletion() const
Whether we need to delete remote elements.
Definition: MooseMesh.h:1223
std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
Definition: MooseMesh.h:1690
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1717
bool skipDeletionRepartitionAfterRefine() const
Return a flag indicating whether or not we should skip remote deletion and repartition after uniform ...
Definition: MooseMesh.h:2297
elem_info_iterator ownedElemInfoEnd()
Definition: MooseMesh.C:1553
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:1927
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:3864
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:3356
virtual dof_id_type maxNodeId() const
Calls max_node/elem_id() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3214
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3226
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1325
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:334
const_elem_info_iterator(const MooseMesh::elem_info_iterator &rhs)
Definition: MooseMesh.h:2144
face_info_iterator ownedFaceInfoEnd()
Definition: MooseMesh.C:1536
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:2023
const MooseEnum & partitionerName() const
Definition: MooseMesh.h:1160
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:3160
const RealVectorValue & getNormalByBoundaryID(BoundaryID id) const
Returns the normal vector associated with a given BoundaryID.
Definition: MooseMesh.C:2900
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we&#39;re doing includes p-refinement.
Definition: MooseMesh.h:1501
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1671
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened...
Definition: MooseMesh.C:937
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
Definition: MooseMesh.C:3540
bool doingPRefinement() const
Query whether the kind of adaptivity we&#39;re doing includes p-refinement.
Definition: MooseMesh.h:1506
virtual bool skipPartitioning() const
Definition: MooseMesh.h:339
unsigned int maxHLevel() const
Returns the maximum h-refinement level of all elements.
Definition: MooseMesh.h:1516
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor. ...
Definition: MooseMesh.C:3441
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1713
MeshBase::node_iterator localNodesBegin()
Calls local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3154
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:2020
void computeFiniteVolumeCoords() const
Compute the face coordinate value for all FaceInfo and ElemInfo objects.
Definition: MooseMesh.C:4024
bool _distribution_overridden
Definition: MooseMesh.h:1579
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:1025
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1947
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1595
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:3718
unsigned int getElementIDIndex(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Definition: MooseMesh.h:2316
void needsRemoteElemDeletion(bool need_delete)
Set whether we need to delete remote elements.
Definition: MooseMesh.h:1218
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:1640
virtual bool isDistributedMesh() const
Returns the final Mesh distribution type.
Definition: MooseMesh.h:1140
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:4537
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:1842
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1720
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:1346
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:3184
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1653
QpMap()
Definition: MooseMesh.h:77
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1312
The definition of the const_elem_info_iterator struct.
Definition: MooseMesh.h:2127
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1732
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:1664
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:389
const ElemInfo & elemInfo(const dof_id_type id) const
Accessor for the elemInfo object for a given element ID.
Definition: MooseMesh.C:4018
void setCustomPartitioner(libMesh::Partitioner *partitioner)
Setter for custom partitioner.
Definition: MooseMesh.C:3826
Real _distance
The distance between them.
Definition: MooseMesh.h:86
unsigned int nFace() const
accessors for the FaceInfo objects
Definition: MooseMesh.h:1301
static MooseEnum elemTypes()
returns MooseMesh element type options
Definition: MooseMesh.C:4053
Base variable class.
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:882
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2453
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1714
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1655
uint8_t dof_id_type
virtual dof_id_type nElem() const
Definition: MooseMesh.C:3208
const std::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:1201
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:1394
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1651
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3298
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1753
unsigned int _max_p_level
Maximum p-refinement level of all elements.
Definition: MooseMesh.h:2038
ParallelType
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
Definition: MooseMesh.C:4219
virtual unsigned int effectiveSpatialDimension() const
Returns the effective spatial dimension determined by the coordinates actually used by the mesh...
Definition: MooseMesh.C:3018