www.mooseframework.org
MaterialTensorIntegral.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 
10 #include "MaterialTensorIntegral.h"
11 #include "RankTwoScalarTools.h"
12 
13 registerMooseObject("TensorMechanicsApp", MaterialTensorIntegral);
14 
16 
17 InputParameters
19 {
20  InputParameters params = ElementIntegralPostprocessor::validParams();
21  params.addClassDescription("This postprocessor computes an element integral of "
22  "a component of a material tensor as specified by "
23  "the user-supplied indices");
24  params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
25  "The rank two material tensor name");
26  params.addRequiredRangeCheckedParam<unsigned int>(
27  "index_i",
28  "index_i >= 0 & index_i <= 2",
29  "The index i of ij for the tensor to output (0, 1, 2)");
30  params.addRequiredRangeCheckedParam<unsigned int>(
31  "index_j",
32  "index_j >= 0 & index_j <= 2",
33  "The index j of ij for the tensor to output (0, 1, 2)");
34  params.set<bool>("use_displaced_mesh") = true;
35  return params;
36 }
37 
38 MaterialTensorIntegral::MaterialTensorIntegral(const InputParameters & parameters)
39  : ElementIntegralPostprocessor(parameters),
40  _tensor(getMaterialProperty<RankTwoTensor>("rank_two_tensor")),
41  _i(getParam<unsigned int>("index_i")),
42  _j(getParam<unsigned int>("index_j"))
43 {
44 }
45 
46 Real
48 {
50 }
registerMooseObject
registerMooseObject("TensorMechanicsApp", MaterialTensorIntegral)
defineLegacyParams
defineLegacyParams(MaterialTensorIntegral)
MaterialTensorIntegral::computeQpIntegral
virtual Real computeQpIntegral()
Definition: MaterialTensorIntegral.C:47
MaterialTensorIntegral::MaterialTensorIntegral
MaterialTensorIntegral(const InputParameters &parameters)
Definition: MaterialTensorIntegral.C:38
MaterialTensorIntegral::_j
const unsigned int _j
Definition: MaterialTensorIntegral.h:38
MaterialTensorIntegral::validParams
static InputParameters validParams()
Definition: MaterialTensorIntegral.C:18
validParams
InputParameters validParams()
RankTwoScalarTools::component
T component(const RankTwoTensorTempl< T > &r2tensor, unsigned int i, unsigned int j)
Definition: RankTwoScalarTools.h:31
MaterialTensorIntegral.h
MaterialTensorIntegral::_i
const unsigned int _i
Definition: MaterialTensorIntegral.h:37
RankTwoScalarTools.h
RankTwoTensorTempl< Real >
MaterialTensorIntegral::_tensor
const MaterialProperty< RankTwoTensor > & _tensor
Definition: MaterialTensorIntegral.h:36
MaterialTensorIntegral
This postprocessor computes an element integral of a component of a material tensor as specified by t...
Definition: MaterialTensorIntegral.h:25