19 params.
addClassDescription(
"Object for setting up a polycrystal structure from an EBSD Datafile");
20 params.
addParam<
unsigned int>(
"phase",
"The phase to use for all queries.");
21 params.
addParam<UserObjectName>(
"ebsd_reader",
"EBSD Reader for initial condition");
28 _ebsd_reader(getUserObject<
EBSDReader>(
"ebsd_reader")),
29 _node_to_grain_weight_map(_ebsd_reader.getNodeToGrainWeightMap())
35 std::vector<unsigned int> & grains)
const 70 mooseError(
"The following node id is not in the node map: ", n.id());
75 for (MooseIndex(num_grains) index = 0; index < num_grains; ++index)
82 mooseAssert(grain_index < it->second.size(),
"grain_index out of range");
83 auto value = (it->second)[grain_index];
94 std::vector<unsigned int> grain_ids;
97 if (grain_ids.empty())
100 mooseAssert(grain_ids.size() == 1,
"Expected only one grain at point in EBSDReader");
101 auto index = grain_ids[0];
unsigned int _local_id
Index in the per-phase list of global IDs.
const EBSDAvgData & getAvgData(unsigned int i) const
Get the requested type of average data for (global) grain number i.
const unsigned int invalid_uint
std::map< unsigned int, unsigned int > _grain_to_op
A map of the grain_id to op.
const unsigned int _phase
This object provides the base capability for creating proper polycrystal ICs.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const EBSDPointData & getData(const Point &p) const
Get the requested type of data at the point p.
const std::map< dof_id_type, std::vector< Real > > & _node_to_grain_weight_map
virtual Real getVariableValue(unsigned int op_index, const Point &p) const override
Returns the variable value for a given op_index and mesh point.
const EBSDReader & _ebsd_reader
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Per element EBSD data point.
registerMooseObject("PhaseFieldApp", PolycrystalEBSD)
A GeneralUserObject that reads an EBSD file and stores the centroid data in a data structure which in...
virtual unsigned int getGrainNum() const
Return the total number of grains.
static InputParameters validParams()
virtual void getGrainsBasedOnPoint(const Point &point, std::vector< unsigned int > &grains) const override
Method for retrieving active grain IDs based on some point in the mesh.
PolycrystalEBSD(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int getNumGrains() const override
Must be overridden by the deriving class to provide the number of grains in the polycrystal structure...
void mooseError(Args &&... args) const
virtual Real getNodalVariableValue(unsigned int op_index, const Node &n) const override
Similarly to the getVariableValue method, this method also returns values but may be optimized for re...
void ErrorVector unsigned int
static InputParameters validParams()
virtual unsigned int getGlobalID(unsigned int phase, unsigned int local_id) const
Return the (global) grain id for a given phase and (local) grain number.