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
13#include "metaphysicl/raw_type.h"
14
17
18template <bool is_ad>
21{
23 params.addClassDescription("Access a component of a RankTwoTensor");
24 params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
25 "The rank two material property tensor name");
26 params.addRequiredParam<MaterialPropertyName>(
27 "property_name", "Name of the material property computed by this model");
28 params.addRequiredRangeCheckedParam<unsigned int>(
29 "index_i",
30 "index_i >= 0 & index_i <= 2",
31 "The index i of ij for the tensor to output (0, 1, 2)");
32 params.addRequiredRangeCheckedParam<unsigned int>(
33 "index_j",
34 "index_j >= 0 & index_j <= 2",
35 "The index j of ij for the tensor to output (0, 1, 2)");
36 return params;
37}
38
39template <bool is_ad>
41 const InputParameters & parameters)
42 : Material(parameters),
43 _tensor(getGenericMaterialProperty<RankTwoTensor, is_ad>("rank_two_tensor")),
44 _property(declareGenericProperty<Real, is_ad>("property_name")),
45 _i(getParam<unsigned int>("index_i")),
46 _j(getParam<unsigned int>("index_j"))
47{
48}
49
50template <bool is_ad>
51void
56
57template <bool is_ad>
58void
63
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)
auto raw_value(const Eigen::Map< T > &in)
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)