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

GrainTextureVectorPostprocessor is a VectorPostprocessor that outputs the the coordinates, grain number, and Euler Angles associated with each element. More...

#include <GrainTextureVectorPostprocessor.h>

Inheritance diagram for GrainTextureVectorPostprocessor:
[legend]

Public Member Functions

 GrainTextureVectorPostprocessor (const InputParameters &parameters)
 
virtual void initialize ()
 
virtual void execute ()
 
virtual void threadJoin (const UserObject &uo)
 
virtual void finalize ()
 

Protected Attributes

const EulerAngleProvider_euler
 
const VariableValue & _unique_grains
 
const unsigned int _grain_num
 
std::vector< Real > _sample
 

Detailed Description

GrainTextureVectorPostprocessor is a VectorPostprocessor that outputs the the coordinates, grain number, and Euler Angles associated with each element.

Currently only works with a uniform, structured grid (no mesh adaptivity).

Definition at line 28 of file GrainTextureVectorPostprocessor.h.

Constructor & Destructor Documentation

◆ GrainTextureVectorPostprocessor()

GrainTextureVectorPostprocessor::GrainTextureVectorPostprocessor ( const InputParameters &  parameters)

Definition at line 30 of file GrainTextureVectorPostprocessor.C.

31  : ElementVectorPostprocessor(parameters),
32  SamplerBase(parameters, this, _communicator),
33  _euler(getUserObject<EulerAngleProvider>("euler_angle_provider")),
34  _unique_grains(coupledValue("unique_grains")),
35  _grain_num(getParam<unsigned int>("grain_num")),
36  _sample(4)
37 {
39  mooseError("Euler angle provider has too few angles.");
40 
41  std::vector<std::string> output_variables(4);
42  output_variables[0] = "unique_grain";
43  output_variables[1] = "euler_angle_z";
44  output_variables[2] = "euler_angle_x\'";
45  output_variables[3] = "euler_angle_z\"";
46  SamplerBase::setupVariables(output_variables);
47 }
virtual unsigned int getGrainNum() const =0

Member Function Documentation

◆ execute()

void GrainTextureVectorPostprocessor::execute ( )
virtual

Definition at line 56 of file GrainTextureVectorPostprocessor.C.

57 {
58  _sample[0] =
59  _unique_grains[0] + 1; // Index starts at 0, but we want to display first grain as grain 1.
60 
61  const EulerAngles & angle = _euler.getEulerAngles(_unique_grains[0]);
62  _sample[1] = angle.phi1; // Get the Z rotation
63  _sample[2] = angle.Phi; // Get the X' rotation
64  _sample[3] = angle.phi2; // Get the Z'' rotation
65  SamplerBase::addSample(_current_elem->centroid() /* x,y,z coordinates of elem centroid */,
66  _current_elem->id(),
67  _sample);
68 }
virtual const EulerAngles & getEulerAngles(unsigned int) const =0
Euler angle triplet.
Definition: EulerAngles.h:22

◆ finalize()

void GrainTextureVectorPostprocessor::finalize ( )
virtual

Definition at line 79 of file GrainTextureVectorPostprocessor.C.

80 {
81  SamplerBase::finalize();
82 }

◆ initialize()

void GrainTextureVectorPostprocessor::initialize ( )
virtual

Definition at line 50 of file GrainTextureVectorPostprocessor.C.

51 {
52  SamplerBase::initialize();
53 }

◆ threadJoin()

void GrainTextureVectorPostprocessor::threadJoin ( const UserObject &  uo)
virtual

Definition at line 71 of file GrainTextureVectorPostprocessor.C.

72 {
74  static_cast<const GrainTextureVectorPostprocessor &>(y);
75  SamplerBase::threadJoin(vpp);
76 }
GrainTextureVectorPostprocessor is a VectorPostprocessor that outputs the the coordinates, grain number, and Euler Angles associated with each element.

Member Data Documentation

◆ _euler

const EulerAngleProvider& GrainTextureVectorPostprocessor::_euler
protected

Definition at line 39 of file GrainTextureVectorPostprocessor.h.

Referenced by execute(), and GrainTextureVectorPostprocessor().

◆ _grain_num

const unsigned int GrainTextureVectorPostprocessor::_grain_num
protected

Definition at line 41 of file GrainTextureVectorPostprocessor.h.

Referenced by GrainTextureVectorPostprocessor().

◆ _sample

std::vector<Real> GrainTextureVectorPostprocessor::_sample
protected

Definition at line 42 of file GrainTextureVectorPostprocessor.h.

Referenced by execute().

◆ _unique_grains

const VariableValue& GrainTextureVectorPostprocessor::_unique_grains
protected

Definition at line 40 of file GrainTextureVectorPostprocessor.h.

Referenced by execute().


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