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

This kernel makes data from the EBSDReader GeneralUserObject available as AuxVariables. More...

#include <EBSDReaderAvgDataAux.h>

Inheritance diagram for EBSDReaderAvgDataAux:
[legend]

Public Member Functions

 EBSDReaderAvgDataAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue ()
 
virtual void precalculateValue ()
 

Protected Attributes

const EBSDReader_ebsd_reader
 
const GrainTrackerInterface_grain_tracker
 
MooseEnum _data_name
 MooseEnum that stores the type of data this AuxKernel extracts. More...
 
MooseSharedPointer< EBSDAvgDataFunctor_val
 Accessor functor to fetch the selected data field form the EBSD data point. More...
 
const Real _invalid
 Value to return for points without active grains. More...
 
Real _value
 precalculated element value More...
 

Static Private Member Functions

static MooseEnum getPointDataFieldType ()
 
static MooseEnum getAvgDataFieldType ()
 

Detailed Description

This kernel makes data from the EBSDReader GeneralUserObject available as AuxVariables.

Definition at line 25 of file EBSDReaderAvgDataAux.h.

Constructor & Destructor Documentation

EBSDReaderAvgDataAux::EBSDReaderAvgDataAux ( const InputParameters &  parameters)

Definition at line 27 of file EBSDReaderAvgDataAux.C.

28  : AuxKernel(parameters),
29  _ebsd_reader(getUserObject<EBSDReader>("ebsd_reader")),
30  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker")),
31  _data_name(getParam<MooseEnum>("data_name")),
33  _invalid(getParam<Real>("invalid"))
34 {
35 }
MooseSharedPointer< EBSDAvgDataFunctor > _val
Accessor functor to fetch the selected data field form the EBSD data point.
MooseEnum _data_name
MooseEnum that stores the type of data this AuxKernel extracts.
const EBSDReader & _ebsd_reader
const GrainTrackerInterface & _grain_tracker
MooseSharedPointer< EBSDAvgDataFunctor > getAvgDataAccessFunctor(const MooseEnum &field_name) const
Factory function to return a average functor specified by name.
Definition: EBSDReader.C:432
const Real _invalid
Value to return for points without active grains.

Member Function Documentation

Real EBSDReaderAvgDataAux::computeValue ( )
protectedvirtual

Definition at line 56 of file EBSDReaderAvgDataAux.C.

57 {
58  return _value;
59 }
Real _value
precalculated element value
MooseEnum EBSDAccessFunctors::getAvgDataFieldType ( )
staticinherited

Definition at line 10 of file EBSDAccessFunctors.C.

Referenced by validParams< EBSDReaderAvgDataAux >().

11 {
12  return MooseEnum("phi1 phi phi2 phase symmetry local_id feature_id", "", true);
13 }
MooseEnum EBSDAccessFunctors::getPointDataFieldType ( )
staticinherited

Definition at line 4 of file EBSDAccessFunctors.C.

Referenced by validParams< EBSDReaderPointDataAux >().

5 {
6  return MooseEnum("phi1 phi phi2 feature_id phase symmetry", "", true);
7 }
void EBSDReaderAvgDataAux::precalculateValue ( )
protectedvirtual

Definition at line 38 of file EBSDReaderAvgDataAux.C.

39 {
40  // get the dominant grain for the current element/node
41  const int grain_id =
42  _grain_tracker.getEntityValue(isNodal() ? _current_node->id() : _current_elem->id(),
44  0);
45 
46  // no grain found
47  if (grain_id < 0)
48  _value = _invalid;
49 
50  // get the data for the grain
51  else
52  _value = (*_val)(_ebsd_reader.getAvgData(grain_id));
53 }
Real _value
precalculated element value
const EBSDReader & _ebsd_reader
const GrainTrackerInterface & _grain_tracker
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) ...
const EBSDAvgData & getAvgData(unsigned int i) const
Get the requested type of average data for (global) grain number i.
Definition: EBSDReader.C:230
const Real _invalid
Value to return for points without active grains.

Member Data Documentation

MooseEnum EBSDReaderAvgDataAux::_data_name
protected

MooseEnum that stores the type of data this AuxKernel extracts.

Definition at line 38 of file EBSDReaderAvgDataAux.h.

const EBSDReader& EBSDReaderAvgDataAux::_ebsd_reader
protected

Definition at line 34 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

const GrainTrackerInterface& EBSDReaderAvgDataAux::_grain_tracker
protected

Definition at line 35 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

const Real EBSDReaderAvgDataAux::_invalid
protected

Value to return for points without active grains.

Definition at line 44 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

MooseSharedPointer<EBSDAvgDataFunctor> EBSDReaderAvgDataAux::_val
protected

Accessor functor to fetch the selected data field form the EBSD data point.

Definition at line 41 of file EBSDReaderAvgDataAux.h.

Real EBSDReaderAvgDataAux::_value
protected

precalculated element value

Definition at line 47 of file EBSDReaderAvgDataAux.h.

Referenced by computeValue(), and precalculateValue().


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