https://mooseframework.inl.gov
MaterialRealTensorValueAux.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 
14 
15 template <bool is_ad>
18 {
20  params.addClassDescription("Object for extracting a component of a rank two tensor material "
21  "property to populate an auxiliary variable.");
22  params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
23  params.addParam<unsigned int>("column", 0, "The column component to consider for this kernel");
24  return params;
25 }
26 
27 template <bool is_ad>
29  const InputParameters & parameters)
30  : MaterialAuxBaseTempl<RealTensorValue, is_ad>(parameters),
31  _row(this->template getParam<unsigned int>("row")),
32  _col(this->template getParam<unsigned int>("column"))
33 {
34  if (_row > LIBMESH_DIM)
35  mooseError(
36  "The row component ", _row, " does not exist for ", LIBMESH_DIM, " dimensional problems");
37  if (_col > LIBMESH_DIM)
38  mooseError("The column component ",
39  _col,
40  " does not exist for ",
41  LIBMESH_DIM,
42  " dimensional problems");
43 }
44 
45 template <bool is_ad>
46 Real
48 {
49  return MetaPhysicL::raw_value(this->_full_value(_row, _col));
50 }
unsigned int _col
The column index to output.
virtual Real getRealValue() override
Returns material property values at quadrature points.
A base class for the various Material related AuxKernal objects.
AuxKernel for outputting a RealTensorValue material property component to an AuxVariable.
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...
MaterialRealTensorValueAuxTempl(const InputParameters &parameters)
Class constructor.
TensorValue< Real > RealTensorValue
unsigned int _row
The row index to output.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
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...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
registerMooseObject("MooseApp", MaterialRealTensorValueAux)
void ErrorVector unsigned int