www.mooseframework.org
ComputeRotatedElasticityTensorBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "RotationTensor.h"
12 
13 template <bool is_ad>
16 {
18  params.addParam<Real>("euler_angle_1", 0.0, "Euler angle in direction 1");
19  params.addParam<Real>("euler_angle_2", 0.0, "Euler angle in direction 2");
20  params.addParam<Real>("euler_angle_3", 0.0, "Euler angle in direction 3");
21  params.addParam<RealTensorValue>("rotation_matrix",
22  "Rotation matrix to apply to elasticity tensor.");
23  return params;
24 }
25 
26 template <bool is_ad>
28  const InputParameters & parameters)
29  : ComputeElasticityTensorBaseTempl<is_ad>(parameters),
30  _Euler_angles(this->template getParam<Real>("euler_angle_1"),
31  this->template getParam<Real>("euler_angle_2"),
32  this->template getParam<Real>("euler_angle_3")),
33  _rotation_matrix(this->isParamValid("rotation_matrix")
34  ? this->template getParam<RealTensorValue>("rotation_matrix")
35  : RealTensorValue(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0))
36 {
37 }
38 
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ComputeElasticityTensorBase the base class for computing elasticity tensors.
ComputeRotatedElasticityTensorBaseTempl(const InputParameters &parameters)
ComputeRotatedElasticityTensorBase is an intermediate base class that rotates an elasticity tensor ba...
TensorValue< Real > RealTensorValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real