www.mooseframework.org
GrainTrackerInterface.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef GRAINTRACKERINTERFACE_H
9 #define GRAINTRACKERINTERFACE_H
10 
11 #include "InputParameters.h"
12 #include "FeatureFloodCount.h"
13 
14 // Forward declarations
16 
17 template <>
18 InputParameters validParams<GrainTrackerInterface>();
19 
24 {
25 public:
35  virtual Real getEntityValue(dof_id_type entity_id,
37  std::size_t var_index = 0) const = 0;
38 
46  virtual const std::vector<unsigned int> & getVarToFeatureVector(dof_id_type elem_id) const = 0;
47 
53  virtual unsigned int getFeatureVar(unsigned int feature_id) const = 0;
54 
61  virtual std::size_t getNumberActiveGrains() const = 0;
62 
68  virtual std::size_t getTotalFeatureCount() const = 0;
69 
73  virtual Point getGrainCentroid(unsigned int grain_id) const = 0;
74 
78  virtual bool doesFeatureIntersectBoundary(unsigned int grain_id) const = 0;
79 
83  virtual std::vector<unsigned int> getNewGrainIDs() const;
84 };
85 
86 #endif
virtual Point getGrainCentroid(unsigned int grain_id) const =0
Returns the centroid for the given grain number.
This class defines the interface for the GrainTracking objects.
virtual std::size_t getTotalFeatureCount() const =0
Returns a number large enough to contain the largest ID for all grains in use.
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...
virtual std::size_t getNumberActiveGrains() const =0
Returns the number of active grains current stored in the GrainTracker.
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) ...
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.
InputParameters validParams< GrainTrackerInterface >()
virtual std::vector< unsigned int > getNewGrainIDs() const
This method returns all of the new ids generated in an invocation of the GrainTracker.
virtual unsigned int getFeatureVar(unsigned int feature_id) const =0
Return the variable index (typically order parameter) for the given feature.