www.mooseframework.org
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
EulerAngleVariables2RGBAux Class Reference

Create an encoded RGB triplet from Euler angle data. More...

#include <EulerAngleVariables2RGBAux.h>

Inheritance diagram for EulerAngleVariables2RGBAux:
[legend]

Public Member Functions

 EulerAngleVariables2RGBAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue ()
 

Private Attributes

const unsigned int _sd
 Reference direction of the sample. More...
 
const unsigned int _output_type
 Type of value to be outputted. More...
 
const VariableValue & _phase
 EBSD Phase index. More...
 
const VariableValue & _sym
 EBSD Crystal symmetry identifier. More...
 
const VariableValue & _phi1
 Euler angles to visualize. More...
 
const VariableValue & _phi
 
const VariableValue & _phi2
 

Detailed Description

Create an encoded RGB triplet from Euler angle data.

The color value is encoded as (R*256+G)*256+B with R,G, and B ranging from 0..255.

Definition at line 25 of file EulerAngleVariables2RGBAux.h.

Constructor & Destructor Documentation

◆ EulerAngleVariables2RGBAux()

EulerAngleVariables2RGBAux::EulerAngleVariables2RGBAux ( const InputParameters &  parameters)

Definition at line 32 of file EulerAngleVariables2RGBAux.C.

33  : AuxKernel(parameters),
34  _sd(getParam<MooseEnum>("sd")),
35  _output_type(getParam<MooseEnum>("output_type")),
36  _phi1(coupledValue("phi1")),
37  _phi(coupledValue("phi")),
38  _phi2(coupledValue("phi2")),
39  _phase(coupledValue("phase")),
40  _sym(coupledValue("symmetry"))
41 {
42 }
const unsigned int _sd
Reference direction of the sample.
const unsigned int _output_type
Type of value to be outputted.
const VariableValue & _phase
EBSD Phase index.
const VariableValue & _sym
EBSD Crystal symmetry identifier.
const VariableValue & _phi1
Euler angles to visualize.

Member Function Documentation

◆ computeValue()

Real EulerAngleVariables2RGBAux::computeValue ( )
protectedvirtual

Definition at line 45 of file EulerAngleVariables2RGBAux.C.

46 {
47  // Call Euler2RGB Function to get RGB vector
48  Point RGB = euler2RGB(_sd,
49  _phi1[0] / 180.0 * libMesh::pi,
50  _phi[0] / 180.0 * libMesh::pi,
51  _phi2[0] / 180.0 * libMesh::pi,
52  _phase[0],
53  _sym[0]);
54 
55  // Create correct scalar output
56  if (_output_type < 3)
57  return RGB(_output_type);
58  else if (_output_type == 3)
59  {
60  Real RGBint = 0.0;
61  for (unsigned int i = 0; i < 3; ++i)
62  RGBint = 256 * RGBint + (RGB(i) >= 1 ? 255 : std::floor(RGB(i) * 256.0));
63 
64  return RGBint;
65  }
66  else
67  mooseError("Incorrect value for output_type in EulerAngleVariables2RGBAux");
68 }
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...
Definition: Euler2RGB.C:46
const unsigned int _sd
Reference direction of the sample.
const unsigned int _output_type
Type of value to be outputted.
const VariableValue & _phase
EBSD Phase index.
const VariableValue & _sym
EBSD Crystal symmetry identifier.
const VariableValue & _phi1
Euler angles to visualize.

Member Data Documentation

◆ _output_type

const unsigned int EulerAngleVariables2RGBAux::_output_type
private

Type of value to be outputted.

Definition at line 38 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _phase

const VariableValue& EulerAngleVariables2RGBAux::_phase
private

EBSD Phase index.

Definition at line 47 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _phi

const VariableValue& EulerAngleVariables2RGBAux::_phi
private

Definition at line 42 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _phi1

const VariableValue& EulerAngleVariables2RGBAux::_phi1
private

Euler angles to visualize.

Definition at line 41 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _phi2

const VariableValue& EulerAngleVariables2RGBAux::_phi2
private

Definition at line 43 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _sd

const unsigned int EulerAngleVariables2RGBAux::_sd
private

Reference direction of the sample.

Definition at line 35 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

◆ _sym

const VariableValue& EulerAngleVariables2RGBAux::_sym
private

EBSD Crystal symmetry identifier.

Definition at line 50 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().


The documentation for this class was generated from the following files: