www.mooseframework.org
MooseMesh.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "MooseObject.h"
13 #include "BndNode.h"
14 #include "BndElement.h"
15 #include "Restartable.h"
16 #include "MooseEnum.h"
17 #include "PerfGraphInterface.h"
18 
19 #include <memory> //std::unique_ptr
20 #include <unordered_map>
21 #include <unordered_set>
22 
23 // libMesh
24 #include "libmesh/elem_range.h"
25 #include "libmesh/mesh_base.h"
26 #include "libmesh/node_range.h"
27 #include "libmesh/nanoflann.hpp"
28 #include "libmesh/vector_value.h"
29 
30 // forward declaration
31 class MooseMesh;
32 class Assembly;
34 
35 // libMesh forward declarations
36 namespace libMesh
37 {
38 class ExodusII_IO;
39 class QBase;
40 class PeriodicBoundaries;
41 class Partitioner;
42 class GhostingFunctor;
43 class BoundingBox;
44 }
45 
46 // Useful typedefs
47 typedef StoredRange<std::set<Node *>::iterator, Node *> SemiLocalNodeRange;
48 
49 template <>
51 
55 class QpMap
56 {
57 public:
58  QpMap() : _distance(std::numeric_limits<Real>::max()) {}
59 
61  unsigned int _from;
62 
64  unsigned int _to;
65 
67  Real _distance;
68 };
69 
74 class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterface
75 {
76 public:
81  MooseMesh(const MooseMesh & other_mesh);
82 
83  virtual ~MooseMesh();
84 
85  // The type of libMesh::MeshBase that will be used
86  enum class ParallelType
87  {
88  DEFAULT,
89  REPLICATED,
91  };
92 
96  virtual MooseMesh & clone() const;
97 
103  virtual std::unique_ptr<MooseMesh> safeClone() const = 0;
104 
109  std::unique_ptr<MeshBase> buildMeshBaseObject(ParallelType override_type = ParallelType::DEFAULT);
110 
115  void setMeshBase(std::unique_ptr<MeshBase> mesh_base);
116 
123  virtual void init();
124 
130  virtual void buildMesh() = 0;
131 
137  virtual unsigned int dimension() const;
138 
144  virtual unsigned int effectiveSpatialDimension() const;
145 
150  std::vector<BoundaryID> getBoundaryIDs(const Elem * const elem,
151  const unsigned short int side) const;
152 
160  const std::set<BoundaryID> & getBoundaryIDs() const;
161 
168  void buildNodeList();
169  void buildBndElemList();
170 
175  const std::map<dof_id_type, std::vector<dof_id_type>> & nodeToElemMap();
176 
184  const std::map<dof_id_type, std::vector<dof_id_type>> & nodeToActiveSemilocalElemMap();
185 
190  struct bnd_node_iterator;
191  struct const_bnd_node_iterator;
192 
193  struct bnd_elem_iterator;
194  struct const_bnd_elem_iterator;
195 
199  virtual bnd_node_iterator bndNodesBegin();
200  virtual bnd_node_iterator bndNodesEnd();
201 
205  virtual bnd_elem_iterator bndElemsBegin();
206  virtual bnd_elem_iterator bndElemsEnd();
207 
212 
219  void buildSideList(std::vector<dof_id_type> & el,
220  std::vector<unsigned short int> & sl,
221  std::vector<boundary_id_type> & il);
225  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> buildSideList();
226 
230  unsigned int sideWithBoundaryID(const Elem * const elem, const BoundaryID boundary_id) const;
231 
235  MeshBase::const_node_iterator localNodesBegin();
236  MeshBase::const_node_iterator localNodesEnd();
237 
241  MeshBase::const_element_iterator activeLocalElementsBegin();
242  const MeshBase::const_element_iterator activeLocalElementsEnd();
243 
247  virtual dof_id_type nNodes() const;
248  virtual dof_id_type nElem() const;
249 
255  virtual dof_id_type maxNodeId() const;
256  virtual dof_id_type maxElemId() const;
257 
264  virtual const Node & node(const dof_id_type i) const;
265  virtual Node & node(const dof_id_type i);
266  virtual const Node & nodeRef(const dof_id_type i) const;
267  virtual Node & nodeRef(const dof_id_type i);
268  virtual const Node * nodePtr(const dof_id_type i) const;
269  virtual Node * nodePtr(const dof_id_type i);
270  virtual const Node * queryNodePtr(const dof_id_type i) const;
271  virtual Node * queryNodePtr(const dof_id_type i);
272 
279  virtual Elem * elem(const dof_id_type i);
280  virtual const Elem * elem(const dof_id_type i) const;
281  virtual Elem * elemPtr(const dof_id_type i);
282  virtual const Elem * elemPtr(const dof_id_type i) const;
283  virtual Elem * queryElemPtr(const dof_id_type i);
284  virtual const Elem * queryElemPtr(const dof_id_type i) const;
285 
289  bool prepared() const;
290  virtual void prepared(bool state);
291 
297  void needsPrepareForUse();
298 
304  void meshChanged();
305 
311  virtual void onMeshChanged();
312 
316  void cacheChangedLists();
317 
325 
333 
340  const std::vector<const Elem *> & coarsenedElementChildren(const Elem * elem) const;
341 
346  void updateActiveSemiLocalNodeRange(std::set<dof_id_type> & ghosted_elems);
347 
353  bool isSemiLocal(Node * const node) const;
354 
356 
360  ConstElemRange * getActiveLocalElementRange();
361  NodeRange * getActiveNodeRange();
363  ConstNodeRange * getLocalNodeRange();
364  StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange();
365  StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange();
367 
371  const std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> &
372  getBoundariesToElems() const;
373 
378  const std::set<SubdomainID> & meshSubdomains() const;
379 
384  const std::set<BoundaryID> & meshBoundaryIds() const;
385 
390  const std::set<BoundaryID> & meshSidesetIds() const;
391 
396  const std::set<BoundaryID> & meshNodesetIds() const;
397 
402  void setBoundaryToNormalMap(std::unique_ptr<std::map<BoundaryID, RealVectorValue>> boundary_map);
403 
404  // DEPRECATED METHOD
405  void setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map);
406 
411  void setMeshBoundaryIDs(std::set<BoundaryID> boundary_IDs);
412 
418 
423  void prepare(bool force = false);
424 
428  void update();
429 
433  unsigned int uniformRefineLevel() const;
434 
438  void setUniformRefineLevel(unsigned int);
439 
443  void addGhostedBoundary(BoundaryID boundary_id);
444 
449  void setGhostedBoundaryInflation(const std::vector<Real> & inflation);
450 
454  const std::set<unsigned int> & getGhostedBoundaries() const;
455 
459  const std::vector<Real> & getGhostedBoundaryInflation() const;
460 
464  void ghostGhostedBoundaries();
465 
469  unsigned int getPatchSize() const;
470 
474  unsigned int getGhostingPatchSize() const { return _ghosting_patch_size; };
475 
479  unsigned int getMaxLeafSize() const { return _max_leaf_size; };
483  void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy);
484 
489 
496  BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const;
497 
501  operator libMesh::MeshBase &();
502  operator const libMesh::MeshBase &() const;
503 
507  MeshBase & getMesh();
508  const MeshBase & getMesh() const;
509 
513  virtual ExodusII_IO * exReader() const;
514 
518  void printInfo(std::ostream & os = libMesh::out) const;
519 
523  const std::set<SubdomainID> & getNodeBlockIds(const Node & node) const;
524 
529  const std::vector<dof_id_type> & getNodeList(boundary_id_type nodeset_id) const;
530 
536  const Node * addUniqueNode(const Point & p, Real tol = 1e-6);
537 
551  Node * addQuadratureNode(const Elem * elem,
552  const unsigned short int side,
553  const unsigned int qp,
554  BoundaryID bid,
555  const Point & point);
556 
564  Node * getQuadratureNode(const Elem * elem, const unsigned short int side, const unsigned int qp);
565 
570  void clearQuadratureNodes();
571 
578  BoundaryID getBoundaryID(const BoundaryName & boundary_name) const;
579 
586  std::vector<BoundaryID> getBoundaryIDs(const std::vector<BoundaryName> & boundary_name,
587  bool generate_unknown = false) const;
588 
595  SubdomainID getSubdomainID(const SubdomainName & subdomain_name) const;
596 
603  std::vector<SubdomainID> getSubdomainIDs(const std::vector<SubdomainName> & subdomain_name) const;
604 
608  void setSubdomainName(SubdomainID subdomain_id, SubdomainName name);
609 
613  const std::string & getSubdomainName(SubdomainID subdomain_id);
614 
618  void setBoundaryName(BoundaryID boundary_id, BoundaryName name);
619 
623  const std::string & getBoundaryName(BoundaryID boundary_id);
624 
630  void buildPeriodicNodeMap(std::multimap<dof_id_type, dof_id_type> & periodic_node_map,
631  unsigned int var_number,
632  PeriodicBoundaries * pbs) const;
633 
637  void buildPeriodicNodeSets(std::map<BoundaryID, std::set<dof_id_type>> & periodic_node_sets,
638  unsigned int var_number,
639  PeriodicBoundaries * pbs) const;
640 
644  Real dimensionWidth(unsigned int component) const;
645 
647 
650  virtual Real getMinInDimension(unsigned int component) const;
651  virtual Real getMaxInDimension(unsigned int component) const;
653 
664  bool detectOrthogonalDimRanges(Real tol = 1e-6);
665 
670  void addPeriodicVariable(unsigned int var_num, BoundaryID primary, BoundaryID secondary);
671 
677  bool isTranslatedPeriodic(unsigned int nonlinear_var_num, unsigned int component) const;
678 
686  RealVectorValue minPeriodicVector(unsigned int nonlinear_var_num, Point p, Point q) const;
687 
695  Real minPeriodicDistance(unsigned int nonlinear_var_num, Point p, Point q) const;
696 
703  const std::pair<BoundaryID, BoundaryID> * getPairedBoundaryMapping(unsigned int component);
704 
712 
722  const std::vector<std::vector<QpMap>> &
723  getRefinementMap(const Elem & elem, int parent_side, int child, int child_side);
724 
732  const std::vector<std::pair<unsigned int, QpMap>> & getCoarseningMap(const Elem & elem,
733  int input_side);
734 
739  void
740  changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev);
741 
748  const std::set<BoundaryID> & getSubdomainBoundaryIds(SubdomainID subdomain_id) const;
749 
753  bool isBoundaryNode(dof_id_type node_id) const;
754 
759  bool isBoundaryNode(dof_id_type node_id, BoundaryID bnd_id) const;
760 
764  bool isBoundaryElem(dof_id_type elem_id) const;
765 
770  bool isBoundaryElem(dof_id_type elem_id, BoundaryID bnd_id) const;
771 
779  void errorIfDistributedMesh(std::string name) const;
780 
784  bool isDistributedMesh() const { return _use_distributed_mesh; }
785 
790 
791  /*
792  * Set/Get the partitioner name
793  */
794  const MooseEnum & partitionerName() const { return _partitioner_name; }
795 
800 
804  void allowRecovery(bool allow) { _allow_recovery = allow; }
805 
809  void setCustomPartitioner(Partitioner * partitioner);
810 
812 
815  bool isCustomPartitionerRequested() const;
816  void setIsCustomPartitionerRequested(bool cpr);
818 
821 
823  bool hasSecondOrderElements();
824 
829  virtual std::unique_ptr<PointLocatorBase> getPointLocator() const;
830 
835  virtual std::string getFileName() const { return ""; }
836 
838  using PeriodicNodeInfo = std::pair<const Node *, BoundaryID>;
839 
843  void needsRemoteElemDeletion(bool need_delete) { _need_delete = need_delete; }
844 
848  bool needsRemoteElemDeletion() const { return _need_delete; }
849 
850 protected:
852  std::vector<std::unique_ptr<GhostingFunctor>> _ghosting_functors;
853 
855  std::vector<std::shared_ptr<RelationshipManager>> _relationship_managers;
856 
860 
867 
869  std::unique_ptr<libMesh::MeshBase> _mesh;
870 
874 
876  std::unique_ptr<Partitioner> _custom_partitioner;
878 
880  enum
881  {
882  X = 0,
883  Y,
885  };
886  enum
887  {
888  MIN = 0,
890  };
891 
893  unsigned int _uniform_refine_level;
894 
897 
900 
903 
906 
908  std::unique_ptr<ConstElemPointerRange> _refined_elements;
909 
911  std::unique_ptr<ConstElemPointerRange> _coarsened_elements;
912 
918  std::map<const Elem *, std::vector<const Elem *>> _coarsened_element_children;
919 
921  std::set<Node *> _semilocal_node_list;
922 
927  std::unique_ptr<ConstElemRange> _active_local_elem_range;
928 
929  std::unique_ptr<SemiLocalNodeRange> _active_semilocal_node_range;
930  std::unique_ptr<NodeRange> _active_node_range;
931  std::unique_ptr<ConstNodeRange> _local_node_range;
932  std::unique_ptr<StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *>> _bnd_node_range;
933  std::unique_ptr<StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *>>
935 
937  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_elem_map;
939 
941  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_active_semilocal_elem_map;
943 
948  std::set<SubdomainID> _mesh_subdomains;
949 
951 
956  std::set<BoundaryID> _mesh_boundary_ids;
957  std::set<BoundaryID> _mesh_sideset_ids;
958  std::set<BoundaryID> _mesh_nodeset_ids;
960 
962  std::unique_ptr<std::map<BoundaryID, RealVectorValue>> _boundary_to_normal_map;
963 
965  std::vector<BndNode *> _bnd_nodes;
966  typedef std::vector<BndNode *>::iterator bnd_node_iterator_imp;
967  typedef std::vector<BndNode *>::const_iterator const_bnd_node_iterator_imp;
969  std::map<boundary_id_type, std::set<dof_id_type>> _bnd_node_ids;
970 
972  std::vector<BndElement *> _bnd_elems;
973  typedef std::vector<BndElement *>::iterator bnd_elem_iterator_imp;
974  typedef std::vector<BndElement *>::const_iterator const_bnd_elem_iterator_imp;
975 
977  std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type>> _bnd_elem_ids;
978 
979  std::map<dof_id_type, Node *> _quadrature_nodes;
980  std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *>>>
982  std::vector<BndNode> _extra_bnd_nodes;
983 
985  std::map<dof_id_type, std::set<SubdomainID>> _block_node_list;
986 
988  std::map<boundary_id_type, std::vector<dof_id_type>> _node_set_nodes;
989 
990  std::set<unsigned int> _ghosted_boundaries;
991  std::vector<Real> _ghosted_boundaries_inflation;
992 
994  unsigned int _patch_size;
995 
997  unsigned int _ghosting_patch_size;
998 
999  // The maximum number of points in each leaf of the KDTree used in the nearest neighbor search.
1000  unsigned int _max_leaf_size;
1001 
1004 
1006  std::vector<Node *> _node_map;
1007 
1010 
1012  std::vector<std::vector<Real>> _bounds;
1013 
1015  std::vector<std::pair<BoundaryID, BoundaryID>> _paired_boundary;
1016 
1017  void cacheInfo();
1018  void freeBndNodes();
1019  void freeBndElems();
1020 
1021 private:
1026  std::map<unsigned int, std::vector<bool>> _periodic_dim;
1027 
1032 
1034  std::vector<Node *> _extreme_nodes;
1035 
1041  void detectPairedSidesets();
1042 
1054  void buildRefinementMap(const Elem & elem,
1055  QBase & qrule,
1056  QBase & qrule_face,
1057  int parent_side,
1058  int child,
1059  int child_side);
1060 
1070  void buildCoarseningMap(const Elem & elem, QBase & qrule, QBase & qrule_face, int input_side);
1071 
1080  void mapPoints(const std::vector<Point> & from,
1081  const std::vector<Point> & to,
1082  std::vector<QpMap> & qp_map);
1083 
1106  void findAdaptivityQpMaps(const Elem * template_elem,
1107  QBase & qrule,
1108  QBase & qrule_face,
1109  std::vector<std::vector<QpMap>> & refinement_map,
1110  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map,
1111  int parent_side,
1112  int child,
1113  int child_side);
1114 
1116  std::map<std::pair<int, ElemType>, std::vector<std::vector<QpMap>>> _elem_type_to_refinement_map;
1117 
1119  std::map<ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap>>>>
1121 
1123  std::map<std::pair<int, ElemType>, std::vector<std::pair<unsigned int, QpMap>>>
1125 
1127  std::map<SubdomainID, std::set<BoundaryID>> _subdomain_boundary_ids;
1128 
1131 
1134 
1163 
1166 };
1167 
1171 struct MooseMesh::bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate, BndNode *>
1172 {
1173  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1174  template <typename PredType, typename IterType>
1175  bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
1176  : variant_filter_iterator<MeshBase::Predicate, BndNode *>(d, e, p)
1177  {
1178  }
1179 };
1180 
1185 struct MooseMesh::const_bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate,
1186  BndNode * const,
1187  BndNode * const &,
1188  BndNode * const *>
1189 {
1190  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1191  template <typename PredType, typename IterType>
1192  const_bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
1193  : variant_filter_iterator<MeshBase::Predicate,
1194  BndNode * const,
1195  BndNode * const &,
1196  BndNode * const *>(d, e, p)
1197  {
1198  }
1199 
1200  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
1201  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
1203  : variant_filter_iterator<MeshBase::Predicate,
1204  BndNode * const,
1205  BndNode * const &,
1206  BndNode * const *>(rhs)
1207  {
1208  }
1209 };
1210 
1214 struct MooseMesh::bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate, BndElement *>
1215 {
1216  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1217  template <typename PredType, typename IterType>
1218  bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
1219  : variant_filter_iterator<MeshBase::Predicate, BndElement *>(d, e, p)
1220  {
1221  }
1222 };
1223 
1228 struct MooseMesh::const_bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate,
1229  BndElement * const,
1230  BndElement * const &,
1231  BndElement * const *>
1232 {
1233  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1234  template <typename PredType, typename IterType>
1235  const_bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
1236  : variant_filter_iterator<MeshBase::Predicate,
1237  BndElement * const,
1238  BndElement * const &,
1239  BndElement * const *>(d, e, p)
1240  {
1241  }
1242 
1243  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
1244  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
1246  : variant_filter_iterator<MeshBase::Predicate,
1247  BndElement * const,
1248  BndElement * const &,
1249  BndElement * const *>(rhs)
1250  {
1251  }
1252 };
1253 
1258 typedef StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> ConstBndNodeRange;
1259 typedef StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> ConstBndElemRange;
1260 
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:859
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:835
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:868
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:884
PerfID _build_refinement_map_timer
Definition: MooseMesh.h:1155
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1012
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:921
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:979
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:1475
bool _node_to_elem_map_built
Definition: MooseMesh.h:938
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
Deprecated (DO NOT USE)
Definition: MooseMesh.h:852
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1034
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:925
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList()
As above, but uses the non-deprecated std::tuple interface.
Definition: MooseMesh.C:2193
const_bnd_elem_iterator(const bnd_elem_iterator &rhs)
Definition: MooseMesh.h:1245
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2217
PerfID _build_coarsening_map_timer
Definition: MooseMesh.h:1156
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition: MooseMesh.C:2334
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:1466
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:737
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:516
bool prepared() const
Setter/getter for the _is_prepared flag.
Definition: MooseMesh.C:2291
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:2310
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:2161
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:899
virtual MooseMesh & clone() const
Clone method.
Definition: MooseMesh.C:1963
void allowRecovery(bool allow)
Set whether or not this mesh is allowed to read a recovery file.
Definition: MooseMesh.h:804
bool isCustomPartitionerRequested() const
Setter and getter for _custom_partitioner_requested.
Definition: MooseMesh.C:2702
A class for creating restricted objects.
Definition: Restartable.h:29
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:893
const std::set< BoundaryID > & getSubdomainBoundaryIds(SubdomainID subdomain_id) const
Get the list of boundary ids associated with the given subdomain id.
Definition: MooseMesh.C:2621
unsigned int _max_leaf_size
Definition: MooseMesh.h:1000
The definition of the const_bnd_elem_iterator struct.
Definition: MooseMesh.h:1228
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1031
Keeps track of stuff related to assembling.
Definition: Assembly.h:62
const_bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1235
virtual ~MooseMesh()
Definition: MooseMesh.C:304
void freeBndElems()
Definition: MooseMesh.C:330
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2267
const_bnd_node_iterator(const MooseMesh::bnd_node_iterator &rhs)
Definition: MooseMesh.h:1202
PerfID _build_node_list_timer
Definition: MooseMesh.h:1141
The definition of the bnd_elem_iterator struct.
Definition: MooseMesh.h:1214
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:2633
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:712
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:902
const std::set< BoundaryID > & meshSidesetIds() const
Returns a read-only reference to the set of sidesets currently present in the Mesh.
Definition: MooseMesh.C:2328
VectorValue< Real > RealVectorValue
Definition: Assembly.h:31
bool isDistributedMesh() const
Returns the final Mesh distribution type.
Definition: MooseMesh.h:784
bool _custom_partitioner_requested
Definition: MooseMesh.h:877
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems() const
Returns a map of boundaries to elements.
Definition: MooseMesh.C:814
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:937
const_bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1192
bool isSemiLocal(Node *const node) const
Returns true if the node is semi-local.
Definition: MooseMesh.C:600
RealVectorValue minPeriodicVector(unsigned int nonlinear_var_num, Point p, Point q) const
This function returns the minimum vector between two points on the mesh taking into account periodici...
Definition: MooseMesh.C:1516
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:1259
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:1731
MeshBase::const_node_iterator localNodesBegin()
Calls local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2205
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:977
bool _is_changed
true if mesh is changed (i.e. after adaptivity step)
Definition: MooseMesh.h:896
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:1667
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
Definition: MooseMesh.C:1146
void cacheChangedLists()
Cache information about what elements were refined and coarsened in the previous step.
Definition: MooseMesh.C:521
bool isTranslatedPeriodic(unsigned int nonlinear_var_num, unsigned int component) const
Returns whether this generated mesh is periodic in the given dimension for the given variable...
Definition: MooseMesh.C:1505
unsigned int getGhostingPatchSize() const
Getter for the ghosting_patch_size parameter.
Definition: MooseMesh.h:474
std::vector< BndNode * >::iterator bnd_node_iterator_imp
Definition: MooseMesh.h:966
The definition of the bnd_node_iterator struct.
Definition: MooseMesh.h:1171
virtual const Node * queryNodePtr(const dof_id_type i) const
Definition: MooseMesh.C:472
Helper object for holding qp mapping info.
Definition: MooseMesh.h:55
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:2391
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:908
virtual dof_id_type maxElemId() const
Definition: MooseMesh.C:2247
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:876
The definition of the const_bnd_node_iterator struct.
Definition: MooseMesh.h:1185
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:872
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:985
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:942
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:969
ConstElemPointerRange * refinedElementRange() const
Return a range that is suitable for threaded execution over elements that were just refined...
Definition: MooseMesh.C:539
virtual void init()
Initialize the Mesh object.
Definition: MooseMesh.C:2032
PerfID _get_boundary_node_range_timer
Definition: MooseMesh.h:1148
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1357
const std::set< SubdomainID > & getNodeBlockIds(const Node &node) const
Return list of blocks to which the given node belongs.
Definition: MooseMesh.C:847
MooseMesh(const InputParameters &parameters)
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:152
void setMeshBoundaryIDs(std::set< BoundaryID > boundary_IDs)
Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.
Definition: MooseMesh.C:2340
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:988
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void cacheInfo()
Definition: MooseMesh.C:820
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:1911
std::map< std::pair< int, 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.
Definition: MooseMesh.h:1124
virtual void buildMesh()=0
Must be overridden by child classes.
unsigned int _to
The qp to map to.
Definition: MooseMesh.h:64
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:774
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:436
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1130
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2167
void setPatchUpdateStrategy(Moose::PatchUpdateType patch_update_strategy)
Set the patch size update strategy.
Definition: MooseMesh.C:2532
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:930
unsigned int PerfID
Definition: MooseTypes.h:163
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:2322
virtual Elem * queryElemPtr(const dof_id_type i)
Definition: MooseMesh.C:2279
PerfID _detect_paired_sidesets_timer
Definition: MooseMesh.h:1154
void setIsCustomPartitionerRequested(bool cpr)
Definition: MooseMesh.C:2724
MeshBase::const_node_iterator localNodesEnd()
Definition: MooseMesh.C:2211
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:934
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:860
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:1742
StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
Definition: MooseTypes.h:166
PerfID _cache_changed_lists_timer
Definition: MooseMesh.h:1139
bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1218
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2685
std::map< 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:1120
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:864
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:962
std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
Definition: MooseMesh.h:974
bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1175
SemiLocalNodeRange * getActiveSemiLocalNodeRange() const
Definition: MooseMesh.C:765
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:995
InputParameters validParams< MooseMesh >()
Definition: MooseMesh.C:63
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2567
void setSubdomainName(SubdomainID subdomain_id, SubdomainName name)
This method returns a writable reference to a subdomain name based on the id parameter.
Definition: MooseMesh.C:1118
PerfID _find_adaptivity_qp_maps_timer
Definition: MooseMesh.h:1157
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:965
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:42
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
The list of active geometric relationship managers (bound to the underlying MeshBase object)...
Definition: MooseMesh.h:855
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2133
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
PerfID _build_periodic_node_sets_timer
Definition: MooseMesh.h:1152
unsigned int _from
The qp to map from.
Definition: MooseMesh.h:61
std::pair< const Node *, BoundaryID > PeriodicNodeInfo
Helper type for building periodic node maps.
Definition: MooseMesh.h:838
PerfID _update_timer
Definition: MooseMesh.h:1137
bool isPartitionerForced() const
Tell the user if the partitioner was overriden for any reason.
Definition: MooseMesh.h:799
const std::set< unsigned int > & getGhostedBoundaries() const
Return a writable reference to the set of ghosted boundary IDs.
Definition: MooseMesh.C:2385
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1133
boundary_id_type BoundaryID
PerfID _init_timer
Definition: MooseMesh.h:1160
void buildCoarseningMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition: MooseMesh.C:1703
unsigned int sideWithBoundaryID(const Elem *const elem, const BoundaryID boundary_id) const
Calls BoundaryInfo::side_with_boundary_id().
Definition: MooseMesh.C:2199
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:2594
unsigned int getMaxLeafSize() const
Getter for the maximum leaf size parameter.
Definition: MooseMesh.h:479
virtual const Node * nodePtr(const dof_id_type i) const
Definition: MooseMesh.C:454
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
PerfID _read_recovered_mesh_timer
Definition: MooseMesh.h:1161
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:403
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping(unsigned int component)
This function attempts to return the paired boundary ids for the given component. ...
Definition: MooseMesh.C:1547
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:958
PerfID _mesh_changed_timer
Definition: MooseMesh.h:1138
PerfID _prepare_timer
Timers.
Definition: MooseMesh.h:1136
PerfID _cache_info_timer
Definition: MooseMesh.h:1150
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:911
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:956
subdomain_id_type SubdomainID
const Node * addUniqueNode(const Point &p, Real tol=1e-6)
Add a new node to the mesh.
Definition: MooseMesh.C:891
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:982
void printInfo(std::ostream &os=libMesh::out) const
Calls print_info() on the underlying Mesh.
Definition: MooseMesh.C:2588
virtual ExodusII_IO * exReader() const
Not implemented – always returns NULL.
Definition: MooseMesh.C:2581
void prepare(bool force=false)
Calls prepare_for_use() if force=true on the underlying Mesh object, then communicates various bounda...
Definition: MooseMesh.C:343
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2361
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:972
Real minPeriodicDistance(unsigned int nonlinear_var_num, Point p, Point q) const
This function returns the distance between two points on the mesh taking into account periodicity for...
Definition: MooseMesh.C:1541
bool hasSecondOrderElements()
check if the mesh has SECOND order elements
Definition: MooseMesh.C:2708
unsigned int getPatchSize() const
Getter for the patch_size parameter.
Definition: MooseMesh.C:2526
void buildRefinementAndCoarseningMaps(Assembly *assembly)
Create the refinement and coarsening maps necessary for projection of stateful material properties wh...
Definition: MooseMesh.C:1565
void findAdaptivityQpMaps(const Elem *template_elem, QBase &qrule, 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:1773
bool _parallel_type_overridden
Definition: MooseMesh.h:866
PerfID _build_periodic_node_map_timer
Definition: MooseMesh.h:1151
bool isRegularOrthogonal()
Getter to query if the mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:820
Interface for objects that needs transient capabilities.
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:1006
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:981
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:932
PerfID _get_local_node_range_timer
Definition: MooseMesh.h:1147
std::vector< BndElement * >::iterator bnd_elem_iterator_imp
Definition: MooseMesh.h:973
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
Definition: MooseMesh.C:977
virtual dof_id_type nNodes() const
Calls n_nodes/elem() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2229
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:551
void setBoundaryName(BoundaryID boundary_id, BoundaryName name)
This method returns a writable reference to a boundary name based on the id parameter.
Definition: MooseMesh.C:1130
PerfID _change_boundary_id_timer
Definition: MooseMesh.h:1159
std::unique_ptr< MeshBase > buildMeshBaseObject(ParallelType override_type=ParallelType::DEFAULT)
Method to construct a libMesh::MeshBase object that is normally set and used by the MooseMesh object ...
Definition: MooseMesh.C:1969
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1003
void addPeriodicVariable(unsigned int var_num, BoundaryID primary, BoundaryID secondary)
For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primar...
Definition: MooseMesh.C:1484
StoredRange< std::set< Node * >::iterator, Node * > SemiLocalNodeRange
Definition: MooseMesh.h:47
PerfID _build_refinement_and_coarsening_maps_timer
Definition: MooseMesh.h:1158
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:957
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:2346
bool _partitioner_overridden
Definition: MooseMesh.h:873
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1283
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:559
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...
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:869
NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:751
void buildPeriodicNodeSets(std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, PeriodicBoundaries *pbs) const
This routine builds a datastructure of node ids organized by periodic boundary ids.
Definition: MooseMesh.C:1256
void buildRefinementMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition: MooseMesh.C:1624
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:2379
void freeBndNodes()
Definition: MooseMesh.C:312
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:1460
PerfID _get_boundary_element_range_timer
Definition: MooseMesh.h:1149
PatchUpdateType
Type of patch update strategy for modeling node-face constraints or contact.
Definition: MooseTypes.h:705
PerfID _build_bnd_elem_list_timer
Definition: MooseMesh.h:1142
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1165
std::map< SubdomainID, std::set< BoundaryID > > _subdomain_boundary_ids
Holds a map from subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1127
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:927
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:422
BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier=0.01) const
Get a (slightly inflated) processor bounding box.
Definition: MooseMesh.C:2544
std::map< unsigned int, std::vector< bool > > _periodic_dim
A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specif...
Definition: MooseMesh.h:1026
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:59
void setMeshBase(std::unique_ptr< MeshBase > mesh_base)
Method to set the mesh_base object.
Definition: MooseMesh.C:2026
void buildBndElemList()
Definition: MooseMesh.C:667
bool isParallelTypeForced() const
Tell the user if the distribution was overriden for any reason.
Definition: MooseMesh.h:789
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:991
bool needsRemoteElemDeletion() const
Whether we need to delete remote elements.
Definition: MooseMesh.h:848
std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
Definition: MooseMesh.h:967
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:994
PerfID _ghost_ghosted_boundaries_timer
Definition: MooseMesh.h:1162
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_name) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition: MooseMesh.C:1090
void addGhostedBoundary(BoundaryID boundary_id)
This will add the boundary ids to be ghosted to this processor.
Definition: MooseMesh.C:2373
PerfID _update_active_semi_local_node_range_timer
Definition: MooseMesh.h:1140
virtual dof_id_type maxNodeId() const
Calls max_node/elem_id() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2241
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2253
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:801
const MooseEnum & partitionerName() const
Definition: MooseMesh.h:794
const RealVectorValue & getNormalByBoundaryID(BoundaryID id) const
Returns the normal vector associated with a given BoundaryID.
Definition: MooseMesh.C:1953
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:1258
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:948
ConstElemPointerRange * coarsenedElementRange() const
Return a range that is suitable for threaded execution over elements that were just coarsened...
Definition: MooseMesh.C:545
const Moose::PatchUpdateType & getPatchUpdateStrategy() const
Get the current patch update strategy.
Definition: MooseMesh.C:2538
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1015
void ghostGhostedBoundaries()
Actually do the ghosting of boundaries that need to be ghosted to this processor. ...
Definition: MooseMesh.C:2455
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:990
PerfID _node_to_active_semilocal_elem_map_timer
Definition: MooseMesh.h:1144
bool _distribution_overridden
Definition: MooseMesh.h:865
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:633
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:2659
void needsRemoteElemDeletion(bool need_delete)
Set whether we need to delete remote elements.
Definition: MooseMesh.h:843
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:918
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2223
virtual std::unique_ptr< PointLocatorBase > getPointLocator() const
Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default)...
Definition: MooseMesh.C:2730
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:997
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:905
QpMap()
Definition: MooseMesh.h:58
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:788
std::map< std::pair< int, ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side.
Definition: MooseMesh.h:1116
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1009
void buildPeriodicNodeMap(std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, PeriodicBoundaries *pbs) const
This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundarie...
Definition: MooseMesh.C:1171
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:941
Real _distance
The distance between them.
Definition: MooseMesh.h:67
void setCustomPartitioner(Partitioner *partitioner)
Setter for custom partitioner.
Definition: MooseMesh.C:2696
PerfID _detect_orthogonal_dim_ranges_timer
Definition: MooseMesh.h:1153
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:876
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:490
PerfID _get_active_local_element_range_timer
Definition: MooseMesh.h:1145
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1007
virtual dof_id_type nElem() const
Definition: MooseMesh.C:2235
const std::string & getSubdomainName(SubdomainID subdomain_id)
Return the name of a block given an id.
Definition: MooseMesh.C:1124
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:690
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:929
PerfID _get_active_node_range_timer
Definition: MooseMesh.h:1146
void setUniformRefineLevel(unsigned int)
Set uniform refinement level.
Definition: MooseMesh.C:2367
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2316
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1075
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:931
PerfID _node_to_elem_map_timer
Definition: MooseMesh.h:1143
virtual unsigned int effectiveSpatialDimension() const
Returns the effective spatial dimension determined by the coordinates actually used by the mesh...
Definition: MooseMesh.C:2139