www.mooseframework.org
PolycrystalUserObjectBase.C
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 
11 #include "NonlinearSystemBase.h"
12 #include "MooseMesh.h"
13 #include "MooseVariable.h"
14 #include "TimedPrint.h"
15 
16 #include "libmesh/dense_matrix.h"
17 
18 #include <vector>
19 #include <map>
20 #include <algorithm>
21 
22 template <>
23 InputParameters
25 {
26  InputParameters params = validParams<FeatureFloodCount>();
27  params.addClassDescription("This object provides the base capability for creating proper reduced "
28  "order parameter polycrystal initial conditions.");
29  params.addRequiredCoupledVarWithAutoBuild(
30  "variable", "var_name_base", "op_num", "Array of coupled variables");
31  params.addParam<bool>("output_adjacency_matrix",
32  false,
33  "Output the Grain Adjacency Matrix used in the coloring algorithms. "
34  "Additionally, the grain to OP assignments will be printed");
35  params.addParam<MooseEnum>("coloring_algorithm",
38 
39  // FeatureFloodCount adds a relationship manager, but we need to extend that for PolycrystalIC
40  params.clearRelationshipManagers();
41 
42  params.addRelationshipManager(
43  "ElementSideNeighborLayers",
44  Moose::RelationshipManagerType::GEOMETRIC,
45 
46  [](const InputParameters & /*obj_params*/, InputParameters & rm_params) {
47  rm_params.set<unsigned short>("layers") = 2;
48  }
49 
50  );
51 
52  params.addRelationshipManager("ElementSideNeighborLayers",
53  Moose::RelationshipManagerType::ALGEBRAIC);
54 
55  // Hide the output of the IC objects by default, it doesn't change over time
56  params.set<std::vector<OutputName>>("outputs") = {"none"};
57 
59  params.set<bool>("allow_duplicate_execution_on_initial") = true;
60 
61  // This object should only be executed _before_ the initial condition
62  ExecFlagEnum execute_options = MooseUtils::getDefaultExecFlagEnum();
63  execute_options = EXEC_INITIAL;
64  params.set<ExecFlagEnum>("execute_on") = execute_options;
65 
66  return params;
67 }
68 
69 PolycrystalUserObjectBase::PolycrystalUserObjectBase(const InputParameters & parameters)
70  : FeatureFloodCount(parameters),
71  _dim(_mesh.dimension()),
72  _op_num(_vars.size()),
73  _coloring_algorithm(getParam<MooseEnum>("coloring_algorithm")),
74  _colors_assigned(false),
75  _output_adjacency_matrix(getParam<bool>("output_adjacency_matrix")),
76  _execute_timer(registerTimedSection("execute", 1)),
77  _finalize_timer(registerTimedSection("finalize", 1))
78 {
79  mooseAssert(_single_map_mode, "Do not turn off single_map_mode with this class");
80 }
81 
82 void
84 {
89  if (_op_num < 1)
90  mooseError("No coupled variables found");
91 
92  for (unsigned int dim = 0; dim < _dim; ++dim)
93  {
94  bool first_variable_value = _mesh.isTranslatedPeriodic(_vars[0]->number(), dim);
95 
96  for (unsigned int i = 1; i < _vars.size(); ++i)
97  if (_mesh.isTranslatedPeriodic(_vars[i]->number(), dim) != first_variable_value)
98  mooseError("Coupled polycrystal variables differ in periodicity");
99  }
100 
102 }
103 
104 void
106 {
107  if (_colors_assigned && !_fe_problem.hasInitialAdaptivity())
108  return;
109 
110  _entity_to_grain_cache.clear();
111 
113 }
114 
115 void
117 {
118  if (!_colors_assigned)
120  // No need to rerun the object if the mesh hasn't changed
121  else if (!_fe_problem.hasInitialAdaptivity())
122  return;
123 
124  TIME_SECTION(_execute_timer);
125  CONSOLE_TIMED_PRINT("Computing Polycrystal Initial Condition");
126 
132 
145  for (const auto & current_elem : _fe_problem.getEvaluableElementRange())
146  {
147  // Loop over elements or nodes
148  if (_is_elemental)
149  while (flood(current_elem, invalid_size_t))
150  ;
151  else
152  {
153  auto n_nodes = current_elem->n_vertices();
154  for (auto i = decltype(n_nodes)(0); i < n_nodes; ++i)
155  {
156  const Node * current_node = current_elem->node_ptr(i);
157 
158  while (flood(current_node, invalid_size_t))
159  ;
160  }
161  }
162  }
163 }
164 
165 void
167 {
168  if (_colors_assigned && !_fe_problem.hasInitialAdaptivity())
169  return;
170 
171  TIME_SECTION(_finalize_timer);
172  CONSOLE_TIMED_PRINT("Finalizing Polycrystal Initial Condition");
173 
174  // TODO: Possibly retrieve the halo thickness from the active GrainTracker object?
175  constexpr unsigned int halo_thickness = 2;
176 
177  expandEdgeHalos(halo_thickness - 1);
178 
180 
181  if (!_colors_assigned)
182  {
183  // Resize the color assignment vector here. All ranks need a copy of this
185  if (_is_master)
186  {
188 
190 
193  }
194 
195  // Communicate the coloring with all ranks
196  _communicator.broadcast(_grain_to_op);
197 
202  for (auto & grain : _feature_sets)
203  grain._var_index = _grain_to_op[grain._id];
204  }
205 
206  _colors_assigned = true;
207 }
208 
209 void
211 {
217  _partial_feature_sets[0].sort();
218 
219  auto it1 = _partial_feature_sets[0].begin();
220  auto it_end = _partial_feature_sets[0].end();
221  while (it1 != it_end)
222  {
223  auto it2 = it1;
224  if (++it2 == it_end)
225  break;
226 
227  if (areFeaturesMergeable(*it1, *it2))
228  {
229  it1->merge(std::move(*it2));
230  _partial_feature_sets[0].erase(it2);
231  }
232  else
233  ++it1; // Only increment if we have a mismatch
234  }
235 }
236 
237 bool
239  std::size_t & current_index,
240  FeatureData *& feature,
241  Status & status,
242  unsigned int & new_id)
243 {
244  mooseAssert(_t_step == 0, "PolyIC only works if we begin in the initial condition");
245 
246  // Retrieve the id of the current entity
247  auto entity_id = dof_object->id();
248  auto grains_it = _entity_to_grain_cache.lower_bound(entity_id);
249 
250  if (grains_it == _entity_to_grain_cache.end() || grains_it->first != entity_id)
251  {
252  std::vector<unsigned int> grain_ids;
253 
254  if (_is_elemental)
255  getGrainsBasedOnElem(*static_cast<const Elem *>(dof_object), grain_ids);
256  else
257  getGrainsBasedOnPoint(*static_cast<const Node *>(dof_object), grain_ids);
258 
259  grains_it = _entity_to_grain_cache.emplace_hint(grains_it, entity_id, std::move(grain_ids));
260  }
261 
271  auto saved_grain_id = invalid_id;
272  if (current_index == invalid_size_t)
273  {
274  for (auto grain_id : grains_it->second)
275  {
276  mooseAssert(!_colors_assigned || grain_id < _grain_to_op.size(), "grain_id out of range");
277  auto map_num = _colors_assigned ? _grain_to_op[grain_id] : grain_id;
278  if (_entities_visited[map_num].find(entity_id) == _entities_visited[map_num].end())
279  {
280  saved_grain_id = grain_id;
281 
282  if (!_colors_assigned)
283  current_index = grain_id;
284  else
285  current_index = _grain_to_op[grain_id];
286 
287  break;
288  }
289  }
290 
291  if (current_index == invalid_size_t)
292  return false;
293  }
294  else if (_entities_visited[current_index].find(entity_id) !=
295  _entities_visited[current_index].end())
296  return false;
297 
298  if (!feature)
299  {
300  new_id = saved_grain_id;
301  status &= ~Status::INACTIVE;
302 
303  return true;
304  }
305  else
306  {
307  const auto & grain_ids = grains_it->second;
308  if (std::find(grain_ids.begin(), grain_ids.end(), feature->_id) != grain_ids.end())
309  return true;
310 
316  if (_is_elemental)
317  {
318  Elem * elem = _mesh.queryElemPtr(entity_id);
319  mooseAssert(elem, "Element is nullptr");
320 
321  std::vector<const Elem *> all_active_neighbors;
322  MeshBase & mesh = _mesh.getMesh();
323 
324  for (auto i = decltype(elem->n_neighbors())(0); i < elem->n_neighbors(); ++i)
325  {
326  const Elem * neighbor_ancestor = nullptr;
327 
332  neighbor_ancestor = elem->neighbor_ptr(i);
333  if (neighbor_ancestor)
334  neighbor_ancestor->active_family_tree_by_neighbor(all_active_neighbors, elem, false);
335  else // if (expand_halos_only /*&& feature->_periodic_nodes.empty()*/)
336  {
337  neighbor_ancestor = elem->topological_neighbor(i, mesh, *_point_locator, _pbs);
338 
346  if (neighbor_ancestor)
347  neighbor_ancestor->active_family_tree_by_topological_neighbor(
348  all_active_neighbors, elem, mesh, *_point_locator, _pbs, false);
349  }
350  }
351 
352  for (const auto neighbor : all_active_neighbors)
353  {
354  // Retrieve the id of the current entity
355  auto neighbor_id = neighbor->id();
356  auto neighbor_it = _entity_to_grain_cache.lower_bound(neighbor_id);
357 
358  if (neighbor_it == _entity_to_grain_cache.end() || neighbor_it->first != neighbor_id)
359  {
360  std::vector<unsigned int> more_grain_ids;
361 
362  getGrainsBasedOnElem(*static_cast<const Elem *>(neighbor), more_grain_ids);
363 
364  neighbor_it = _entity_to_grain_cache.emplace_hint(
365  neighbor_it, neighbor_id, std::move(more_grain_ids));
366  }
367 
368  const auto & more_grain_ids = neighbor_it->second;
369  if (std::find(more_grain_ids.begin(), more_grain_ids.end(), feature->_id) !=
370  more_grain_ids.end())
371  return true;
372  }
373  }
374 
375  return false;
376  }
377 }
378 
379 bool
381  const FeatureData & f2) const
382 {
383  if (f1._id != f2._id)
384  return false;
385 
386  mooseAssert(f1._var_index == f2._var_index, "Feature should be mergeable but aren't");
387  return true;
388 }
389 
390 void
392 {
393  mooseAssert(_is_master, "This routine should only be called on the master rank");
394 
395  _adjacency_matrix = libmesh_make_unique<DenseMatrix<Real>>(_feature_count, _feature_count);
396  for (auto & grain1 : _feature_sets)
397  {
398  for (auto & grain2 : _feature_sets)
399  {
400  if (&grain1 == &grain2)
401  continue;
402 
403  if (grain1.boundingBoxesIntersect(grain2) && grain1.halosIntersect(grain2))
404  {
405  (*_adjacency_matrix)(grain1._id, grain2._id) = 1.;
406  (*_adjacency_matrix)(grain1._id, grain2._id) = 1.;
407  }
408  }
409  }
410 }
411 
412 void
414 {
415  mooseAssert(_is_master, "This routine should only be called on the master rank");
416 
417  Moose::perf_log.push("assignOpsToGrains()", "PolycrystalICTools");
418 
419  // Use a simple backtracking coloring algorithm
420  if (_coloring_algorithm == "bt")
421  {
422  paramInfo("coloring_algorithm",
423  "The backtracking algorithm has exponential complexity. If you are using very few "
424  "order parameters,\nor you have several hundred grains or more, you should use one "
425  "of the PETSc coloring algorithms such as \"jp\".");
426 
427  if (!colorGraph(0))
428  paramError("op_num",
429  "Unable to find a valid grain to op coloring, Make sure you have created enough "
430  "variables to hold a\nvalid polycrystal initial condition (no grains represented "
431  "by the same variable should be allowed to\ntouch, ~8 for 2D, ~25 for 3D)?");
432  }
433  else // PETSc Coloring algorithms
434  {
435 #ifdef LIBMESH_HAVE_PETSC
436  const std::string & ca_str = _coloring_algorithm;
437  Real * am_data = _adjacency_matrix->get_values().data();
438 
439  try
440  {
441  Moose::PetscSupport::colorAdjacencyMatrix(
442  am_data, _feature_count, _vars.size(), _grain_to_op, ca_str.c_str());
443  }
444  catch (std::runtime_error & e)
445  {
446  paramError("op_num",
447  "Unable to find a valid grain to op coloring, Make sure you have created enough "
448  "variables to hold a\nvalid polycrystal initial condition (no grains represented "
449  "by the same variable should be allowed to\ntouch, ~8 for 2D, ~25 for 3D)?");
450  }
451 #else
452  mooseError("Selected coloring algorithm requires PETSc");
453 #endif
454  }
455 
456  Moose::perf_log.pop("assignOpsToGrains()", "PolycrystalICTools");
457 }
458 
459 bool
461 {
462  // Base case: All grains are assigned
463  if (vertex == _feature_count)
464  return true;
465 
466  // Consider this grain and try different ops
467  for (unsigned int color_idx = 0; color_idx < _op_num; ++color_idx)
468  {
469  // We'll try to spread these colors around a bit rather than
470  // packing them all on the first few colors if we have several colors.
471  unsigned int color = (vertex + color_idx) % _op_num;
472 
473  if (isGraphValid(vertex, color))
474  {
475  _grain_to_op[vertex] = color;
476 
477  if (colorGraph(vertex + 1))
478  return true;
479 
480  // Backtrack...
482  }
483  }
484 
485  return false;
486 }
487 
488 bool
489 PolycrystalUserObjectBase::isGraphValid(unsigned int vertex, unsigned int color)
490 {
491  // See if the proposed color is valid based on the current neighbor colors
492  for (unsigned int neighbor = 0; neighbor < _feature_count; ++neighbor)
493  if ((*_adjacency_matrix)(vertex, neighbor) && color == _grain_to_op[neighbor])
494  return false;
495  return true;
496 }
497 
498 void
500 {
501  _console << "Grain Adjacency Matrix:\n";
502  for (unsigned int i = 0; i < _adjacency_matrix->m(); i++)
503  {
504  for (unsigned int j = 0; j < _adjacency_matrix->n(); j++)
505  _console << _adjacency_matrix->el(i, j) << " ";
506  _console << '\n';
507  }
508 
509  _console << "Grain to OP assignments:\n";
510  for (auto op : _grain_to_op)
511  _console << op << " ";
512  _console << '\n' << std::endl;
513 }
514 
515 MooseEnum
517 {
518  return MooseEnum("jp power greedy bt", "jp");
519 }
520 
521 std::string
523 {
524  return "The grain neighbor graph coloring algorithm to use: \"jp\" (DEFAULT) Jones and "
525  "Plassmann, an efficient coloring algorithm, \"power\" an alternative stochastic "
526  "algorithm, \"greedy\", a greedy assignment algorithm with stochastic updates to "
527  "guarantee a valid coloring, \"bt\", a back tracking algorithm that produces good "
528  "distributions but may experience exponential run time in the worst case scenario "
529  "(works well on medium to large 2D problems)";
530 }
531 
532 const unsigned int PolycrystalUserObjectBase::INVALID_COLOR =
533  std::numeric_limits<unsigned int>::max();
534 const unsigned int PolycrystalUserObjectBase::HALO_THICKNESS = 4;
FeatureFloodCount::expandEdgeHalos
void expandEdgeHalos(unsigned int num_layers_to_expand)
This method expands the existing halo set by some width determined by the passed in value.
Definition: FeatureFloodCount.C:1527
validParams< FeatureFloodCount >
InputParameters validParams< FeatureFloodCount >()
Definition: FeatureFloodCount.C:104
validParams< PolycrystalUserObjectBase >
InputParameters validParams< PolycrystalUserObjectBase >()
Definition: PolycrystalUserObjectBase.C:24
PolycrystalUserObjectBase::areFeaturesMergeable
virtual bool areFeaturesMergeable(const FeatureData &f1, const FeatureData &f2) const override
Method for determining whether two features are mergeable.
Definition: PolycrystalUserObjectBase.C:380
FeatureFloodCount::invalid_size_t
static const std::size_t invalid_size_t
Definition: FeatureFloodCount.h:93
FeatureFloodCount::_mesh
MooseMesh & _mesh
A reference to the mesh.
Definition: FeatureFloodCount.h:581
PolycrystalUserObjectBase::isNewFeatureOrConnectedRegion
virtual bool isNewFeatureOrConnectedRegion(const DofObject *dof_object, std::size_t &current_index, FeatureData *&feature, Status &status, unsigned int &new_id) override
Method called during the recursive flood routine that should return whether or not the current entity...
Definition: PolycrystalUserObjectBase.C:238
FeatureFloodCount::FeatureData::_id
unsigned int _id
An ID for this feature.
Definition: FeatureFloodCount.h:287
PolycrystalUserObjectBase::mergeSets
virtual void mergeSets() override
This routine is called on the master rank only and stitches together the partial feature pieces seen ...
Definition: PolycrystalUserObjectBase.C:210
PolycrystalUserObjectBase::finalize
virtual void finalize() override
Definition: PolycrystalUserObjectBase.C:166
PolycrystalUserObjectBase::initialize
virtual void initialize() override
Definition: PolycrystalUserObjectBase.C:105
PolycrystalUserObjectBase::execute
virtual void execute() override
Definition: PolycrystalUserObjectBase.C:116
PolycrystalUserObjectBase::coloringAlgorithms
static MooseEnum coloringAlgorithms()
Returns all available coloring algorithms as an enumeration type for input files.
Definition: PolycrystalUserObjectBase.C:516
FeatureFloodCount::Status
Status
This enumeration is used to indicate status of the grains in the _unique_grains data structure.
Definition: FeatureFloodCount.h:120
FeatureFloodCount::_entities_visited
std::vector< std::set< dof_id_type > > _entities_visited
This variable keeps track of which nodes have been visited during execution.
Definition: FeatureFloodCount.h:631
PolycrystalUserObjectBase::_grain_to_op
std::vector< unsigned int > _grain_to_op
A vector indicating which op is assigned to each grain.
Definition: PolycrystalUserObjectBase.h:150
FeatureFloodCount::_is_master
const bool _is_master
Convenience variable for testing master rank.
Definition: FeatureFloodCount.h:732
PolycrystalUserObjectBase::_op_num
const unsigned int _op_num
The maximum number of order parameters (colors) available to assign to the grain structure.
Definition: PolycrystalUserObjectBase.h:147
PolycrystalUserObjectBase::colorGraph
bool colorGraph(unsigned int vertex)
Built-in simple "back-tracking" algorithm to assign colors to a graph.
Definition: PolycrystalUserObjectBase.C:460
FeatureFloodCount
This object will mark nodes or elements of continuous regions all with a unique number for the purpos...
Definition: FeatureFloodCount.h:44
FeatureFloodCount::initialize
virtual void initialize() override
Definition: FeatureFloodCount.C:298
PolycrystalUserObjectBase::initialSetup
virtual void initialSetup() override
UserObject interface overrides.
Definition: PolycrystalUserObjectBase.C:83
PolycrystalUserObjectBase::PolycrystalUserObjectBase
PolycrystalUserObjectBase(const InputParameters &parameters)
Definition: PolycrystalUserObjectBase.C:69
FeatureFloodCount::finalize
virtual void finalize() override
Definition: FeatureFloodCount.C:681
PolycrystalUserObjectBase::_entity_to_grain_cache
std::map< dof_id_type, std::vector< unsigned int > > _entity_to_grain_cache
Definition: PolycrystalUserObjectBase.h:171
PolycrystalUserObjectBase::assignOpsToGrains
void assignOpsToGrains()
Method that runs a coloring algorithm to assign OPs to grains.
Definition: PolycrystalUserObjectBase.C:413
PolycrystalUserObjectBase::_finalize_timer
const PerfID _finalize_timer
Definition: PolycrystalUserObjectBase.h:175
PolycrystalUserObjectBase::_output_adjacency_matrix
const bool _output_adjacency_matrix
A user controllable Boolean which can be used to print the adjacency matrix to the console.
Definition: PolycrystalUserObjectBase.h:159
PolycrystalUserObjectBase::getNumGrains
virtual unsigned int getNumGrains() const =0
Must be overridden by the deriving class to provide the number of grains in the polycrystal structure...
FeatureFloodCount::_feature_sets
std::vector< FeatureData > & _feature_sets
The data structure used to hold the globally unique features.
Definition: FeatureFloodCount.h:662
PolycrystalUserObjectBase::_execute_timer
const PerfID _execute_timer
Timers.
Definition: PolycrystalUserObjectBase.h:174
PolycrystalUserObjectBase::buildGrainAdjacencyMatrix
void buildGrainAdjacencyMatrix()
Builds a dense adjacency matrix based on the discovery of grain neighbors and halos surrounding each ...
Definition: PolycrystalUserObjectBase.C:391
FeatureFloodCount::_single_map_mode
const bool _single_map_mode
This variable is used to indicate whether or not multiple maps are used during flooding.
Definition: FeatureFloodCount.h:591
PolycrystalUserObjectBase::getGrainsBasedOnElem
virtual void getGrainsBasedOnElem(const Elem &elem, std::vector< unsigned int > &grains) const
This method may be defined in addition to the point based initialization to speed up lookups.
Definition: PolycrystalUserObjectBase.h:52
FeatureFloodCount::_point_locator
std::unique_ptr< PointLocatorBase > _point_locator
Definition: FeatureFloodCount.h:689
PolycrystalUserObjectBase.h
FeatureFloodCount::_partial_feature_sets
std::vector< std::list< FeatureData > > _partial_feature_sets
The data structure used to hold partial and communicated feature data, during the discovery and mergi...
Definition: FeatureFloodCount.h:655
FeatureFloodCount::_is_elemental
const bool _is_elemental
Determines if the flood counter is elements or not (nodes)
Definition: FeatureFloodCount.h:723
PolycrystalUserObjectBase::precomputeGrainStructure
virtual void precomputeGrainStructure()
This callback is triggered after the object is initialized and may be optionally overridden to do pre...
Definition: PolycrystalUserObjectBase.h:36
PolycrystalUserObjectBase::_coloring_algorithm
const MooseEnum _coloring_algorithm
The selected graph coloring algorithm used by this object.
Definition: PolycrystalUserObjectBase.h:153
FeatureFloodCount::FeatureData
Definition: FeatureFloodCount.h:138
FeatureFloodCount::_vars
std::vector< MooseVariable * > _vars
The vector of coupled in variables cast to MooseVariable.
Definition: FeatureFloodCount.h:566
FeatureFloodCount::invalid_id
static const unsigned int invalid_id
Definition: FeatureFloodCount.h:94
PolycrystalUserObjectBase::printGrainAdjacencyMatrix
void printGrainAdjacencyMatrix() const
Prints out the adjacency matrix in a nicely spaced integer format.
Definition: PolycrystalUserObjectBase.C:499
FeatureFloodCount::_pbs
PeriodicBoundaries * _pbs
A pointer to the periodic boundary constraints object.
Definition: FeatureFloodCount.h:687
PolycrystalUserObjectBase::_adjacency_matrix
std::unique_ptr< DenseMatrix< Real > > _adjacency_matrix
The dense adjacency matrix.
Definition: PolycrystalUserObjectBase.h:141
FeatureFloodCount::initialSetup
virtual void initialSetup() override
Definition: FeatureFloodCount.C:277
PolycrystalUserObjectBase::INVALID_COLOR
static const unsigned int INVALID_COLOR
Used to indicate an invalid coloring for the built-in back-tracking algorithm.
Definition: PolycrystalUserObjectBase.h:162
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
PolycrystalUserObjectBase::_dim
const unsigned int _dim
mesh dimension
Definition: PolycrystalUserObjectBase.h:144
PolycrystalUserObjectBase::isGraphValid
bool isGraphValid(unsigned int vertex, unsigned int color)
Helper method for the back-tracking graph coloring algorithm.
Definition: PolycrystalUserObjectBase.C:489
FeatureFloodCount::flood
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.
Definition: FeatureFloodCount.C:1294
FeatureFloodCount::_feature_count
unsigned int _feature_count
The number of features seen by this object (same as summing _feature_counts_per_map)
Definition: FeatureFloodCount.h:648
PolycrystalUserObjectBase::_colors_assigned
bool _colors_assigned
A Boolean indicating whether the object has assigned colors to grains (internal use)
Definition: PolycrystalUserObjectBase.h:156
PolycrystalUserObjectBase::getGrainsBasedOnPoint
virtual void getGrainsBasedOnPoint(const Point &point, std::vector< unsigned int > &grains) const =0
Method for retrieving active grain IDs based on some point in the mesh.
PolycrystalUserObjectBase::HALO_THICKNESS
static const unsigned int HALO_THICKNESS
Used to hold the thickness of the halo that should be constructed for detecting adjacency.
Definition: PolycrystalUserObjectBase.h:165
PolycrystalUserObjectBase::coloringAlgorithmDescriptions
static std::string coloringAlgorithmDescriptions()
Returns corresponding descriptions of available coloring algorithms.
Definition: PolycrystalUserObjectBase.C:522