www.mooseframework.org
GrainTrackerInterface.h
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 
10 #pragma once
11 
12 #include "InputParameters.h"
13 #include "FeatureFloodCount.h"
14 
15 // Forward declarations
16 
21 {
22 public:
24 
34  virtual Real getEntityValue(dof_id_type entity_id,
36  std::size_t var_index = 0) const = 0;
37 
43  virtual const std::vector<unsigned int> & getVarToFeatureVector(dof_id_type elem_id) const = 0;
44 
49  virtual unsigned int getFeatureVar(unsigned int feature_id) const = 0;
50 
57  virtual std::size_t getNumberActiveGrains() const = 0;
58 
64  virtual std::size_t getTotalFeatureCount() const = 0;
65 
69  virtual Point getGrainCentroid(unsigned int grain_id) const = 0;
70 
74  virtual bool doesFeatureIntersectBoundary(unsigned int grain_id) const = 0;
75 
79  virtual std::vector<unsigned int> getNewGrainIDs() const;
80 };
This class defines the interface for the GrainTracking objects.
static InputParameters validParams()
virtual std::size_t getNumberActiveGrains() const =0
Returns the number of active grains current stored in the GrainTracker.
virtual std::vector< unsigned int > getNewGrainIDs() const
This method returns all of the new ids generated in an invocation of the GrainTracker.
virtual std::size_t getTotalFeatureCount() const =0
Returns a number large enough to contain the largest ID for all grains in use.
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.
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 Point getGrainCentroid(unsigned int grain_id) const =0
Returns the centroid for the given grain number.
virtual unsigned int getFeatureVar(unsigned int feature_id) const =0
Return the variable index (typically order parameter) for the given feature.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t dof_id_type
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) ...