www.mooseframework.org
RankFourAux.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 #include "RankFourAux.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<AuxKernel>();
14  params.addClassDescription("Access a component of a RankFourTensor");
15 
16  // add stuff here
17  params.addRequiredParam<MaterialPropertyName>("rank_four_tensor",
18  "The rank four material tensor name");
19  params.addRequiredRangeCheckedParam<unsigned int>(
20  "index_i",
21  "index_i >= 0 & index_i <= 2",
22  "The index i of ijkl for the tensor to output (0, 1, 2)");
23  params.addRequiredRangeCheckedParam<unsigned int>(
24  "index_j",
25  "index_j >= 0 & index_j <= 2",
26  "The index j of ijkl for the tensor to output (0, 1, 2)");
27  params.addRequiredRangeCheckedParam<unsigned int>(
28  "index_k",
29  "index_k >= 0 & index_k <= 2",
30  "The index k of ijkl for the tensor to output (0, 1, 2)");
31  params.addRequiredRangeCheckedParam<unsigned int>(
32  "index_l",
33  "index_l >= 0 & index_l <= 2",
34  "The index l of ijkl for the tensor to output (0, 1, 2)");
35 
36  return params;
37 }
38 
39 RankFourAux::RankFourAux(const InputParameters & parameters)
40  : AuxKernel(parameters),
41  _tensor(getMaterialProperty<RankFourTensor>("rank_four_tensor")),
42  _i(getParam<unsigned int>("index_i")),
43  _j(getParam<unsigned int>("index_j")),
44  _k(getParam<unsigned int>("index_k")),
45  _l(getParam<unsigned int>("index_l"))
46 {
47 }
48 
49 Real
51 {
52  return _tensor[_qp](_i, _j, _k, _l);
53 }
RankFourAux(const InputParameters &parameters)
Definition: RankFourAux.C:39
virtual Real computeValue()
Definition: RankFourAux.C:50
const unsigned int _j
Definition: RankFourAux.h:37
const unsigned int _l
Definition: RankFourAux.h:39
const MaterialProperty< RankFourTensor > & _tensor
Definition: RankFourAux.h:35
const unsigned int _k
Definition: RankFourAux.h:38
const unsigned int _i
Definition: RankFourAux.h:36
InputParameters validParams< RankFourAux >()
RankFourAux is designed to take the data in the RankFourTensor material property, for example stiffne...
Definition: RankFourAux.C:11