https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15
16template <bool is_ad>
19{
21 params.addClassDescription("Compute a Direction scalar property 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.addRequiredParam<Point>("direction", "Direction to calculate component in.");
27 return params;
28}
29
30template <bool is_ad>
32 const InputParameters & parameters)
33 : Material(parameters),
34 _tensor(getGenericMaterialProperty<RankTwoTensor, is_ad>("rank_two_tensor")),
35 _property(declareGenericProperty<Real, is_ad>("property_name")),
36 _direction(getParam<Point>("direction"))
37{
38}
39
40template <bool is_ad>
41void
46
47template <bool is_ad>
48void
53
registerMooseObject("SolidMechanicsApp", RankTwoDirectionalComponent)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
RankTwoDirectionalComponent computes the component of a rank-2 tensor in specified direction.
RankTwoDirectionalComponentTempl(const InputParameters &parameters)
T getDirectionalComponent(const RankTwoTensorTempl< T > &tensor, const Point &direction)