https://mooseframework.inl.gov
RankTwoDirectionalComponent.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 
18 template <bool is_ad>
21 {
23  params.addClassDescription("Compute a Direction scalar property 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.addRequiredParam<Point>("direction", "Direction to calculate component in.");
29  return params;
30 }
31 
32 template <bool is_ad>
34  const InputParameters & parameters)
35  : Material(parameters),
36  _tensor(getGenericMaterialProperty<RankTwoTensor, is_ad>("rank_two_tensor")),
37  _property(declareGenericProperty<Real, is_ad>("property_name")),
38  _direction(getParam<Point>("direction"))
39 {
40 }
41 
42 template <bool is_ad>
43 void
45 {
46  _property[_qp] = 0.0;
47 }
48 
49 template <bool is_ad>
50 void
52 {
53  _property[_qp] =
55 }
56 
RankTwoDirectionalComponent computes the component of a rank-2 tensor in specified direction...
auto raw_value(const Eigen::Map< T > &in)
T getDirectionalComponent(const RankTwoTensorTempl< T > &tensor, const Point &direction)
virtual void initQpStatefulProperties() override
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
RankTwoDirectionalComponentTempl(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("SolidMechanicsApp", RankTwoDirectionalComponent)
void addClassDescription(const std::string &doc_string)