https://mooseframework.inl.gov
MaterialRankTwoTensorAux.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 
12 #include "metaphysicl/raw_type.h"
13 
18 
19 template <typename T, bool is_ad>
22 {
24  params.addClassDescription(
25  "Access a component of a RankTwoTensor for automatic material property output");
26  params.addRequiredParam<unsigned int>("i", "The index i of ij for the tensor to output");
27  params.addRequiredParam<unsigned int>("j", "The index j of ij for the tensor to output");
28  return params;
29 }
30 
31 template <typename T, bool is_ad>
33  const InputParameters & parameters)
34  : MaterialAuxBaseTempl<T, is_ad>(parameters),
35  _i(this->template getParam<unsigned int>("i")),
36  _j(this->template getParam<unsigned int>("j"))
37 {
38  mooseAssert(_i < T::N, "i component out of range.");
39  mooseAssert(_j < T::N, "j component out of range.");
40 }
41 
42 template <typename T, bool is_ad>
43 Real
45 {
46  return MetaPhysicL::raw_value(this->_full_value(_i, _j));
47 }
48 
static InputParameters validParams()
A base class for the various Material related AuxKernal objects.
auto raw_value(const Eigen::Map< T > &in)
Definition: EigenADReal.h:73
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real getRealValue() override
Returns material property values at quadrature points.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("MooseApp", MaterialRankTwoTensorAux)
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
static InputParameters validParams()
const unsigned int _i
tensor indices
MaterialRankTwoTensorAuxTempl(const InputParameters &parameters)
void ErrorVector unsigned int
MaterialRankTwoTensorAux is designed to take the data in the RankTwoTensor material property...