www.mooseframework.org
FeatureFloodCount.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 "Coupleable.h"
13 #include "GeneralPostprocessor.h"
14 #include "InfixIterator.h"
16 #include "BoundaryRestrictable.h"
17 
18 #include <iterator>
19 #include <list>
20 #include <set>
21 #include <vector>
22 
23 #include "libmesh/bounding_box.h"
24 #include "libmesh/periodic_boundaries.h"
25 
26 // External includes
27 #include "boost/bitmask_operators.h"
28 
29 // Forward Declarations
30 class MooseMesh;
31 
41  public Coupleable,
44 {
45 public:
47 
49 
50  virtual void initialSetup() override;
51  virtual void meshChanged() override;
52  virtual void initialize() override;
53  virtual void execute() override;
54  virtual void finalize() override;
55  virtual Real getValue() const override;
56 
58  std::size_t getNumberActiveFeatures() const;
59 
61  virtual std::size_t getTotalFeatureCount() const;
62 
64  virtual bool doesFeatureIntersectBoundary(unsigned int feature_id) const;
65 
67  virtual bool doesFeatureIntersectSpecifiedBoundary(unsigned int feature_id) const;
68 
71  virtual bool isFeaturePercolated(unsigned int feature_id) const;
72 
74  virtual Point featureCentroid(unsigned int feature_id) const;
75 
81  virtual const std::vector<unsigned int> & getVarToFeatureVector(dof_id_type elem_id) const;
82 
84  virtual unsigned int getFeatureVar(unsigned int feature_id) const;
85 
87  std::size_t numCoupledVars() const { return _n_vars; }
88 
91  static const std::size_t invalid_size_t;
92  static const unsigned int invalid_id;
95 
97  const std::vector<MooseVariable *> & getCoupledVars() const { return _vars; }
98 
100  const std::vector<MooseVariableFEBase *> & getFECoupledVars() const { return _fe_vars; }
101 
102  enum class FieldType
103  {
107  HALOS,
108  CENTROID,
111  };
112 
113  // Retrieve field information
114  virtual Real
115  getEntityValue(dof_id_type entity_id, FieldType field_type, std::size_t var_index = 0) const;
116 
117  inline bool isElemental() const { return _is_elemental; }
118 
120  enum class Status : unsigned char
121  {
122  CLEAR = 0x0,
123  MARKED = 0x1,
124  DIRTY = 0x2,
125  INACTIVE = 0x4
126  };
127 
129  enum class BoundaryIntersection : unsigned char
130  {
131  NONE = 0x0,
132  ANY_BOUNDARY = 0x1,
135  SPECIFIED_BOUNDARY = 0x8
136  };
137 
139  {
140  public:
150  using container_type = std::vector<dof_id_type>;
151 
152  FeatureData() : FeatureData(std::numeric_limits<std::size_t>::max(), Status::INACTIVE) {}
153 
154  FeatureData(std::size_t var_index,
155  unsigned int local_index,
156  processor_id_type rank,
157  Status status)
158  : FeatureData(var_index, status)
159  {
160  _orig_ids = {std::make_pair(rank, local_index)};
161  }
162 
163  FeatureData(std::size_t var_index,
164  Status status,
165  unsigned int id = invalid_id,
166  std::vector<BoundingBox> bboxes = {BoundingBox()})
167  : _var_index(var_index),
168  _id(id),
169  _bboxes(bboxes), // Assume at least one bounding box
170  _min_entity_id(DofObject::invalid_id),
171  _vol_count(0),
172  _status(status),
174  {
175  }
176 
178  // Default Move constructors
179  FeatureData(FeatureData && /* f */) = default;
180  FeatureData & operator=(FeatureData && /* f */) = default;
182 
184 
188  void updateBBoxExtremes(MeshBase & mesh);
189  void updateBBoxExtremes(BoundingBox & bbox, const BoundingBox & rhs_bbox);
191 
196  bool boundingBoxesIntersect(const FeatureData & rhs) const;
197 
207  bool mergeable(const FeatureData & rhs) const;
208 
217  bool canConsolidate(const FeatureData & rhs) const;
218 
220 
224  bool halosIntersect(const FeatureData & rhs) const;
225  bool periodicBoundariesIntersect(const FeatureData & rhs) const;
226  bool ghostedIntersect(const FeatureData & rhs) const;
228 
233  void mergeBBoxes(std::vector<BoundingBox> & bboxes, bool physical_intersection);
234 
239  void merge(FeatureData && rhs);
240 
244  void consolidate(FeatureData && rhs);
245 
246  // TODO: Doco
247  void clear();
248 
250  bool operator<(const FeatureData & rhs) const
251  {
252  if (_id != invalid_id)
253  {
254  mooseAssert(rhs._id != invalid_id, "Asymmetric setting of ids detected during sort");
255 
256  // Sort based on ids
257  return _id < rhs._id;
258  }
259  else
260  // Sort based on processor independent information (mesh and variable info)
261  return _var_index < rhs._var_index ||
263  }
264 
266  friend std::ostream & operator<<(std::ostream & out, const FeatureData & feature);
267 
270 
274 
277 
280 
283 
285  std::size_t _var_index;
286 
288  unsigned int _id;
289 
292  std::vector<BoundingBox> _bboxes;
293 
295  std::list<std::pair<processor_id_type, unsigned int>> _orig_ids;
296 
299 
301  std::size_t _vol_count;
302 
305  Point _centroid;
306 
309 
312 
313  FeatureData duplicate() const { return FeatureData(*this); }
314 
315  private:
317 
322  FeatureData(const FeatureData & /* f */) = default;
323  FeatureData & operator=(const FeatureData & /* f */) = default;
325  };
326 
328  const std::vector<FeatureData> & getFeatures() const { return _feature_sets; }
329 
330 protected:
334  template <typename T>
335  bool isBoundaryEntity(const T * entity) const;
336 
342  virtual void updateFieldInfo();
343 
351  bool flood(const DofObject * dof_object, std::size_t current_index);
352 
357  virtual Real getThreshold(std::size_t current_index) const;
358 
363  virtual Real getConnectingThreshold(std::size_t current_index) const;
364 
370  bool compareValueWithThreshold(Real entity_value, Real threshold) const;
371 
377  virtual bool isNewFeatureOrConnectedRegion(const DofObject * dof_object,
378  std::size_t & current_index,
379  FeatureData *& feature,
380  Status & status,
381  unsigned int & new_id);
382 
389  void expandPointHalos();
390 
395  void expandEdgeHalos(unsigned int num_layers_to_expand);
396 
398 
403  void visitNodalNeighbors(const Node * node, FeatureData * feature, bool expand_halos_only);
404  void visitElementalNeighbors(const Elem * elem,
405  FeatureData * feature,
406  bool expand_halos_only,
407  bool disjoint_only);
409 
415  template <typename T>
416  void visitNeighborsHelper(const T * curr_entity,
417  std::vector<const T *> neighbor_entities,
418  FeatureData * feature,
419  bool expand_halos_only,
420  bool topological_neighbor,
421  bool disjoint_only);
422 
435  virtual void prepareDataForTransfer();
436 
441  void serialize(std::string & serialized_buffer, unsigned int var_num = invalid_id);
442 
450  void deserialize(std::vector<std::string> & serialized_buffers,
451  unsigned int var_num = invalid_id);
452 
457  virtual void mergeSets();
458 
463  virtual void
464  consolidateMergedFeatures(std::vector<std::list<FeatureData>> * saved_data = nullptr);
465 
471  virtual bool areFeaturesMergeable(const FeatureData & f1, const FeatureData & f2) const;
472 
480 
485  void communicateAndMerge();
486 
487  virtual void restoreOriginalDataStructures(std::vector<std::list<FeatureData>> &) {}
488 
492  void sortAndLabel();
493 
499  void scatterAndUpdateRanks();
500 
510  virtual void buildLocalToGlobalIndices(std::vector<std::size_t> & local_to_global_all,
511  std::vector<int> & counts) const;
512 
519  void buildFeatureIdToLocalIndices(unsigned int max_id);
520 
525  virtual void clearDataStructures();
526 
530  void updateBoundaryIntersections(FeatureData & feature) const;
531 
536  void appendPeriodicNeighborNodes(FeatureData & feature) const;
537 
542  void updateRegionOffsets();
543 
544  /*************************************************
545  *************** Data Structures *****************
546  ************************************************/
548  std::vector<MooseVariableFEBase *> _fe_vars;
550  std::vector<MooseVariable *> _vars;
551 
553  const DofMap & _dof_map;
554 
558 
563 
566 
572  unsigned long _var_number;
573 
575  const bool _single_map_mode;
576 
577  const bool _condense_map_info;
578 
581  const bool _global_numbering;
582 
585  const bool _var_index_mode;
586 
588  const bool _compute_halo_maps;
589 
592 
599 
600  // Convenience variable holding the number of variables coupled into this object
601  const std::size_t _n_vars;
602 
604  const std::size_t _maps_size;
605 
608 
615  std::vector<std::set<dof_id_type>> _entities_visited;
616 
623  std::vector<std::map<dof_id_type, int>> _var_index_maps;
624 
626  std::unordered_map<dof_id_type, std::vector<const Elem *>> _nodes_to_elem_map;
627 
629  std::vector<unsigned int> _feature_counts_per_map;
630 
632  unsigned int _feature_count;
633 
639  std::vector<std::list<FeatureData>> _partial_feature_sets;
640 
646  std::vector<FeatureData> & _feature_sets;
647 
655  std::vector<FeatureData> _volatile_feature_sets;
656 
662  std::vector<std::map<dof_id_type, int>> _feature_maps;
663 
665  std::vector<std::size_t> _local_to_global_feature_map;
666 
668  std::vector<std::size_t> _feature_id_to_local_index;
669 
671  PeriodicBoundaries * _pbs;
672 
673  std::unique_ptr<PointLocatorBase> _point_locator;
674 
677 
679  std::map<dof_id_type, int> _ghosted_entity_ids;
680 
685  std::vector<std::map<dof_id_type, int>> _halo_ids;
686 
691  std::multimap<dof_id_type, dof_id_type> _periodic_node_map;
692 
695  std::unordered_set<dof_id_type> _all_boundary_entity_ids;
696 
697  std::map<dof_id_type, std::vector<unsigned int>> _entity_var_to_features;
698 
699  std::vector<unsigned int> _empty_var_to_features;
700 
701  std::vector<BoundaryID> _primary_perc_bnds;
702  std::vector<BoundaryID> _secondary_perc_bnds;
703 
704  std::vector<BoundaryID> _specified_bnds;
705 
707  const bool _is_elemental;
708 
711 
714 
716  const bool _is_primary;
717 
718 private:
719  template <class T>
720  static inline void sort(std::set<T> & /*container*/)
721  {
722  // Sets are already sorted, do nothing
723  }
724 
725  template <class T>
726  static inline void sort(std::vector<T> & container)
727  {
728  std::sort(container.begin(), container.end());
729  }
730 
731  template <class T>
732  static inline void reserve(std::set<T> & /*container*/, std::size_t /*size*/)
733  {
734  // Sets are trees, no reservations necessary
735  }
736 
737  template <class T>
738  static inline void reserve(std::vector<T> & container, std::size_t size)
739  {
740  container.reserve(size);
741  }
742 
743  template <class T>
744  static inline bool contains(std::set<T> & container, const T & item)
745  {
746  return container.find(item) != container.end();
747  }
748 
749  template <class T>
750  static inline bool contains(std::vector<T> & container, const T & item)
751  {
752  for (const auto & cont_item : container)
753  if (item == cont_item)
754  return true;
755  return false;
756  }
757 
759  std::deque<const DofObject *> _entity_queue;
760 };
761 
762 template <>
763 void dataStore(std::ostream & stream, FeatureFloodCount::FeatureData & feature, void * context);
764 template <>
765 void dataStore(std::ostream & stream, BoundingBox & bbox, void * context);
766 
767 template <>
768 void dataLoad(std::istream & stream, FeatureFloodCount::FeatureData & feature, void * context);
769 template <>
770 void dataLoad(std::istream & stream, BoundingBox & bbox, void * context);
771 
772 template <>
773 struct enable_bitmask_operators<FeatureFloodCount::Status>
774 {
775  static const bool enable = true;
776 };
777 
778 template <>
779 struct enable_bitmask_operators<FeatureFloodCount::BoundaryIntersection>
780 {
781  static const bool enable = true;
782 };
FeatureFloodCount(const InputParameters &parameters)
std::vector< BoundaryID > _primary_perc_bnds
FeatureData(std::size_t var_index, Status status, unsigned int id=invalid_id, std::vector< BoundingBox > bboxes={BoundingBox()})
Point _centroid
The centroid of the feature (average of coordinates from entities participating in the volume calcula...
std::size_t getNumberActiveFeatures() const
Return the number of active features.
bool halosIntersect(const FeatureData &rhs) const
Determine if one of this FeaturesData&#39;s member sets intersects the other FeatureData&#39;s corresponding ...
std::multimap< dof_id_type, dof_id_type > _periodic_node_map
The data structure which is a list of nodes that are constrained to other nodes based on the imposed ...
void visitNodalNeighbors(const Node *node, FeatureData *feature, bool expand_halos_only)
These two routines are utility routines used by the flood routine and by derived classes for visiting...
std::vector< BoundingBox > _bboxes
The vector of bounding boxes completely enclosing this feature (multiple used with periodic constrain...
const PostprocessorValue & _element_average_value
Average value of the domain which can optionally be used to find features in a field.
void expandEdgeHalos(unsigned int num_layers_to_expand)
This method expands the existing halo set by some width determined by the passed in value...
std::vector< BoundaryID > _specified_bnds
std::vector< BoundaryID > _secondary_perc_bnds
void expandPointHalos()
This method takes all of the partial features and expands the local, ghosted, and halo sets around th...
container_type _halo_ids
Holds the ids surrounding the feature.
const std::size_t _n_vars
static const std::size_t invalid_size_t
virtual void updateFieldInfo()
This method is used to populate any of the data structures used for storing field data (nodal or elem...
static InputParameters validParams()
std::vector< dof_id_type > container_type
The primary underlying container type used to hold the data in each FeatureData.
static bool contains(std::vector< T > &container, const T &item)
void appendPeriodicNeighborNodes(FeatureData &feature) const
This routine adds the periodic node information to our data structure prior to packing the data this ...
virtual const std::vector< unsigned int > & getVarToFeatureVector(dof_id_type elem_id) const
Returns a list of active unique feature ids for a particular element.
void serialize(std::string &serialized_buffer, unsigned int var_num=invalid_id)
This routines packs the _partial_feature_sets data into a structure suitable for parallel communicati...
const bool _condense_map_info
const std::vector< MooseVariable * > & getCoupledVars() const
Returns a const vector to the coupled variable pointers.
container_type _ghosted_ids
Holds the ghosted ids for a feature (the ids which will be used for stitching.
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement *> ConstBndElemRange
Status
This enumeration is used to indicate status of the grains in the _unique_grains data structure...
std::vector< std::set< dof_id_type > > _entities_visited
This variable keeps track of which nodes have been visited during execution.
void updateBBoxExtremes(MeshBase &mesh)
Update the minimum and maximum coordinates of a bounding box given a Point, Elem or BBox parameter...
friend std::ostream & operator<<(std::ostream &out, const FeatureData &feature)
stream output operator
bool mergeable(const FeatureData &rhs) const
The routine called to see if two features are mergeable:
bool boundingBoxesIntersect(const FeatureData &rhs) const
Determines if any of this FeatureData&#39;s bounding boxes overlap with the other FeatureData&#39;s bounding ...
static void sort(std::set< T > &)
virtual void finalize() override
container_type _disjoint_halo_ids
Holds halo ids that extend onto a non-topologically connected surface.
std::vector< FeatureData > & _feature_sets
The data structure used to hold the globally unique features.
bool isBoundaryEntity(const T *entity) const
Returns a Boolean indicating whether the entity is on one of the desired boundaries.
const bool _is_primary
Convenience variable for testing primary rank.
std::map< dof_id_type, std::vector< unsigned int > > _entity_var_to_features
virtual std::size_t getTotalFeatureCount() const
Returns the total feature count (active and inactive ids, useful for sizing vectors) ...
void communicateAndMerge()
This routine handles all of the serialization, communication and deserialization of the data structur...
virtual void initialize() override
const std::vector< FeatureData > & getFeatures() const
Return a constant reference to the vector of all discovered features.
bool operator<(const FeatureData &rhs) const
Comparison operator for sorting individual FeatureDatas.
virtual bool areFeaturesMergeable(const FeatureData &f1, const FeatureData &f2) const
Method for determining whether two features are mergeable.
std::map< dof_id_type, int > _ghosted_entity_ids
The map for holding reconstructed ghosted element information.
auto max(const L &left, const R &right)
virtual bool isFeaturePercolated(unsigned int feature_id) const
Returns a Boolean indicating whether this feature is percolated (e.g.
virtual void buildLocalToGlobalIndices(std::vector< std::size_t > &local_to_global_all, std::vector< int > &counts) const
This routine populates a stacked vector of local to global indices per rank and the associated count ...
std::vector< FeatureData > _volatile_feature_sets
Derived objects (e.g.
void sortAndLabel()
Sort and assign ids to features based on their position in the container after sorting.
MPI_Status status
virtual void consolidateMergedFeatures(std::vector< std::list< FeatureData >> *saved_data=nullptr)
This method consolidates all of the merged information from _partial_feature_sets into the _feature_s...
uint8_t processor_id_type
static bool contains(std::set< T > &container, const T &item)
virtual unsigned int getFeatureVar(unsigned int feature_id) const
Returns the variable representing the passed in feature.
dof_id_type _min_entity_id
The minimum entity seen in the _local_ids, used for sorting features.
std::vector< std::map< dof_id_type, int > > _halo_ids
The data structure for looking up halos around features.
std::vector< MooseVariable * > _vars
The vector of coupled in variables cast to MooseVariable.
const Real _connecting_threshold
The threshold above (or below) which neighboring entities are flooded (where regions can be extended ...
virtual void execute() override
std::size_t _var_index
The Moose variable where this feature was found (often the "order parameter")
virtual void clearDataStructures()
Helper routine for clearing up data structures during initialize and prior to parallel communication...
Real PostprocessorValue
BoundaryIntersection
This enumeration is used to inidacate status of boundary intersections.
unsigned long _var_number
This variable is used to build the periodic node map.
This object will mark nodes or elements of continuous regions all with a unique number for the purpos...
virtual processor_id_type numberOfDistributedMergeHelpers() const
Returns a number indicating the number of merge helpers when running in parallel based on certain imp...
container_type _periodic_nodes
Holds the nodes that belong to the feature on a periodic boundary.
void visitElementalNeighbors(const Elem *elem, FeatureData *feature, bool expand_halos_only, bool disjoint_only)
const std::size_t _maps_size
Convenience variable holding the size of all the datastructures size by the number of maps...
const bool _use_less_than_threshold_comparison
Use less-than when comparing values against the threshold value.
bool ghostedIntersect(const FeatureData &rhs) const
const bool _global_numbering
This variable is used to indicate whether or not we identify features with unique numbers on multiple...
std::size_t numCoupledVars() const
Returns the number of coupled varaibles.
const DofMap & _dof_map
Reference to the dof_map containing the coupled variables.
static const unsigned int invalid_id
void updateRegionOffsets()
This routine updates the _region_offsets variable which is useful for quickly determining the proper ...
FeatureData(std::size_t var_index, unsigned int local_index, processor_id_type rank, Status status)
bool canConsolidate(const FeatureData &rhs) const
This routine indicates whether two features can be consolidated, that is, one feature is reasonably e...
std::vector< std::map< dof_id_type, int > > _feature_maps
The feature maps contain the raw flooded node information and eventually the unique grain numbers...
virtual Real getConnectingThreshold(std::size_t current_index) const
Return the "connecting" comparison threshold to use when inspecting an entity during the flood stage...
const bool _single_map_mode
This variable is used to indicate whether or not multiple maps are used during flooding.
unsigned int _feature_count
The number of features seen by this object (same as summing _feature_counts_per_map) ...
virtual Real getValue() const override
static void reserve(std::vector< T > &container, std::size_t size)
virtual bool doesFeatureIntersectSpecifiedBoundary(unsigned int feature_id) const
Returns a Boolean indicating whether this feature intersects boundaries in a user-supplied list...
const Real _threshold
The threshold above (or below) where an entity may begin a new region (feature)
void consolidate(FeatureData &&rhs)
Consolidates features, i.e.
std::unique_ptr< PointLocatorBase > _point_locator
virtual void mergeSets()
This routine is called on the primary rank only and stitches together the partial feature pieces seen...
bool _is_boundary_restricted
Indicates that this object should only run on one or more boundaries.
std::vector< MooseVariableFEBase * > _fe_vars
The vector of coupled in variables.
virtual bool isNewFeatureOrConnectedRegion(const DofObject *dof_object, std::size_t &current_index, FeatureData *&feature, Status &status, unsigned int &new_id)
Method called during the recursive flood routine that should return whether or not the current entity...
std::vector< std::list< FeatureData > > _partial_feature_sets
The data structure used to hold partial and communicated feature data, during the discovery and mergi...
static void reserve(std::set< T > &, std::size_t)
void merge(FeatureData &&rhs)
Merges another Feature Data into this one.
virtual void restoreOriginalDataStructures(std::vector< std::list< FeatureData >> &)
const bool _compute_halo_maps
Indicates whether or not to communicate halo map information with all ranks.
PeriodicBoundaries * _pbs
A pointer to the periodic boundary constraints object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unordered_map< dof_id_type, std::vector< const Elem * > > _nodes_to_elem_map
The data structure used to find neighboring elements give a node ID.
const bool _is_elemental
Determines if the flood counter is elements or not (nodes)
std::vector< unsigned int > _empty_var_to_features
void visitNeighborsHelper(const T *curr_entity, std::vector< const T *> neighbor_entities, FeatureData *feature, bool expand_halos_only, bool topological_neighbor, bool disjoint_only)
The actual logic for visiting neighbors is abstracted out here.
bool flood(const DofObject *dof_object, std::size_t current_index)
This method will check if the current entity is above the supplied threshold and "mark" it...
container_type _local_ids
Holds the local ids in the interior of a feature.
static void sort(std::vector< T > &container)
const processor_id_type _n_procs
Convenience variable holding the number of processors in this simulation.
FeatureData & operator=(FeatureData &&)=default
void updateBoundaryIntersections(FeatureData &feature) const
Update the feature&#39;s attributes to indicate boundary intersections.
void dataStore(std::ostream &stream, FeatureFloodCount::FeatureData &feature, void *context)
virtual void meshChanged() override
std::vector< unsigned int > _feature_counts_per_map
The number of features seen by this object per map.
std::vector< std::size_t > _feature_id_to_local_index
The vector recording the grain_id to local index (several indices will contain invalid_size_t) ...
ConstBndElemRange * _bnd_elem_range
Boundary element range pointer.
static const processor_id_type invalid_proc_id
const InputParameters & parameters() const
std::list< std::pair< processor_id_type, unsigned int > > _orig_ids
Original processor/local ids.
virtual void initialSetup() override
BoundaryIntersection _boundary_intersection
Enumeration indicating boundary intersection status.
Status _status
The status of a feature (used mostly in derived classes like the GrainTracker)
bool compareValueWithThreshold(Real entity_value, Real threshold) const
This method is used to determine whether the current entity value is part of a feature or not...
void deserialize(std::vector< std::string > &serialized_buffers, unsigned int var_num=invalid_id)
This routine takes the vector of byte buffers (one for each processor), deserializes them into a seri...
void mergeBBoxes(std::vector< BoundingBox > &bboxes, bool physical_intersection)
Located the overlapping bounding box between this Feature and the other Feature and expands that over...
MooseMesh & _mesh
A reference to the mesh.
void dataLoad(std::istream &stream, FeatureFloodCount::FeatureData &feature, void *context)
virtual Real getEntityValue(dof_id_type entity_id, FieldType field_type, std::size_t var_index=0) const
void buildFeatureIdToLocalIndices(unsigned int max_id)
This method builds a lookup map for retrieving the right local feature (by index) given a global inde...
void scatterAndUpdateRanks()
Calls buildLocalToGlobalIndices to build the individual local to global indicies for each rank and sc...
virtual bool doesFeatureIntersectBoundary(unsigned int feature_id) const
Returns a Boolean indicating whether this feature intersects any boundary.
std::deque< const DofObject * > _entity_queue
The data structure for maintaining entities to flood during discovery.
bool periodicBoundariesIntersect(const FeatureData &rhs) const
const std::vector< MooseVariableFEBase * > & getFECoupledVars() const
Returns a const vector to the coupled MooseVariableFEBase pointers.
const bool _compute_var_to_feature_map
Indicates whether or not the var to feature map is populated.
bool isElemental() const
std::unordered_set< dof_id_type > _all_boundary_entity_ids
The set of entities on the boundary of the domain used for determining if features intersect any boun...
const bool _var_index_mode
This variable is used to indicate whether the maps will contain unique region information or just the...
std::size_t _vol_count
The count of entities contributing to the volume calculation.
unsigned int _id
An ID for this feature.
uint8_t dof_id_type
std::vector< std::map< dof_id_type, int > > _var_index_maps
This map keeps track of which variables own which nodes.
virtual Point featureCentroid(unsigned int feature_id) const
Returns the centroid of the designated feature (only supported without periodic boundaries) ...
virtual Real getThreshold(std::size_t current_index) const
Return the starting comparison threshold to use when inspecting an entity during the flood stage...
std::vector< std::size_t > _local_to_global_feature_map
The vector recording the local to global feature indices.
virtual void prepareDataForTransfer()
This routine uses the local flooded data to build up the local feature data structures (_partial feat...