www.mooseframework.org
MaterialTensorIntegralSM.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 #include "SymmTensor.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<ElementIntegralPostprocessor>();
19  params.addRequiredParam<std::string>("tensor", "The material tensor name.");
20  params.set<bool>("use_displaced_mesh") = true;
21  return params;
22 }
23 
24 MaterialTensorIntegralSM::MaterialTensorIntegralSM(const InputParameters & parameters)
25  : ElementIntegralPostprocessor(parameters),
26  _material_tensor_calculator(parameters),
27  _tensor(getMaterialProperty<SymmTensor>(getParam<std::string>("tensor")))
28 {
29 }
30 
31 Real
33 {
34  RealVectorValue direction;
35  return _material_tensor_calculator.getTensorQuantity(_tensor[_qp], _q_point[_qp], direction);
36 }
InputParameters validParams< MaterialTensorCalculator >()
Real getTensorQuantity(const SymmTensor &tensor, const Point &curr_point, RealVectorValue &direction)
const MaterialProperty< SymmTensor > & _tensor
MaterialTensorIntegralSM(const InputParameters &parameters)
InputParameters validParams< MaterialTensorIntegralSM >()
MaterialTensorCalculator _material_tensor_calculator