https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15template <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
27template <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)
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
45template <bool is_ad>
46Real
48{
49 return MetaPhysicL::raw_value(this->_full_value(_row, _col));
50}
registerMooseObject("MooseApp", MaterialRealTensorValueAux)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
void ErrorVector unsigned int
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
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.
A base class for the various Material related AuxKernal objects.
static InputParameters validParams()
AuxKernel for outputting a RealTensorValue material property component to an AuxVariable.
MaterialRealTensorValueAuxTempl(const InputParameters &parameters)
Class constructor.
virtual Real getRealValue() override
Returns material property values at quadrature points.
unsigned int _row
The row index to output.
unsigned int _col
The column index to output.
auto raw_value(const Eigen::Map< T > &in)