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 25 of file GrainTextureVectorPostprocessor.h.

Constructor & Destructor Documentation

GrainTextureVectorPostprocessor::GrainTextureVectorPostprocessor ( const InputParameters &  parameters)

Definition at line 25 of file GrainTextureVectorPostprocessor.C.

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

Member Function Documentation

void GrainTextureVectorPostprocessor::execute ( )
virtual

Definition at line 51 of file GrainTextureVectorPostprocessor.C.

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

Definition at line 74 of file GrainTextureVectorPostprocessor.C.

75 {
76  SamplerBase::finalize();
77 }
void GrainTextureVectorPostprocessor::initialize ( )
virtual

Definition at line 45 of file GrainTextureVectorPostprocessor.C.

46 {
47  SamplerBase::initialize();
48 }
void GrainTextureVectorPostprocessor::threadJoin ( const UserObject &  uo)
virtual

Definition at line 66 of file GrainTextureVectorPostprocessor.C.

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

Member Data Documentation

const EulerAngleProvider& GrainTextureVectorPostprocessor::_euler
protected

Definition at line 36 of file GrainTextureVectorPostprocessor.h.

Referenced by execute(), and GrainTextureVectorPostprocessor().

const unsigned int GrainTextureVectorPostprocessor::_grain_num
protected

Definition at line 38 of file GrainTextureVectorPostprocessor.h.

Referenced by GrainTextureVectorPostprocessor().

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

Definition at line 39 of file GrainTextureVectorPostprocessor.h.

Referenced by execute().

const VariableValue& GrainTextureVectorPostprocessor::_unique_grains
protected

Definition at line 37 of file GrainTextureVectorPostprocessor.h.

Referenced by execute().


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