https://mooseframework.inl.gov
EulerAngleProvider.h
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 
10 #pragma once
11 
12 #include "EulerAngles.h"
13 #include "GeneralUserObject.h"
14 
20 {
21 public:
23 
26  _angles(declareRestartableData<std::vector<EulerAngles>>("euler_angles"))
27  {
28  }
29 
30  virtual const EulerAngles & getEulerAngles(unsigned int i) const
31  {
32  mooseAssert(i < getGrainNum(), "Requesting Euler angles for an invalid grain id");
33  return _angles[i];
34  };
35 
36  virtual unsigned int getGrainNum() const { return _angles.size(); };
37 
38 protected:
39  std::vector<EulerAngles> & _angles;
40 };
const InputParameters & parameters() const
T & declareRestartableData(const std::string &data_name, Args &&... args)
std::vector< EulerAngles > & _angles
static InputParameters validParams()
EulerAngleProvider(const InputParameters &parameters)
virtual unsigned int getGrainNum() const
Euler angle triplet.
Definition: EulerAngles.h:24
virtual const EulerAngles & getEulerAngles(unsigned int i) const
Abstract base class for user objects that implement the Euler Angle provider interface.