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 28 of file EBSDReaderAvgDataAux.h.

Constructor & Destructor Documentation

◆ EBSDReaderAvgDataAux()

EBSDReaderAvgDataAux::EBSDReaderAvgDataAux ( const InputParameters &  parameters)

Definition at line 32 of file EBSDReaderAvgDataAux.C.

33  : AuxKernel(parameters),
34  _ebsd_reader(getUserObject<EBSDReader>("ebsd_reader")),
35  _grain_tracker(getUserObject<GrainTrackerInterface>("grain_tracker")),
36  _data_name(getParam<MooseEnum>("data_name")),
38  _invalid(getParam<Real>("invalid"))
39 {
40 }
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:434
const Real _invalid
Value to return for points without active grains.

Member Function Documentation

◆ computeValue()

Real EBSDReaderAvgDataAux::computeValue ( )
protectedvirtual

Definition at line 61 of file EBSDReaderAvgDataAux.C.

62 {
63  return _value;
64 }
Real _value
precalculated element value

◆ getAvgDataFieldType()

MooseEnum EBSDAccessFunctors::getAvgDataFieldType ( )
staticinherited

Definition at line 18 of file EBSDAccessFunctors.C.

Referenced by validParams< EBSDReaderAvgDataAux >().

19 {
20  return MooseEnum("phi1 phi phi2 phase symmetry local_id feature_id", "", true);
21 }

◆ getPointDataFieldType()

MooseEnum EBSDAccessFunctors::getPointDataFieldType ( )
staticinherited

Definition at line 12 of file EBSDAccessFunctors.C.

Referenced by validParams< EBSDReaderPointDataAux >().

13 {
14  return MooseEnum("phi1 phi phi2 feature_id phase symmetry", "", true);
15 }

◆ precalculateValue()

void EBSDReaderAvgDataAux::precalculateValue ( )
protectedvirtual

Definition at line 43 of file EBSDReaderAvgDataAux.C.

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

Member Data Documentation

◆ _data_name

MooseEnum EBSDReaderAvgDataAux::_data_name
protected

MooseEnum that stores the type of data this AuxKernel extracts.

Definition at line 41 of file EBSDReaderAvgDataAux.h.

◆ _ebsd_reader

const EBSDReader& EBSDReaderAvgDataAux::_ebsd_reader
protected

Definition at line 37 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

◆ _grain_tracker

const GrainTrackerInterface& EBSDReaderAvgDataAux::_grain_tracker
protected

Definition at line 38 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

◆ _invalid

const Real EBSDReaderAvgDataAux::_invalid
protected

Value to return for points without active grains.

Definition at line 47 of file EBSDReaderAvgDataAux.h.

Referenced by precalculateValue().

◆ _val

MooseSharedPointer<EBSDAvgDataFunctor> EBSDReaderAvgDataAux::_val
protected

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

Definition at line 44 of file EBSDReaderAvgDataAux.h.

◆ _value

Real EBSDReaderAvgDataAux::_value
protected

precalculated element value

Definition at line 50 of file EBSDReaderAvgDataAux.h.

Referenced by computeValue(), and precalculateValue().


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