www.mooseframework.org
MaterialTensorIntegralSM.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 
12 #include "SymmTensor.h"
14 
15 registerMooseObject("SolidMechanicsApp", MaterialTensorIntegralSM);
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<ElementIntegralPostprocessor>();
23  params.addRequiredParam<std::string>("tensor", "The material tensor name.");
24  params.set<bool>("use_displaced_mesh") = true;
25  return params;
26 }
27 
28 MaterialTensorIntegralSM::MaterialTensorIntegralSM(const InputParameters & parameters)
29  : ElementIntegralPostprocessor(parameters),
30  _material_tensor_calculator(parameters),
31  _tensor(getMaterialProperty<SymmTensor>(getParam<std::string>("tensor")))
32 {
33 }
34 
35 Real
37 {
38  RealVectorValue direction;
39  return _material_tensor_calculator.getTensorQuantity(_tensor[_qp], _q_point[_qp], direction);
40 }
MaterialTensorIntegralSM
This postprocessor computes an element integral of a component of a material tensor.
Definition: MaterialTensorIntegralSM.h:26
SymmTensor.h
MaterialTensorCalculator::getTensorQuantity
Real getTensorQuantity(const SymmTensor &tensor, const Point &curr_point, RealVectorValue &direction)
Definition: MaterialTensorCalculator.C:71
MaterialTensorIntegralSM::_material_tensor_calculator
MaterialTensorCalculator _material_tensor_calculator
Definition: MaterialTensorIntegralSM.h:34
MaterialTensorCalculator.h
validParams< MaterialTensorCalculator >
InputParameters validParams< MaterialTensorCalculator >()
Definition: MaterialTensorCalculator.C:15
MaterialTensorIntegralSM::_tensor
const MaterialProperty< SymmTensor > & _tensor
Definition: MaterialTensorIntegralSM.h:35
MaterialTensorIntegralSM::computeQpIntegral
virtual Real computeQpIntegral()
Definition: MaterialTensorIntegralSM.C:36
MaterialTensorIntegralSM.h
registerMooseObject
registerMooseObject("SolidMechanicsApp", MaterialTensorIntegralSM)
SymmTensor
Definition: SymmTensor.h:21
MaterialTensorIntegralSM::MaterialTensorIntegralSM
MaterialTensorIntegralSM(const InputParameters &parameters)
Definition: MaterialTensorIntegralSM.C:28
validParams< MaterialTensorIntegralSM >
InputParameters validParams< MaterialTensorIntegralSM >()
Definition: MaterialTensorIntegralSM.C:19