https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RankTwoCartesianComponent.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#include "RankTwoScalarTools.h"
12
15
16template <bool is_ad>
19{
21 params.addClassDescription("Access a component of a RankTwoTensor");
22 params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
23 "The rank two material property tensor name");
24 params.addRequiredParam<MaterialPropertyName>(
25 "property_name", "Name of the material property computed by this model");
26 params.addRequiredRangeCheckedParam<unsigned int>(
27 "index_i",
28 "index_i >= 0 & index_i <= 2",
29 "The index i of ij for the tensor to output (0, 1, 2)");
30 params.addRequiredRangeCheckedParam<unsigned int>(
31 "index_j",
32 "index_j >= 0 & index_j <= 2",
33 "The index j of ij for the tensor to output (0, 1, 2)");
34 return params;
35}
36
37template <bool is_ad>
39 const InputParameters & parameters)
40 : Material(parameters),
41 _tensor(getGenericMaterialProperty<RankTwoTensor, is_ad>("rank_two_tensor")),
42 _property(declareGenericProperty<Real, is_ad>("property_name")),
43 _i(getParam<unsigned int>("index_i")),
44 _j(getParam<unsigned int>("index_j"))
45{
46}
47
48template <bool is_ad>
49void
54
55template <bool is_ad>
56void
61
registerMooseObject("SolidMechanicsApp", RankTwoCartesianComponent)
void ErrorVector unsigned int
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
ADRankTwoCartesianComponent computes selected components from a Rank-2 tensors.
virtual void computeQpProperties() override
virtual void initQpStatefulProperties() override
RankTwoCartesianComponentTempl(const InputParameters &parameters)
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)