https://mooseframework.inl.gov
Loading...
Searching...
No Matches
EBSDReaderPointDataAux.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
16{
18 params.addClassDescription("Outputs the requested EBSD reader point data.");
19 params.addRequiredParam<UserObjectName>("ebsd_reader", "The EBSDReader GeneralUserObject");
22 "data_name", field_types, "The data to be extracted from the EBSD data by this AuxKernel");
23 return params;
24}
25
27 : AuxKernel(parameters),
28 _ebsd_reader(getUserObject<EBSDReader>("ebsd_reader")),
29 _data_name(getParam<MooseEnum>("data_name")),
30 _val(_ebsd_reader.getPointDataAccessFunctor(_data_name))
31{
32 if (isNodal())
33 mooseError("This AuxKernel only supports Elemental fields");
34}
35
36void
38{
39 // EBSD data is defined at element centroids, so this only makes
40 // sense as an Element AuxKernel
41 Point p = _current_elem->vertex_average();
42
43 _value = (*_val)(_ebsd_reader.getData(p));
44}
45
46Real
registerMooseObject("PhaseFieldApp", EBSDReaderPointDataAux)
const Real p
const Elem *const & _current_elem
static InputParameters validParams()
static MooseEnum getPointDataFieldType()
This kernel makes data from the EBSDReader GeneralUserObject available as AuxVariables.
const EBSDReader & _ebsd_reader
static InputParameters validParams()
EBSDReaderPointDataAux(const InputParameters &parameters)
Real _value
precalculated element value
A GeneralUserObject that reads an EBSD file and stores the centroid data in a data structure which in...
Definition EBSDReader.h:32
const EBSDPointData & getData(const Point &p) const
Get the requested type of data at the point p.
Definition EBSDReader.C:350
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const