A GeneralUserObject that reads an EBSD file and stores the centroid data in a data structure which indexes on element centroids. More...
#include <EBSDReader.h>
Public Member Functions | |
EBSDReader (const InputParameters ¶ms) | |
virtual | ~EBSDReader () |
virtual void | readFile () |
virtual void | initialize () |
virtual void | execute () |
virtual void | finalize () |
const EBSDPointData & | getData (const Point &p) const |
Get the requested type of data at the point p. More... | |
const EBSDAvgData & | getAvgData (unsigned int i) const |
Get the requested type of average data for (global) grain number i. More... | |
const EBSDAvgData & | getAvgData (unsigned int phase, unsigned int local_id) const |
Get the requested type of average data for a given phase and (local) grain. More... | |
virtual const EulerAngles & | getEulerAngles (unsigned int) const |
EulerAngleProvider interface implementation to fetch a triplet of Euler angles. More... | |
virtual unsigned int | getGrainNum () const |
Return the total number of grains. More... | |
virtual unsigned int | getPhaseNum () const |
Return the total number of phases. More... | |
virtual unsigned int | getGrainNum (unsigned int phase) const |
Return the number of grains in a given phase. More... | |
unsigned int | getFeatureID (unsigned int phase, unsigned int local_id) const |
Return the EBSD feature id for a given phase and phase (local) grain number. More... | |
unsigned int | getFeatureID (unsigned int global_id) const |
Return the EBSD feature id for a given (global) grain number. More... | |
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. More... | |
virtual unsigned int | getGlobalID (unsigned int feature_id) const |
Return the (global) grain id for a given feature_id. More... | |
MooseSharedPointer< EBSDPointDataFunctor > | getPointDataAccessFunctor (const MooseEnum &field_name) const |
Factory function to return a point functor specified by name. More... | |
MooseSharedPointer< EBSDAvgDataFunctor > | getAvgDataAccessFunctor (const MooseEnum &field_name) const |
Factory function to return a average functor specified by name. More... | |
const std::map< dof_id_type, std::vector< Real > > & | getNodeToGrainWeightMap () const |
Returns a map consisting of the node index followd by a vector of all grain weights for that node. More... | |
const std::map< dof_id_type, std::vector< Real > > & | getNodeToPhaseWeightMap () const |
Returns a map consisting of the node index followd by a vector of all phase weights for that node. More... | |
void | meshChanged () |
Maps need to be updated when the mesh changes. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
static MooseEnum | getPointDataFieldType () |
static MooseEnum | getAvgDataFieldType () |
Protected Member Functions | |
unsigned | indexFromPoint (const Point &p) const |
Computes a global index in the _data array given an input centroid point. More... | |
unsigned | indexFromIndex (unsigned int var) const |
Transfer the index into the _avg_data array from given index. More... | |
void | buildNodeWeightMaps () |
Build grain and phase weight maps. More... | |
Protected Attributes | |
unsigned int | _custom_columns |
number of additional custom data columns More... | |
std::vector< EBSDPointData > | _data |
Logically three-dimensional data indexed by geometric points in a 1D vector. More... | |
std::vector< EBSDAvgData > | _avg_data |
Averages by (global) grain ID. More... | |
std::vector< EulerAngles > | _avg_angles |
Euler Angles by (global) grain ID. More... | |
std::map< unsigned int, unsigned int > | _global_id_map |
map from feature_id to global_id More... | |
std::vector< std::vector< unsigned int > > | _global_id |
global ID for given phases and grains More... | |
std::map< dof_id_type, std::vector< Real > > | _node_to_grain_weight_map |
Map of grain weights per node. More... | |
std::map< dof_id_type, std::vector< Real > > | _node_to_phase_weight_map |
Map of phase weights per node. More... | |
const int & | _time_step |
current timestep. Maps are only rebuild on mesh change during time step zero More... | |
unsigned int | _mesh_dimension |
Dimension of the problem domain. More... | |
unsigned int | _bins |
number of bins for each quaternion component More... | |
unsigned int | _L_norm |
L_norm value for averaging. More... | |
unsigned | _nx |
The number of values in the x, y and z directions. More... | |
unsigned | _ny |
unsigned | _nz |
Real | _dx |
The spacing of the values in x, y and z directions. More... | |
Real | _dy |
Real | _dz |
Real | _minx |
Grid origin. More... | |
Real | _miny |
Real | _minz |
Real | _maxx |
Maximum grid extent. More... | |
Real | _maxy |
Real | _maxz |
MooseMesh & | _mesh |
MooseMesh Variables. More... | |
NonlinearSystemBase & | _nl |
unsigned int | _grain_num |
Variables needed to determine reduced order parameter values. More... | |
Point | _bottom_left |
Point | _top_right |
Point | _range |
A GeneralUserObject that reads an EBSD file and stores the centroid data in a data structure which indexes on element centroids.
Grains are indexed through multiple schemes:
Phases are referred to using the numbers in the EBSD data file. In case the phase number in the data file starts at 1 the phase 0 will simply contain no grains.
Definition at line 36 of file EBSDReader.h.
EBSDReader::EBSDReader | ( | const InputParameters & | params | ) |
Definition at line 35 of file EBSDReader.C.
|
virtual |
Definition at line 342 of file EBSDReader.C.
|
protected |
Build grain and phase weight maps.
Definition at line 461 of file EBSDReader.C.
Referenced by meshChanged(), and readFile().
|
inlinevirtual |
Definition at line 45 of file EBSDReader.h.
|
inlinevirtual |
Definition at line 46 of file EBSDReader.h.
const EBSDReader::EBSDAvgData & EBSDReader::getAvgData | ( | unsigned int | i | ) | const |
Get the requested type of average data for (global) grain number i.
Definition at line 351 of file EBSDReader.C.
Referenced by PolycrystalEBSD::getGrainsBasedOnPoint(), and EBSDReaderAvgDataAux::precalculateValue().
const EBSDReader::EBSDAvgData & EBSDReader::getAvgData | ( | unsigned int | phase, |
unsigned int | local_id | ||
) | const |
Get the requested type of average data for a given phase and (local) grain.
Definition at line 363 of file EBSDReader.C.
MooseSharedPointer< EBSDAccessFunctors::EBSDAvgDataFunctor > EBSDReader::getAvgDataAccessFunctor | ( | const MooseEnum & | field_name | ) | const |
Factory function to return a average functor specified by name.
Definition at line 556 of file EBSDReader.C.
|
staticinherited |
Definition at line 19 of file EBSDAccessFunctors.C.
Referenced by validParams< EBSDReaderAvgDataAux >().
const EBSDReader::EBSDPointData & EBSDReader::getData | ( | const Point & | p | ) | const |
Get the requested type of data at the point p.
Definition at line 345 of file EBSDReader.C.
Referenced by buildNodeWeightMaps(), PolycrystalEBSD::getGrainsBasedOnPoint(), and EBSDReaderPointDataAux::precalculateValue().
|
virtual |
EulerAngleProvider interface implementation to fetch a triplet of Euler angles.
Implements EulerAngleProvider.
Definition at line 357 of file EBSDReader.C.
|
inline |
Return the EBSD feature id for a given (global) grain number.
Definition at line 89 of file EBSDReader.h.
|
inline |
Return the EBSD feature id for a given phase and phase (local) grain number.
Definition at line 84 of file EBSDReader.h.
|
virtual |
|
inlinevirtual |
Return the (global) grain id for a given phase and (local) grain number.
Definition at line 95 of file EBSDReader.h.
Referenced by buildNodeWeightMaps(), PolycrystalEBSD::getGrainsBasedOnPoint(), PolycrystalEBSD::getNodalVariableValue(), and EulerAngleProvider2RGBAux::precalculateValue().
|
virtual |
Return the total number of grains.
Implements EulerAngleProvider.
Definition at line 369 of file EBSDReader.C.
Referenced by buildNodeWeightMaps(), PolycrystalEBSD::getNumGrains(), and EulerAngleProvider2RGBAux::getNumGrains().
|
virtual |
Return the number of grains in a given phase.
Definition at line 375 of file EBSDReader.C.
const std::map< dof_id_type, std::vector< Real > > & EBSDReader::getNodeToGrainWeightMap | ( | ) | const |
Returns a map consisting of the node index followd by a vector of all grain weights for that node.
Needed by ReconVarIC
Definition at line 432 of file EBSDReader.C.
const std::map< dof_id_type, std::vector< Real > > & EBSDReader::getNodeToPhaseWeightMap | ( | ) | const |
Returns a map consisting of the node index followd by a vector of all phase weights for that node.
Needed by ReconPhaseVarIC
Definition at line 438 of file EBSDReader.C.
|
inlinevirtual |
Return the total number of phases.
Definition at line 76 of file EBSDReader.h.
Referenced by buildNodeWeightMaps().
MooseSharedPointer< EBSDAccessFunctors::EBSDPointDataFunctor > EBSDReader::getPointDataAccessFunctor | ( | const MooseEnum & | field_name | ) | const |
Factory function to return a point functor specified by name.
Definition at line 510 of file EBSDReader.C.
|
staticinherited |
Definition at line 13 of file EBSDAccessFunctors.C.
Referenced by validParams< EBSDReaderPointDataAux >().
|
protected |
Transfer the index into the _avg_data array from given index.
Definition at line 415 of file EBSDReader.C.
Referenced by getAvgData(), and getEulerAngles().
|
protected |
Computes a global index in the _data array given an input centroid point.
Definition at line 381 of file EBSDReader.C.
Referenced by getData(), and readFile().
|
inlinevirtual |
Definition at line 44 of file EBSDReader.h.
void EBSDReader::meshChanged | ( | ) |
|
virtual |
Markley, F. Landis, Yang Cheng, John Lucas Crassidis, and Yaakov Oshman. "Averaging quaternions." Journal of Guidance, Control, and Dynamics 30, no. 4 (2007): 1193-1197. A 4 by N matrix (Q) is constructed, where N is the number of quaternions. A weight matrix (W) is created. The eigen vector corresponding to the maximum eigen value of Q*W*Q' is the weighted average quaternion
If no bin exists which has atleast 50% of total quaternions in a grain then the EBSD data may not be reliable Note: The limit 50% is arbitrary
Definition at line 59 of file EBSDReader.C.
Referenced by EBSDReader().
|
staticinherited |
Definition at line 15 of file EulerAngleProvider.C.
Referenced by EulerAngleFileReader::validParams().
|
protected |
Euler Angles by (global) grain ID.
Definition at line 147 of file EBSDReader.h.
Referenced by getEulerAngles(), and readFile().
|
protected |
Averages by (global) grain ID.
Definition at line 144 of file EBSDReader.h.
Referenced by getAvgData(), getFeatureID(), indexFromIndex(), and readFile().
|
protected |
number of bins for each quaternion component
Definition at line 168 of file EBSDReader.h.
Referenced by EBSDReader(), and readFile().
|
protected |
Definition at line 132 of file EBSDReader.h.
|
protected |
number of additional custom data columns
Definition at line 138 of file EBSDReader.h.
Referenced by getAvgDataAccessFunctor(), getPointDataAccessFunctor(), and readFile().
|
protected |
Logically three-dimensional data indexed by geometric points in a 1D vector.
Definition at line 141 of file EBSDReader.h.
Referenced by getData(), indexFromPoint(), and readFile().
|
protected |
The spacing of the values in x, y and z directions.
Definition at line 177 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 177 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 177 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
global ID for given phases and grains
Definition at line 153 of file EBSDReader.h.
Referenced by getAvgData(), getFeatureID(), getGlobalID(), getGrainNum(), getPhaseNum(), and readFile().
|
protected |
map from feature_id to global_id
Definition at line 150 of file EBSDReader.h.
Referenced by getGlobalID(), and readFile().
|
protected |
Variables needed to determine reduced order parameter values.
Definition at line 131 of file EBSDReader.h.
Referenced by getGrainNum(), and readFile().
|
protected |
|
protected |
Maximum grid extent.
Definition at line 183 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 183 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 183 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
MooseMesh Variables.
Definition at line 126 of file EBSDReader.h.
Referenced by buildNodeWeightMaps(), and readFile().
|
protected |
Dimension of the problem domain.
Definition at line 165 of file EBSDReader.h.
Referenced by indexFromPoint().
|
protected |
Grid origin.
Definition at line 180 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 180 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 180 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 127 of file EBSDReader.h.
|
protected |
Map of grain weights per node.
Definition at line 156 of file EBSDReader.h.
Referenced by buildNodeWeightMaps(), and getNodeToGrainWeightMap().
|
protected |
Map of phase weights per node.
Definition at line 159 of file EBSDReader.h.
Referenced by buildNodeWeightMaps(), and getNodeToPhaseWeightMap().
|
protected |
The number of values in the x, y and z directions.
Definition at line 174 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 174 of file EBSDReader.h.
Referenced by indexFromPoint(), and readFile().
|
protected |
Definition at line 174 of file EBSDReader.h.
Referenced by readFile().
|
protected |
Definition at line 134 of file EBSDReader.h.
|
protected |
current timestep. Maps are only rebuild on mesh change during time step zero
Definition at line 162 of file EBSDReader.h.
Referenced by meshChanged().
|
protected |
Definition at line 133 of file EBSDReader.h.