www.mooseframework.org
MooseMesh.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef MOOSEMESH_H
16 #define MOOSEMESH_H
17 
18 #include "MooseObject.h"
19 #include "BndNode.h"
20 #include "BndElement.h"
21 #include "Restartable.h"
22 #include "MooseEnum.h"
23 
24 #include <memory> //std::unique_ptr
25 
26 // libMesh
27 #include "libmesh/bounding_box.h"
28 #include "libmesh/elem_range.h"
29 #include "libmesh/mesh_base.h"
30 #include "libmesh/node_range.h"
31 
32 // forward declaration
33 class MooseMesh;
34 class Assembly;
35 
36 // libMesh forward declarations
37 namespace libMesh
38 {
39 class ExodusII_IO;
40 class QBase;
41 class PeriodicBoundaries;
42 class Partitioner;
43 class GhostingFunctor;
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
75 {
76 public:
80  MooseMesh(const InputParameters & parameters);
81  MooseMesh(const MooseMesh & other_mesh);
82 
86  virtual ~MooseMesh();
87 
91  virtual MooseMesh & clone() const = 0;
92 
99  virtual void init();
100 
106  virtual void buildMesh() = 0;
107 
113  virtual unsigned int dimension() const;
114 
119  std::vector<BoundaryID> getBoundaryIDs(const Elem * const elem,
120  const unsigned short int side) const;
121 
129  const std::set<BoundaryID> & getBoundaryIDs() const;
130 
135  template <typename T>
136  const std::set<T> & getBlockOrBoundaryIDs() const;
137 
144  void buildNodeList();
145  void buildBndElemList();
146 
151  const std::map<dof_id_type, std::vector<dof_id_type>> & nodeToElemMap();
152 
160  const std::map<dof_id_type, std::vector<dof_id_type>> & nodeToActiveSemilocalElemMap();
161 
166  struct bnd_node_iterator;
168 
169  struct bnd_elem_iterator;
171 
175  virtual bnd_node_iterator bndNodesBegin();
176  virtual bnd_node_iterator bndNodesEnd();
177 
181  virtual bnd_elem_iterator bndElemsBegin();
182  virtual bnd_elem_iterator bndElemsEnd();
183 
187  void buildNodeListFromSideList();
188 
193  void buildSideList(std::vector<dof_id_type> & el,
194  std::vector<unsigned short int> & sl,
195  std::vector<boundary_id_type> & il);
196 
200  unsigned int sideWithBoundaryID(const Elem * const elem, const BoundaryID boundary_id) const;
201 
205  MeshBase::const_node_iterator localNodesBegin();
206  MeshBase::const_node_iterator localNodesEnd();
207 
211  MeshBase::const_element_iterator activeLocalElementsBegin();
212  const MeshBase::const_element_iterator activeLocalElementsEnd();
213 
217  virtual dof_id_type nNodes() const;
218  virtual dof_id_type nElem() const;
219 
225  virtual dof_id_type maxNodeId() const;
226  virtual dof_id_type maxElemId() const;
227 
234  virtual const Node & node(const dof_id_type i) const;
235  virtual Node & node(const dof_id_type i);
236  virtual const Node & nodeRef(const dof_id_type i) const;
237  virtual Node & nodeRef(const dof_id_type i);
238  virtual const Node * nodePtr(const dof_id_type i) const;
239  virtual Node * nodePtr(const dof_id_type i);
240  virtual const Node * queryNodePtr(const dof_id_type i) const;
241  virtual Node * queryNodePtr(const dof_id_type i);
242 
249  virtual Elem * elem(const dof_id_type i);
250  virtual const Elem * elem(const dof_id_type i) const;
251  virtual Elem * elemPtr(const dof_id_type i);
252  virtual const Elem * elemPtr(const dof_id_type i) const;
253  virtual Elem * queryElemPtr(const dof_id_type i);
254  virtual const Elem * queryElemPtr(const dof_id_type i) const;
255 
259  bool prepared() const;
260  void prepared(bool state);
261 
267  void needsPrepareForUse();
268 
274  void meshChanged();
275 
281  virtual void onMeshChanged();
282 
286  void cacheChangedLists();
287 
294  ConstElemPointerRange * refinedElementRange() const;
295 
302  ConstElemPointerRange * coarsenedElementRange() const;
303 
310  const std::vector<const Elem *> & coarsenedElementChildren(const Elem * elem) const;
311 
316  void updateActiveSemiLocalNodeRange(std::set<dof_id_type> & ghosted_elems);
317 
323  bool isSemiLocal(Node * node);
324 
329  ConstElemRange * getActiveLocalElementRange();
330  NodeRange * getActiveNodeRange();
331  SemiLocalNodeRange * getActiveSemiLocalNodeRange() const;
332  ConstNodeRange * getLocalNodeRange();
333  StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> * getBoundaryNodeRange();
334  StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> * getBoundaryElementRange();
335 
340  const std::set<SubdomainID> & meshSubdomains() const;
341 
346  const std::set<BoundaryID> & meshBoundaryIds() const;
347 
352  const std::set<BoundaryID> & meshSidesetIds() const;
353 
358  const std::set<BoundaryID> & meshNodesetIds() const;
359 
364  void setBoundaryToNormalMap(std::unique_ptr<std::map<BoundaryID, RealVectorValue>> boundary_map);
365 
366  // DEPRECATED METHOD
367  void setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map);
368 
373  void setMeshBoundaryIDs(std::set<BoundaryID> boundary_IDs);
374 
379  const RealVectorValue & getNormalByBoundaryID(BoundaryID id) const;
380 
385  void prepare(bool force = false);
386 
390  void update();
391 
395  unsigned int uniformRefineLevel() const;
396 
400  void setUniformRefineLevel(unsigned int);
401 
405  void addGhostedBoundary(BoundaryID boundary_id);
406 
411  void setGhostedBoundaryInflation(const std::vector<Real> & inflation);
412 
416  const std::set<unsigned int> & getGhostedBoundaries() const;
417 
421  const std::vector<Real> & getGhostedBoundaryInflation() const;
422 
426  void ghostGhostedBoundaries();
427 
431  unsigned int getPatchSize() const;
432 
436  void setPatchUpdateStrategy(MooseEnum patch_update_strategy);
437 
441  const MooseEnum & getPatchUpdateStrategy() const;
442 
449  BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier = 0.01) const;
450 
454  operator libMesh::MeshBase &();
455  operator const libMesh::MeshBase &() const;
456 
460  MeshBase & getMesh();
461  const MeshBase & getMesh() const;
462 
466  virtual ExodusII_IO * exReader() const;
467 
471  void printInfo(std::ostream & os = libMesh::out) const;
472 
476  const std::set<SubdomainID> & getNodeBlockIds(const Node & node) const;
477 
482  const std::vector<dof_id_type> & getNodeList(boundary_id_type nodeset_id) const;
483 
489  const Node * addUniqueNode(const Point & p, Real tol = 1e-6);
490 
504  Node * addQuadratureNode(const Elem * elem,
505  const unsigned short int side,
506  const unsigned int qp,
507  BoundaryID bid,
508  const Point & point);
509 
517  Node * getQuadratureNode(const Elem * elem, const unsigned short int side, const unsigned int qp);
518 
523  void clearQuadratureNodes();
524 
531  BoundaryID getBoundaryID(const BoundaryName & boundary_name) const;
532 
539  std::vector<BoundaryID> getBoundaryIDs(const std::vector<BoundaryName> & boundary_name,
540  bool generate_unknown = false) const;
541 
548  SubdomainID getSubdomainID(const SubdomainName & subdomain_name) const;
549 
556  std::vector<SubdomainID> getSubdomainIDs(const std::vector<SubdomainName> & subdomain_name) const;
557 
561  void setSubdomainName(SubdomainID subdomain_id, SubdomainName name);
562 
566  const std::string & getSubdomainName(SubdomainID subdomain_id);
567 
571  void setBoundaryName(BoundaryID boundary_id, BoundaryName name);
572 
576  const std::string & getBoundaryName(BoundaryID boundary_id);
577 
583  void buildPeriodicNodeMap(std::multimap<dof_id_type, dof_id_type> & periodic_node_map,
584  unsigned int var_number,
585  PeriodicBoundaries * pbs) const;
586 
590  void buildPeriodicNodeSets(std::map<BoundaryID, std::set<dof_id_type>> & periodic_node_sets,
591  unsigned int var_number,
592  PeriodicBoundaries * pbs) const;
593 
597  Real dimensionWidth(unsigned int component) const;
598 
600 
603  virtual Real getMinInDimension(unsigned int component) const;
604  virtual Real getMaxInDimension(unsigned int component) const;
606 
617  bool detectOrthogonalDimRanges(Real tol = 1e-6);
618 
623  void addPeriodicVariable(unsigned int var_num, BoundaryID primary, BoundaryID secondary);
624 
630  bool isTranslatedPeriodic(unsigned int nonlinear_var_num, unsigned int component) const;
631 
639  RealVectorValue minPeriodicVector(unsigned int nonlinear_var_num, Point p, Point q) const;
640 
648  Real minPeriodicDistance(unsigned int nonlinear_var_num, Point p, Point q) const;
649 
656  const std::pair<BoundaryID, BoundaryID> * getPairedBoundaryMapping(unsigned int component);
657 
664  void buildRefinementAndCoarseningMaps(Assembly * assembly);
665 
675  const std::vector<std::vector<QpMap>> &
676  getRefinementMap(const Elem & elem, int parent_side, int child, int child_side);
677 
685  const std::vector<std::pair<unsigned int, QpMap>> & getCoarseningMap(const Elem & elem,
686  int input_side);
687 
692  void
693  changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev);
694 
701  const std::set<BoundaryID> & getSubdomainBoundaryIds(SubdomainID subdomain_id) const;
702 
706  bool isBoundaryNode(dof_id_type node_id) const;
707 
712  bool isBoundaryNode(dof_id_type node_id, BoundaryID bnd_id) const;
713 
717  bool isBoundaryElem(dof_id_type elem_id) const;
718 
723  bool isBoundaryElem(dof_id_type elem_id, BoundaryID bnd_id) const;
724 
732  void errorIfDistributedMesh(std::string name) const;
733 
737  bool isDistributedMesh() const { return _use_distributed_mesh; }
738 
742  bool isParallelTypeForced() const { return _parallel_type_overridden; }
743 
744  /*
745  * Set/Get the partitioner name
746  */
747  const MooseEnum & partitionerName() const { return _partitioner_name; }
748 
752  bool isPartitionerForced() const { return _partitioner_overridden; }
753 
757  void allowRecovery(bool allow) { _allow_recovery = allow; }
758 
760  {
761  public:
763  std::string _name;
767  std::vector<Elem *> _elems;
769  BoundaryName _master, _slave;
770  };
771 
772  void addMortarInterface(const std::string & name,
773  BoundaryName master,
774  BoundaryName slave,
775  SubdomainName domain_id);
776 
777  std::vector<std::unique_ptr<MooseMesh::MortarInterface>> & getMortarInterfaces()
778  {
779  return _mortar_interface;
780  }
781 
782  MooseMesh::MortarInterface * getMortarInterfaceByName(const std::string name);
783  MooseMesh::MortarInterface * getMortarInterface(BoundaryID master, BoundaryID slave);
784 
788  void setCustomPartitioner(Partitioner * partitioner);
789 
791 
794  bool isCustomPartitionerRequested() const;
795  void setIsCustomPartitionerRequested(bool cpr);
797 
799  bool isRegularOrthogonal() { return _regular_orthogonal_mesh; }
800 
802  bool hasSecondOrderElements();
803 
808  virtual std::unique_ptr<PointLocatorBase> getPointLocator() const;
809 
810 protected:
811  std::vector<std::unique_ptr<GhostingFunctor>> _ghosting_functors;
812 
816 
823 
825  std::unique_ptr<libMesh::MeshBase> _mesh;
826 
830 
832  std::unique_ptr<Partitioner> _custom_partitioner;
834 
836  enum
837  {
838  X = 0,
839  Y,
840  Z
841  };
842  enum
843  {
844  MIN = 0,
845  MAX
846  };
847 
849  unsigned int _uniform_refine_level;
850 
853 
856 
859 
862 
864  std::unique_ptr<ConstElemPointerRange> _refined_elements;
865 
867  std::unique_ptr<ConstElemPointerRange> _coarsened_elements;
868 
874  std::map<const Elem *, std::vector<const Elem *>> _coarsened_element_children;
875 
877  std::set<Node *> _semilocal_node_list;
878 
883  std::unique_ptr<ConstElemRange> _active_local_elem_range;
884 
885  std::unique_ptr<SemiLocalNodeRange> _active_semilocal_node_range;
886  std::unique_ptr<NodeRange> _active_node_range;
887  std::unique_ptr<ConstNodeRange> _local_node_range;
888  std::unique_ptr<StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *>> _bnd_node_range;
889  std::unique_ptr<StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *>>
891 
893  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_elem_map;
895 
897  std::map<dof_id_type, std::vector<dof_id_type>> _node_to_active_semilocal_elem_map;
899 
904  std::set<SubdomainID> _mesh_subdomains;
905 
907 
912  std::set<BoundaryID> _mesh_boundary_ids;
913  std::set<BoundaryID> _mesh_sideset_ids;
914  std::set<BoundaryID> _mesh_nodeset_ids;
916 
918  std::unique_ptr<std::map<BoundaryID, RealVectorValue>> _boundary_to_normal_map;
919 
921  std::vector<BndNode *> _bnd_nodes;
922  typedef std::vector<BndNode *>::iterator bnd_node_iterator_imp;
923  typedef std::vector<BndNode *>::const_iterator const_bnd_node_iterator_imp;
925  std::map<boundary_id_type, std::set<dof_id_type>> _bnd_node_ids;
926 
928  std::vector<BndElement *> _bnd_elems;
929  typedef std::vector<BndElement *>::iterator bnd_elem_iterator_imp;
930  typedef std::vector<BndElement *>::const_iterator const_bnd_elem_iterator_imp;
932  std::map<boundary_id_type, std::set<dof_id_type>> _bnd_elem_ids;
933 
934  std::map<dof_id_type, Node *> _quadrature_nodes;
935  std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *>>>
937  std::vector<BndNode> _extra_bnd_nodes;
938 
940  std::map<dof_id_type, std::set<SubdomainID>> _block_node_list;
941 
943  std::map<boundary_id_type, std::vector<dof_id_type>> _node_set_nodes;
944 
945  std::set<unsigned int> _ghosted_boundaries;
946  std::vector<Real> _ghosted_boundaries_inflation;
947 
949  unsigned int _patch_size;
950 
953 
955  std::string _file_name;
956 
958  std::vector<Node *> _node_map;
959 
962 
964  std::vector<std::vector<Real>> _bounds;
965 
967  std::vector<std::pair<BoundaryID, BoundaryID>> _paired_boundary;
968 
970  std::map<std::string, MortarInterface *> _mortar_interface_by_name;
971  std::vector<std::unique_ptr<MortarInterface>> _mortar_interface;
973  std::map<std::pair<BoundaryID, BoundaryID>, MortarInterface *> _mortar_interface_by_ids;
974 
975  void cacheInfo();
976  void freeBndNodes();
977  void freeBndElems();
978 
979 private:
984  std::map<unsigned int, std::vector<bool>> _periodic_dim;
985 
990 
992  std::vector<Node *> _extreme_nodes;
993 
999  void detectPairedSidesets();
1000 
1012  void buildRefinementMap(const Elem & elem,
1013  QBase & qrule,
1014  QBase & qrule_face,
1015  int parent_side,
1016  int child,
1017  int child_side);
1018 
1028  void buildCoarseningMap(const Elem & elem, QBase & qrule, QBase & qrule_face, int input_side);
1029 
1038  void mapPoints(const std::vector<Point> & from,
1039  const std::vector<Point> & to,
1040  std::vector<QpMap> & qp_map);
1041 
1064  void findAdaptivityQpMaps(const Elem * template_elem,
1065  QBase & qrule,
1066  QBase & qrule_face,
1067  std::vector<std::vector<QpMap>> & refinement_map,
1068  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map,
1069  int parent_side,
1070  int child,
1071  int child_side);
1072 
1074  std::map<std::pair<int, ElemType>, std::vector<std::vector<QpMap>>> _elem_type_to_refinement_map;
1075 
1077  std::map<ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap>>>>
1079 
1081  std::map<std::pair<int, ElemType>, std::vector<std::pair<unsigned int, QpMap>>>
1083 
1085  std::map<SubdomainID, std::set<BoundaryID>> _subdomain_boundary_ids;
1086 
1089 
1092 };
1093 
1097 struct MooseMesh::bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate, BndNode *>
1098 {
1099  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1100  template <typename PredType, typename IterType>
1101  bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
1102  : variant_filter_iterator<MeshBase::Predicate, BndNode *>(d, e, p)
1103  {
1104  }
1105 };
1106 
1111 struct MooseMesh::const_bnd_node_iterator : variant_filter_iterator<MeshBase::Predicate,
1112  BndNode * const,
1113  BndNode * const &,
1114  BndNode * const *>
1115 {
1116  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1117  template <typename PredType, typename IterType>
1118  const_bnd_node_iterator(const IterType & d, const IterType & e, const PredType & p)
1119  : variant_filter_iterator<MeshBase::Predicate,
1120  BndNode * const,
1121  BndNode * const &,
1122  BndNode * const *>(d, e, p)
1123  {
1124  }
1125 
1126  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
1127  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
1129  : variant_filter_iterator<MeshBase::Predicate,
1130  BndNode * const,
1131  BndNode * const &,
1132  BndNode * const *>(rhs)
1133  {
1134  }
1135 };
1136 
1140 struct MooseMesh::bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate, BndElement *>
1141 {
1142  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1143  template <typename PredType, typename IterType>
1144  bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
1145  : variant_filter_iterator<MeshBase::Predicate, BndElement *>(d, e, p)
1146  {
1147  }
1148 };
1149 
1154 struct MooseMesh::const_bnd_elem_iterator : variant_filter_iterator<MeshBase::Predicate,
1155  BndElement * const,
1156  BndElement * const &,
1157  BndElement * const *>
1158 {
1159  // Templated forwarding ctor -- forwards to appropriate variant_filter_iterator ctor
1160  template <typename PredType, typename IterType>
1161  const_bnd_elem_iterator(const IterType & d, const IterType & e, const PredType & p)
1162  : variant_filter_iterator<MeshBase::Predicate,
1163  BndElement * const,
1164  BndElement * const &,
1165  BndElement * const *>(d, e, p)
1166  {
1167  }
1168 
1169  // The conversion-to-const ctor. Takes a regular iterator and calls the appropriate
1170  // variant_filter_iterator copy constructor. Note that this one is *not* templated!
1172  : variant_filter_iterator<MeshBase::Predicate,
1173  BndElement * const,
1174  BndElement * const &,
1175  BndElement * const *>(rhs)
1176  {
1177  }
1178 };
1179 
1184 typedef StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> ConstBndNodeRange;
1185 typedef StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> ConstBndElemRange;
1186 
1187 #endif /* MOOSEMESH_H */
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:964
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:877
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
bool isParallelTypeForced() const
Tell the user if the distribution was overriden for any reason.
Definition: MooseMesh.h:742
bool _node_to_elem_map_built
Definition: MooseMesh.h:894
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
Definition: MooseMesh.h:811
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:992
const_bnd_elem_iterator(const bnd_elem_iterator &rhs)
Definition: MooseMesh.h:1171
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:855
void allowRecovery(bool allow)
Set whether or not this mesh is allowed to read a recovery file.
Definition: MooseMesh.h:757
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
Mortar interfaces mapped though master, slave IDs pairs.
Definition: MooseMesh.h:973
A class for creating restricted objects.
Definition: Restartable.h:31
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:849
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
The definition of the const_bnd_elem_iterator struct.
Definition: MooseMesh.h:1154
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:989
Keeps track of stuff related to assembling.
Definition: Assembly.h:63
const_bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1161
const_bnd_node_iterator(const MooseMesh::bnd_node_iterator &rhs)
Definition: MooseMesh.h:1128
The definition of the bnd_elem_iterator struct.
Definition: MooseMesh.h:1140
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:858
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
bool _custom_partitioner_requested
Definition: MooseMesh.h:833
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:893
const_bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1118
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:1185
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:932
bool _is_changed
true if mesh is changed (i.e. after adaptivity step)
Definition: MooseMesh.h:852
std::vector< BndNode * >::iterator bnd_node_iterator_imp
Definition: MooseMesh.h:922
The definition of the bnd_node_iterator struct.
Definition: MooseMesh.h:1097
Helper object for holding qp mapping info.
Definition: MooseMesh.h:55
std::vector< std::unique_ptr< MortarInterface > > _mortar_interface
Definition: MooseMesh.h:971
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:864
std::vector< Elem * > _elems
List of elements on this interface.
Definition: MooseMesh.h:767
The definition of the const_bnd_node_iterator struct.
Definition: MooseMesh.h:1111
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:828
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:940
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:898
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:925
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:943
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
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:1082
unsigned int _to
The qp to map to.
Definition: MooseMesh.h:64
std::string _name
The name of the interface.
Definition: MooseMesh.h:763
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1088
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:886
SubdomainID _id
subdomain ID of elements in this interface
Definition: MooseMesh.h:765
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:890
StoredRange< std::vector< const Elem * >::iterator, const Elem * > ConstElemPointerRange
Definition: MooseTypes.h:82
std::vector< std::unique_ptr< MooseMesh::MortarInterface > > & getMortarInterfaces()
Definition: MooseMesh.h:777
bnd_elem_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1144
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:1078
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:820
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:918
std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
Definition: MooseMesh.h:930
bnd_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Definition: MooseMesh.h:1101
InputParameters validParams< MooseMesh >()
Definition: MooseMesh.C:65
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
unsigned int _from
The qp to map from.
Definition: MooseMesh.h:61
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1091
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:914
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:867
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:912
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:937
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:928
bool _parallel_type_overridden
Definition: MooseMesh.h:822
bool isRegularOrthogonal()
Getter to query if the mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:799
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:958
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:936
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:888
const MooseEnum & partitionerName() const
Definition: MooseMesh.h:747
std::vector< BndElement * >::iterator bnd_elem_iterator_imp
Definition: MooseMesh.h:929
std::map< std::string, MortarInterface * > _mortar_interface_by_name
Mortar interfaces mapped through their names.
Definition: MooseMesh.h:970
StoredRange< std::set< Node * >::iterator, Node * > SemiLocalNodeRange
Definition: MooseMesh.h:47
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:913
bool _partitioner_overridden
Definition: MooseMesh.h:829
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:825
bool isPartitionerForced() const
Tell the user if the partitioner was overriden for any reason.
Definition: MooseMesh.h:752
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:1085
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:883
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:984
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:946
std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
Definition: MooseMesh.h:923
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:949
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > ConstBndNodeRange
Some useful StoredRange typedefs.
Definition: MooseMesh.h:1184
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:904
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:967
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:945
bool _distribution_overridden
Definition: MooseMesh.h:821
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:874
MooseEnum _mesh_parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:815
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:861
QpMap()
Definition: MooseMesh.h:58
MooseEnum _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:952
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:1074
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:961
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:897
Real _distance
The distance between them.
Definition: MooseMesh.h:67
std::string _file_name
file_name iff this mesh was read from a file
Definition: MooseMesh.h:955
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:832
boundary_id_type BoundaryID
Definition: MooseTypes.h:75
bool isDistributedMesh() const
Returns the final Mesh distribution type.
Definition: MooseMesh.h:737
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:885
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:887