www.mooseframework.org
Classes | Functions
FeatureFloodCount.h File Reference

Go to the source code of this file.

Classes

class  FeatureFloodCount
 This object will mark nodes or elements of continuous regions all with a unique number for the purpose of counting or "coloring" unique regions in a solution. More...
 
class  FeatureFloodCount::FeatureData
 
struct  enable_bitmask_operators< FeatureFloodCount::Status >
 
struct  enable_bitmask_operators< FeatureFloodCount::BoundaryIntersection >
 

Functions

template<>
InputParameters validParams< FeatureFloodCount > ()
 
template<>
void dataStore (std::ostream &stream, FeatureFloodCount::FeatureData &feature, void *context)
 
template<>
void dataStore (std::ostream &stream, BoundingBox &bbox, void *context)
 
template<>
void dataLoad (std::istream &stream, FeatureFloodCount::FeatureData &feature, void *context)
 
template<>
void dataLoad (std::istream &stream, BoundingBox &bbox, void *context)
 

Function Documentation

◆ dataLoad() [1/2]

template<>
void dataLoad ( std::istream &  stream,
BoundingBox &  bbox,
void *  context 
)

Definition at line 87 of file FeatureFloodCount.C.

88 {
89  loadHelper(stream, bbox.min(), context);
90  loadHelper(stream, bbox.max(), context);
91 }

◆ dataLoad() [2/2]

template<>
void dataLoad ( std::istream &  stream,
FeatureFloodCount::FeatureData feature,
void *  context 
)

Note that _local_ids is not loaded here. It's not needed for restart, and not needed during the parallel merge operation

Definition at line 64 of file FeatureFloodCount.C.

65 {
70  loadHelper(stream, feature._ghosted_ids, context);
71  loadHelper(stream, feature._halo_ids, context);
72  loadHelper(stream, feature._disjoint_halo_ids, context);
73  loadHelper(stream, feature._periodic_nodes, context);
74  loadHelper(stream, feature._var_index, context);
75  loadHelper(stream, feature._id, context);
76  loadHelper(stream, feature._bboxes, context);
77  loadHelper(stream, feature._orig_ids, context);
78  loadHelper(stream, feature._min_entity_id, context);
79  loadHelper(stream, feature._vol_count, context);
80  loadHelper(stream, feature._centroid, context);
81  loadHelper(stream, feature._status, context);
82  loadHelper(stream, feature._boundary_intersection, context);
83 }

Referenced by FeatureFloodCount::deserialize().

◆ dataStore() [1/2]

template<>
void dataStore ( std::ostream &  stream,
BoundingBox &  bbox,
void *  context 
)

Definition at line 56 of file FeatureFloodCount.C.

57 {
58  storeHelper(stream, bbox.min(), context);
59  storeHelper(stream, bbox.max(), context);
60 }

◆ dataStore() [2/2]

template<>
void dataStore ( std::ostream &  stream,
FeatureFloodCount::FeatureData feature,
void *  context 
)

Note that _local_ids is not stored here. It's not needed for restart, and not needed during the parallel merge operation

Definition at line 33 of file FeatureFloodCount.C.

34 {
39  storeHelper(stream, feature._ghosted_ids, context);
40  storeHelper(stream, feature._halo_ids, context);
41  storeHelper(stream, feature._disjoint_halo_ids, context);
42  storeHelper(stream, feature._periodic_nodes, context);
43  storeHelper(stream, feature._var_index, context);
44  storeHelper(stream, feature._id, context);
45  storeHelper(stream, feature._bboxes, context);
46  storeHelper(stream, feature._orig_ids, context);
47  storeHelper(stream, feature._min_entity_id, context);
48  storeHelper(stream, feature._vol_count, context);
49  storeHelper(stream, feature._centroid, context);
50  storeHelper(stream, feature._status, context);
51  storeHelper(stream, feature._boundary_intersection, context);
52 }

Referenced by FeatureFloodCount::serialize().

◆ validParams< FeatureFloodCount >()

template<>
InputParameters validParams< FeatureFloodCount > ( )

The FeatureFloodCount and derived objects should not to operate on the displaced mesh. These objects consume variable values from the nonlinear system and use a lot of raw geometric element information from the mesh. If you use the displaced system with EBSD information for instance, you'll have difficulties reconciling the difference between the coordinates from the EBSD data file and the potential displacements applied via boundary conditions.

Definition at line 104 of file FeatureFloodCount.C.

105 {
106  InputParameters params = validParams<GeneralPostprocessor>();
107  params += validParams<BoundaryRestrictable>();
108 
109  params.addRequiredCoupledVar(
110  "variable",
111  "The variable(s) for which to find connected regions of interests, i.e. \"features\".");
112  params.addParam<Real>(
113  "threshold", 0.5, "The threshold value for which a new feature may be started");
114  params.addParam<Real>(
115  "connecting_threshold",
116  "The threshold for which an existing feature may be extended (defaults to \"threshold\")");
117  params.addParam<bool>("use_single_map",
118  true,
119  "Determine whether information is tracked per "
120  "coupled variable or consolidated into one "
121  "(default: true)");
122  params.addParam<bool>(
123  "condense_map_info",
124  false,
125  "Determines whether we condense all the node values when in multimap mode (default: false)");
126  params.addParam<bool>("use_global_numbering",
127  true,
128  "Determine whether or not global numbers are "
129  "used to label features on multiple maps "
130  "(default: true)");
131  params.addParam<bool>("enable_var_coloring",
132  false,
133  "Instruct the Postprocessor to populate the variable index map.");
134  params.addParam<bool>(
135  "compute_halo_maps",
136  false,
137  "Instruct the Postprocessor to communicate proper halo information to all ranks");
138  params.addParam<bool>("compute_var_to_feature_map",
139  false,
140  "Instruct the Postprocessor to compute the active vars to features map");
141  params.addParam<bool>(
142  "use_less_than_threshold_comparison",
143  true,
144  "Controls whether features are defined to be less than or greater than the threshold value.");
145 
146  params.addParam<std::vector<BoundaryName>>(
147  "primary_percolation_boundaries",
148  "A list of boundaries used in conjunction with the corresponding "
149  "\"secondary_percolation_boundaries\" parameter for determining if a feature creates a path "
150  "connecting any pair of boundaries");
151  params.addParam<std::vector<BoundaryName>>(
152  "secondary_percolation_boundaries",
153  "Paired boundaries with \"primaryary_percolation_boundaries\" parameter");
154  params.addParam<std::vector<BoundaryName>>(
155  "specified_boundaries",
156  "An optional list of boundaries; if supplied, each feature is checked to determine whether "
157  "it intersects any of the specified boundaries in this list.");
158 
166  params.set<bool>("use_displaced_mesh") = false;
167 
168  // The FeatureFloodCount object does not require that any state (restartable information) is
169  // maintained. This Boolean is set to false so that we don't ask MOOSE to save a potentially
170  // large data structure for no reason. It is set for true in at least one derived class
171  // (GrainTracker).
172  params.addPrivateParam<bool>("restartable_required", false);
173 
174  params.addParamNamesToGroup(
175  "use_single_map condense_map_info use_global_numbering primary_percolation_boundaries",
176  "Advanced");
177 
178  MooseEnum flood_type("NODAL ELEMENTAL", "ELEMENTAL");
179  params.addParam<MooseEnum>("flood_entity_type",
180  flood_type,
181  "Determines whether the flood algorithm runs on nodes or elements");
182 
183  params.addClassDescription("The object is able to find and count \"connected components\" in any "
184  "solution field or number of solution fields. A primary example would "
185  "be to count \"bubbles\".");
186 
187  params.addRelationshipManager("ElementSideNeighborLayers",
188  Moose::RelationshipManagerType::GEOMETRIC |
189  Moose::RelationshipManagerType::ALGEBRAIC);
190 
191  return params;
192 }

Referenced by validParams< GrainTracker >(), validParams< GrainTrackerInterface >(), and validParams< PolycrystalUserObjectBase >().

FeatureFloodCount::FeatureData::_id
unsigned int _id
An ID for this feature.
Definition: FeatureFloodCount.h:287
FeatureFloodCount::FeatureData::_disjoint_halo_ids
container_type _disjoint_halo_ids
Holds halo ids that extend onto a non-topologically connected surface.
Definition: FeatureFloodCount.h:278
FeatureFloodCount::FeatureData::_boundary_intersection
BoundaryIntersection _boundary_intersection
Enumaration indicating boundary intersection status.
Definition: FeatureFloodCount.h:310
FeatureFloodCount::FeatureData::_min_entity_id
dof_id_type _min_entity_id
The minimum entity seen in the _local_ids, used for sorting features.
Definition: FeatureFloodCount.h:297
FeatureFloodCount::FeatureData::_ghosted_ids
container_type _ghosted_ids
Holds the ghosted ids for a feature (the ids which will be used for stitching.
Definition: FeatureFloodCount.h:268
FeatureFloodCount::FeatureData::_halo_ids
container_type _halo_ids
Holds the ids surrounding the feature.
Definition: FeatureFloodCount.h:275
FeatureFloodCount::FeatureData::_orig_ids
std::list< std::pair< processor_id_type, unsigned int > > _orig_ids
Original processor/local ids.
Definition: FeatureFloodCount.h:294
FeatureFloodCount::FeatureData::_periodic_nodes
container_type _periodic_nodes
Holds the nodes that belong to the feature on a periodic boundary.
Definition: FeatureFloodCount.h:281
FeatureFloodCount::FeatureData::_var_index
std::size_t _var_index
The Moose variable where this feature was found (often the "order parameter")
Definition: FeatureFloodCount.h:284
FeatureFloodCount::FeatureData::_centroid
Point _centroid
The centroid of the feature (average of coordinates from entities participating in the volume calcula...
Definition: FeatureFloodCount.h:304
FeatureFloodCount::FeatureData::_vol_count
std::size_t _vol_count
The count of entities contributing to the volume calculation.
Definition: FeatureFloodCount.h:300
FeatureFloodCount::FeatureData::_bboxes
std::vector< BoundingBox > _bboxes
The vector of bounding boxes completely enclosing this feature (multiple used with periodic constrain...
Definition: FeatureFloodCount.h:291
FeatureFloodCount::FeatureData::_status
Status _status
The status of a feature (used mostly in derived classes like the GrainTracker)
Definition: FeatureFloodCount.h:307