www.mooseframework.org
LineMaterialRankTwoSampler.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 registerMooseObject("TensorMechanicsApp", LineMaterialRankTwoSampler);
14 
16 
17 InputParameters
19 {
20  InputParameters params = LineMaterialSamplerBase<Real>::validParams();
21  params.addClassDescription("Access a component of a RankTwoTensor");
22  params.addRequiredRangeCheckedParam<unsigned int>(
23  "index_i",
24  "index_i >= 0 & index_i <= 2",
25  "The index i of ij for the tensor to output (0, 1, 2)");
26  params.addRequiredRangeCheckedParam<unsigned int>(
27  "index_j",
28  "index_j >= 0 & index_j <= 2",
29  "The index j of ij for the tensor to output (0, 1, 2)");
30  return params;
31 }
32 
33 LineMaterialRankTwoSampler::LineMaterialRankTwoSampler(const InputParameters & parameters)
34  : LineMaterialSamplerBase<RankTwoTensor>(parameters),
35  _i(getParam<unsigned int>("index_i")),
36  _j(getParam<unsigned int>("index_j"))
37 {
38 }
39 
40 Real
42  const Point & /*curr_point*/)
43 {
44  return RankTwoScalarTools::component(property, _i, _j);
45 }
LineMaterialRankTwoSampler::LineMaterialRankTwoSampler
LineMaterialRankTwoSampler(const InputParameters &parameters)
Class constructor Sets up variables for output based on the properties to be output.
Definition: LineMaterialRankTwoSampler.C:33
LineMaterialRankTwoSampler::validParams
static InputParameters validParams()
Definition: LineMaterialRankTwoSampler.C:18
LineMaterialRankTwoSampler
This class samples components of RankTwoTensor material properties for the integration points in all ...
Definition: LineMaterialRankTwoSampler.h:25
LineMaterialRankTwoSampler::_j
const unsigned int _j
Definition: LineMaterialRankTwoSampler.h:47
LineMaterialRankTwoSampler::_i
const unsigned int _i
Definition: LineMaterialRankTwoSampler.h:46
LineMaterialRankTwoSampler.h
validParams
InputParameters validParams()
registerMooseObject
registerMooseObject("TensorMechanicsApp", LineMaterialRankTwoSampler)
RankTwoScalarTools::component
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
Definition: RankTwoScalarTools.h:31
defineLegacyParams
defineLegacyParams(LineMaterialRankTwoSampler)
LineMaterialRankTwoSampler::getScalarFromProperty
virtual Real getScalarFromProperty(const RankTwoTensor &property, const Point &curr_point)
Reduce the material property to a scalar for output Call through to RankTwoScalarTools::component() t...
Definition: LineMaterialRankTwoSampler.C:41
RankTwoScalarTools.h
RankTwoTensorTempl< Real >