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 >
 

Functions

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

Function Documentation

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

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

Definition at line 60 of file FeatureFloodCount.C.

Referenced by FeatureFloodCount::deserialize().

61 {
66  loadHelper(stream, feature._ghosted_ids, context);
67  loadHelper(stream, feature._halo_ids, context);
68  loadHelper(stream, feature._disjoint_halo_ids, context);
69  loadHelper(stream, feature._periodic_nodes, context);
70  loadHelper(stream, feature._var_index, context);
71  loadHelper(stream, feature._id, context);
72  loadHelper(stream, feature._bboxes, context);
73  loadHelper(stream, feature._orig_ids, context);
74  loadHelper(stream, feature._min_entity_id, context);
75  loadHelper(stream, feature._vol_count, context);
76  loadHelper(stream, feature._centroid, context);
77  loadHelper(stream, feature._status, context);
78  loadHelper(stream, feature._intersects_boundary, context);
79 }
Point _centroid
The centroid of the feature (average of coordinates from entities participating in the volume calcula...
std::set< dof_id_type > _periodic_nodes
Holds the nodes that belong to the feature on a periodic boundary.
std::vector< MeshTools::BoundingBox > _bboxes
The vector of bounding boxes completely enclosing this feature (multiple used with periodic constrain...
std::set< dof_id_type > _disjoint_halo_ids
Holds halo ids that extend onto a non-topologically connected surface.
dof_id_type _min_entity_id
The minimum entity seen in the _local_ids, used for sorting features.
std::size_t _var_index
The Moose variable where this feature was found (often the "order parameter")
std::set< dof_id_type > _halo_ids
Holds the ids surrounding the feature.
std::list< std::pair< processor_id_type, unsigned int > > _orig_ids
Original processor/local ids.
Status _status
The status of a feature (used mostly in derived classes like the GrainTracker)
bool _intersects_boundary
Flag indicating whether this feature intersects a boundary.
std::set< dof_id_type > _ghosted_ids
Holds the ghosted ids for a feature (the ids which will be used for stitching.
std::size_t _vol_count
The count of entities contributing to the volume calculation.
unsigned int _id
An ID for this feature.
template<>
void dataLoad ( std::istream &  stream,
MeshTools::BoundingBox &  bbox,
void *  context 
)

Definition at line 83 of file FeatureFloodCount.C.

84 {
85  loadHelper(stream, bbox.min(), context);
86  loadHelper(stream, bbox.max(), context);
87 }
template<>
void dataStore ( std::ostream &  stream,
FeatureFloodCount::FeatureData feature,
void *  context 
)

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

Definition at line 29 of file FeatureFloodCount.C.

Referenced by FeatureFloodCount::serialize().

30 {
35  storeHelper(stream, feature._ghosted_ids, context);
36  storeHelper(stream, feature._halo_ids, context);
37  storeHelper(stream, feature._disjoint_halo_ids, context);
38  storeHelper(stream, feature._periodic_nodes, context);
39  storeHelper(stream, feature._var_index, context);
40  storeHelper(stream, feature._id, context);
41  storeHelper(stream, feature._bboxes, context);
42  storeHelper(stream, feature._orig_ids, context);
43  storeHelper(stream, feature._min_entity_id, context);
44  storeHelper(stream, feature._vol_count, context);
45  storeHelper(stream, feature._centroid, context);
46  storeHelper(stream, feature._status, context);
47  storeHelper(stream, feature._intersects_boundary, context);
48 }
Point _centroid
The centroid of the feature (average of coordinates from entities participating in the volume calcula...
std::set< dof_id_type > _periodic_nodes
Holds the nodes that belong to the feature on a periodic boundary.
std::vector< MeshTools::BoundingBox > _bboxes
The vector of bounding boxes completely enclosing this feature (multiple used with periodic constrain...
std::set< dof_id_type > _disjoint_halo_ids
Holds halo ids that extend onto a non-topologically connected surface.
dof_id_type _min_entity_id
The minimum entity seen in the _local_ids, used for sorting features.
std::size_t _var_index
The Moose variable where this feature was found (often the "order parameter")
std::set< dof_id_type > _halo_ids
Holds the ids surrounding the feature.
std::list< std::pair< processor_id_type, unsigned int > > _orig_ids
Original processor/local ids.
Status _status
The status of a feature (used mostly in derived classes like the GrainTracker)
bool _intersects_boundary
Flag indicating whether this feature intersects a boundary.
std::set< dof_id_type > _ghosted_ids
Holds the ghosted ids for a feature (the ids which will be used for stitching.
std::size_t _vol_count
The count of entities contributing to the volume calculation.
unsigned int _id
An ID for this feature.
template<>
void dataStore ( std::ostream &  stream,
MeshTools::BoundingBox &  bbox,
void *  context 
)

Definition at line 52 of file FeatureFloodCount.C.

53 {
54  storeHelper(stream, bbox.min(), context);
55  storeHelper(stream, bbox.max(), context);
56 }
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 98 of file FeatureFloodCount.C.

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

99 {
100  InputParameters params = validParams<GeneralPostprocessor>();
101  params.addRequiredCoupledVar(
102  "variable",
103  "The variable(s) for which to find connected regions of interests, i.e. \"features\".");
104  params.addParam<Real>(
105  "threshold", 0.5, "The threshold value for which a new feature may be started");
106  params.addParam<Real>(
107  "connecting_threshold",
108  "The threshold for which an existing feature may be extended (defaults to \"threshold\")");
109  params.addParam<bool>("use_single_map",
110  true,
111  "Determine whether information is tracked per "
112  "coupled variable or consolidated into one "
113  "(default: true)");
114  params.addParam<bool>(
115  "condense_map_info",
116  false,
117  "Determines whether we condense all the node values when in multimap mode (default: false)");
118  params.addParam<bool>("use_global_numbering",
119  true,
120  "Determine whether or not global numbers are "
121  "used to label features on multiple maps "
122  "(default: true)");
123  params.addParam<bool>("enable_var_coloring",
124  false,
125  "Instruct the Postprocessor to populate the variable index map.");
126  params.addParam<bool>(
127  "compute_halo_maps",
128  false,
129  "Instruct the Postprocessor to communicate proper halo information to all ranks");
130  params.addParam<bool>("compute_var_to_feature_map",
131  false,
132  "Instruct the Postprocessor to compute the active vars to features map");
133  params.addParam<bool>(
134  "use_less_than_threshold_comparison",
135  true,
136  "Controls whether features are defined to be less than or greater than the threshold value.");
137 
145  params.set<bool>("use_displaced_mesh") = false;
146 
147  params.addParamNamesToGroup("use_single_map condense_map_info use_global_numbering", "Advanced");
148 
149  MooseEnum flood_type("NODAL ELEMENTAL", "ELEMENTAL");
150  params.addParam<MooseEnum>("flood_entity_type",
151  flood_type,
152  "Determines whether the flood algorithm runs on nodes or elements");
153  return params;
154 }