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");
47 _phase(isParamValid(
"phase") ? getParam<unsigned
int>(
"phase") :
libMesh::invalid_uint),
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");
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,...
registerMooseObject("PhaseFieldApp", EulerAngleProvider2RGBAux)
void ErrorVector unsigned int
const Elem *const & _current_elem
const Node *const & _current_node
static InputParameters validParams()
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.
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.
Output euler angles from user object to an AuxVariable.
const unsigned int _xtal_class
Crystal structure of the sample.
virtual unsigned int getNumGrains() const
const unsigned int _phase
Optional phase number needed for global grain index retrieval.
const unsigned int _sd
Reference direction of the sample.
const EulerAngleProvider & _euler
Object providing the Euler angles.
virtual void precalculateValue()
EulerAngleProvider2RGBAux(const InputParameters ¶meters)
const EBSDReader *const _ebsd_reader
EBSDReader Object.
virtual Real computeValue()
const GrainTrackerInterface & _grain_tracker
Grain tracker object.
const unsigned int _output_type
Type of value to be outputted.
static InputParameters validParams()
const Point _no_grain_color
Vector containing values for color in regions without grains.
Real _value
precalculated element value
Abstract base class for user objects that implement the Euler Angle provider interface.
virtual const EulerAngles & getEulerAngles(unsigned int i) const
virtual unsigned int getGrainNum() const
This class defines the interface for the GrainTracking objects.
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)
void mooseError(Args &&... args) const
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const unsigned int invalid_uint