www.mooseframework.org
Public Member Functions | Static Public Member Functions | List of all members
GrainTrackerInterface Class Referenceabstract

This class defines the interface for the GrainTracking objects. More...

#include <GrainTrackerInterface.h>

Inheritance diagram for GrainTrackerInterface:
[legend]

Public Member Functions

virtual Real getEntityValue (dof_id_type entity_id, FeatureFloodCount::FieldType, std::size_t var_index=0) const =0
 Accessor for retrieving either nodal or elemental information (unique grains or variable indicies) More...
 
virtual const std::vector< unsigned int > & getVarToFeatureVector (dof_id_type elem_id) const =0
 Returns a list of active unique feature ids for a particular element. More...
 
virtual unsigned int getFeatureVar (unsigned int feature_id) const =0
 Return the variable index (typically order parameter) for the given feature. More...
 
virtual std::size_t getNumberActiveGrains () const =0
 Returns the number of active grains current stored in the GrainTracker. More...
 
virtual std::size_t getTotalFeatureCount () const =0
 Returns a number large enough to contain the largest ID for all grains in use. More...
 
virtual Point getGrainCentroid (unsigned int grain_id) const =0
 Returns the centroid for the given grain number. More...
 
virtual bool doesFeatureIntersectBoundary (unsigned int grain_id) const =0
 Returns a Boolean indicating whether this grain is in contact with any boundary of the domain. More...
 
virtual std::vector< unsigned intgetNewGrainIDs () const
 This method returns all of the new ids generated in an invocation of the GrainTracker. More...
 

Static Public Member Functions

static InputParameters validParams ()
 

Detailed Description

This class defines the interface for the GrainTracking objects.

Definition at line 20 of file GrainTrackerInterface.h.

Member Function Documentation

◆ doesFeatureIntersectBoundary()

virtual bool GrainTrackerInterface::doesFeatureIntersectBoundary ( unsigned int  grain_id) const
pure virtual

Returns a Boolean indicating whether this grain is in contact with any boundary of the domain.

Implemented in GrainTracker, and FauxGrainTracker.

◆ getEntityValue()

virtual Real GrainTrackerInterface::getEntityValue ( dof_id_type  entity_id,
FeatureFloodCount::FieldType  ,
std::size_t  var_index = 0 
) const
pure virtual

Accessor for retrieving either nodal or elemental information (unique grains or variable indicies)

Parameters
entity_idthe node identifier for which to retrieve field data
var_idxwhen using multi-map mode, the map number from which to retrieve data.
show_var_coloringpass true to view variable index for a region, false for unique grain information
Returns
the entity value

Implemented in GrainTracker, and FauxGrainTracker.

Referenced by GrainAdvectionAux::precalculateValue(), EBSDReaderAvgDataAux::precalculateValue(), and EulerAngleProvider2RGBAux::precalculateValue().

◆ getFeatureVar()

virtual unsigned int GrainTrackerInterface::getFeatureVar ( unsigned int  feature_id) const
pure virtual

Return the variable index (typically order parameter) for the given feature.

Returns "invalid_id" if the specified feature is inactive.

Implemented in GrainTracker, and FauxGrainTracker.

◆ getGrainCentroid()

virtual Point GrainTrackerInterface::getGrainCentroid ( unsigned int  grain_id) const
pure virtual

◆ getNewGrainIDs()

std::vector< unsigned int > GrainTrackerInterface::getNewGrainIDs ( ) const
virtual

This method returns all of the new ids generated in an invocation of the GrainTracker.

Reimplemented in GrainTracker.

Definition at line 79 of file GrainTrackerInterface.C.

80 {
81  return std::vector<unsigned int>();
82 }

◆ getNumberActiveGrains()

virtual std::size_t GrainTrackerInterface::getNumberActiveGrains ( ) const
pure virtual

Returns the number of active grains current stored in the GrainTracker.

This value is the same value reported when the GrainTracker (FeatureFloodObject) is used as a Postprocessor.

Note: This value will count each piece of a split grain (often encountered in EBSD data sets).

Implemented in GrainTracker, and FauxGrainTracker.

◆ getTotalFeatureCount()

virtual std::size_t GrainTrackerInterface::getTotalFeatureCount ( ) const
pure virtual

Returns a number large enough to contain the largest ID for all grains in use.

This method can be used to size a vector or other data structure to maintain information about all grains (active and inactive) in a simulation.

Implemented in FauxGrainTracker, and GrainTracker.

Referenced by GrainAdvectionVelocity::computeQpProperties(), RandomEulerAngleProvider::initialize(), ComputeGrainForceAndTorque::initialize(), ComputeExternalGrainForceAndTorque::initialize(), EulerAngleUpdaterCheck::initialize(), and EulerAngleUpdater::initialize().

◆ getVarToFeatureVector()

virtual const std::vector<unsigned int>& GrainTrackerInterface::getVarToFeatureVector ( dof_id_type  elem_id) const
pure virtual

Returns a list of active unique feature ids for a particular element.

The vector is indexed by variable number with each entry containing either an invalid size_t type (no feature active at that location) or a feature id if the variable is non-zero at that location.

Implemented in GrainTracker, and FauxGrainTracker.

Referenced by MultiGrainRigidBodyMotion::calculateAdvectionVelocity(), SingleGrainRigidBodyMotion::calculateAdvectionVelocity(), ACSEDGPoly::computeDFDOP(), DeformedGrainMaterial::computeQpProperties(), GrainAdvectionVelocity::computeQpProperties(), ComputeGrainForceAndTorque::execute(), ComputeExternalGrainForceAndTorque::execute(), ComputeGrainForceAndTorque::executeJacobian(), and ComputeExternalGrainForceAndTorque::executeJacobian().

◆ validParams()

InputParameters GrainTrackerInterface::validParams ( )
static

Definition at line 14 of file GrainTrackerInterface.C.

Referenced by GrainTracker::validParams(), and FauxGrainTracker::validParams().

15 {
17  params.addParam<int>("tracking_step", 0, "The timestep for when we should start tracking grains");
18  params.addParam<unsigned short>(
19  "halo_level", 2, "The thickness of the halo surrounding each feature.");
20  params.addParam<bool>(
21  "remap_grains", true, "Indicates whether remapping should be done or not (default: true)");
22  params.addParam<bool>("tolerate_failure",
23  false,
24  "Allow the grain tracker to continue when it fails to find suitable grains "
25  "for remapping. This will allow the simulation to continue but it will "
26  "also allow non-physical grain coalescence. DO NOT USE for production "
27  "results!");
28 
29  params.addParam<unsigned short>(
30  "reserve_op",
31  0,
32  "Indicates the number of reserved ops (variables that cannot be remapped to)");
33  params.addParam<Real>("reserve_op_threshold",
34  0.95,
35  "Threshold for locating a new feature on the reserved op variable(s)");
36  params.addParam<UserObjectName>("polycrystal_ic_uo", "Optional: Polycrystal IC object");
37  params.addParam<bool>("error_on_grain_creation",
38  false,
39  "Terminate with an error if a grain is created "
40  "(does not include initial callback to start simulation)");
41 
42  params.addParam<unsigned short>("max_remap_recursion_depth",
43  6,
44  "The recursion depth allowed when searching for remapping "
45  "candidates. Note: Setting this value high may result in very "
46  "computationally expensive searches with little benefit. "
47  "(Recommended level: 6)");
48 
49  params.addRangeCheckedParam<short>(
50  "verbosity_level",
51  1,
52  "verbosity_level>=0 & verbosity_level<=3",
53  "Level 0: Silent during normal operation, "
54  "Level 1: Informational messages but no detailed grain structure printouts, "
55  "Level 2: Verbose output including data structure dumps, "
56  "Level 3: Debugging mode.");
57 
59  "variable", "var_name_base", "op_num", "Array of coupled variables");
60 
61  params.addParamNamesToGroup("tolerate_failure max_remap_recursion_depth", "Advanced");
62 
63  // Set suitable default parameters for grain tracking
64  params.set<Real>("threshold") = 0.1; // flood out to a fairly low value for grain remapping
65  params.set<Real>("connecting_threshold") =
66  0.09; // connecting threshold should be just slightly lower than threshold
67  params.set<bool>("use_single_map") =
68  false; // This is needed to allow for arbitrary feature overlap during remapping
69  params.set<bool>("condense_map_info") =
70  true; // It's better to have all information in one map for normal visualization
71  params.set<bool>("enable_var_coloring") =
72  true; // Generally we need to see the variable (OP) indices
73 
74  params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
75  return params;
76 }
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
const ExecFlagType EXEC_TIMESTEP_END
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addRequiredCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
const ExecFlagType EXEC_INITIAL

The documentation for this class was generated from the following files: