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
13#include "metaphysicl/raw_type.h"
14
17
18template <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
32template <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
42template <bool is_ad>
43void
48
49template <bool is_ad>
50void
56
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)
auto raw_value(const Eigen::Map< T > &in)
T getDirectionalComponent(const RankTwoTensorTempl< T > &tensor, const Point &direction)