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 22 of file EulerAngleVariables2RGBAux.h.

Constructor & Destructor Documentation

EulerAngleVariables2RGBAux::EulerAngleVariables2RGBAux ( const InputParameters &  parameters)

Definition at line 27 of file EulerAngleVariables2RGBAux.C.

28  : AuxKernel(parameters),
29  _sd(getParam<MooseEnum>("sd")),
30  _output_type(getParam<MooseEnum>("output_type")),
31  _phi1(coupledValue("phi1")),
32  _phi(coupledValue("phi")),
33  _phi2(coupledValue("phi2")),
34  _phase(coupledValue("phase")),
35  _sym(coupledValue("symmetry"))
36 {
37 }
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

Real EulerAngleVariables2RGBAux::computeValue ( )
protectedvirtual

Definition at line 40 of file EulerAngleVariables2RGBAux.C.

41 {
42  // Call Euler2RGB Function to get RGB vector
43  Point RGB = euler2RGB(_sd,
44  _phi1[0] / 180.0 * libMesh::pi,
45  _phi[0] / 180.0 * libMesh::pi,
46  _phi2[0] / 180.0 * libMesh::pi,
47  _phase[0],
48  _sym[0]);
49 
50  // Create correct scalar output
51  if (_output_type < 3)
52  return RGB(_output_type);
53  else if (_output_type == 3)
54  {
55  Real RGBint = 0.0;
56  for (unsigned int i = 0; i < 3; ++i)
57  RGBint = 256 * RGBint + (RGB(i) >= 1 ? 255 : std::floor(RGB(i) * 256.0));
58 
59  return RGBint;
60  }
61  else
62  mooseError("Incorrect value for output_type in EulerAngleVariables2RGBAux");
63 }
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:43
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

const unsigned int EulerAngleVariables2RGBAux::_output_type
private

Type of value to be outputted.

Definition at line 35 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const VariableValue& EulerAngleVariables2RGBAux::_phase
private

EBSD Phase index.

Definition at line 44 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const VariableValue& EulerAngleVariables2RGBAux::_phi
private

Definition at line 39 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const VariableValue& EulerAngleVariables2RGBAux::_phi1
private

Euler angles to visualize.

Definition at line 38 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const VariableValue& EulerAngleVariables2RGBAux::_phi2
private

Definition at line 40 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const unsigned int EulerAngleVariables2RGBAux::_sd
private

Reference direction of the sample.

Definition at line 32 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().

const VariableValue& EulerAngleVariables2RGBAux::_sym
private

EBSD Crystal symmetry identifier.

Definition at line 47 of file EulerAngleVariables2RGBAux.h.

Referenced by computeValue().


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