22 params.
addClassDescription(
"Output RGB representation of crystal orientation from user object to " 23 "an AuxVariable. The entire domain must have the same crystal " 25 params.
addParam<
unsigned int>(
"phase",
"The phase to use for all queries.");
29 "cubic=43 hexagonal=62 tetragonal=42 trigonal=32 orthorhombic=22 monoclinic=2 triclinic=1");
31 "crystal_structure", structure_enum,
"Crystal structure of the material");
33 params.
addParam<
MooseEnum>(
"output_type", output_types,
"Type of value that will be outputted");
35 "Name of Euler angle provider user object");
37 "The GrainTracker UserObject to get values from.");
41 "RGB value of color used to represent area with no grains, defaults to black");
49 _xtal_class(getParam<
MooseEnum>(
"crystal_structure")),
50 _output_type(getParam<
MooseEnum>(
"output_type")),
52 _ebsd_reader(isParamValid(
"phase") ? dynamic_cast<const
EBSDReader *>(&_euler) : nullptr),
54 _no_grain_color(getParam<Point>(
"no_grain_color"))
91 if (global_id > num_grns)
92 mooseError(
" global_id ", global_id,
" out of index range");
112 for (
unsigned int i = 0; i < 3; ++i)
113 RGBint = 256 * RGBint + (RGB(i) >= 1 ? 255 : std::floor(RGB(i) * 256.0));
117 mooseError(
"Incorrect value for output_type in EulerAngleProvider2RGBAux");
virtual unsigned int getGrainNum() const =0
const unsigned int _sd
Reference direction of the sample.
const EBSDReader *const _ebsd_reader
EBSDReader Object.
Point euler2RGB(unsigned int sd, Real phi1, Real PHI, Real phi2, unsigned int phase, unsigned int sym)
This function rotates a set of three Bunge Euler angles into the standard Stereographic triangle...
This class defines the interface for the GrainTracking objects.
const unsigned int invalid_uint
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
const Node *const & _current_node
virtual unsigned int getNumGrains() const
registerMooseObject("PhaseFieldApp", EulerAngleProvider2RGBAux)
const unsigned int _xtal_class
Crystal structure of the sample.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const unsigned int _output_type
Type of value to be outputted.
virtual Real computeValue()
const Point _no_grain_color
Vector containing values for color in regions without grains.
EulerAngleProvider2RGBAux(const InputParameters ¶meters)
A GeneralUserObject that reads an EBSD file and stores the centroid data in a data structure which in...
const EulerAngleProvider & _euler
Object providing the Euler angles.
virtual unsigned int getGrainNum() const
Return the total number of grains.
static InputParameters validParams()
const unsigned int _phase
Optional phase number needed for global grain index retrieval.
Real _value
precalculated element value
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const EulerAngles & getEulerAngles(unsigned int) const =0
virtual void precalculateValue()
void mooseError(Args &&... args) const
const Elem *const & _current_elem
static InputParameters validParams()
Abstract base class for user objects that implement the Euler Angle provider interface.
void ErrorVector unsigned int
Output euler angles from user object to an AuxVariable.
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.
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) ...