www.mooseframework.org
MacroElastic.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 "MacroElastic.h"
8 
9 #include "SymmElasticityTensor.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<Elastic>();
16  params.addRequiredParam<PostprocessorName>("C1111",
17  "The postprocessor associated with the C1111 value");
18  params.addRequiredParam<PostprocessorName>("C1122",
19  "The postprocessor associated with the C1122 value");
20  params.addRequiredParam<PostprocessorName>("C1133",
21  "The postprocessor associated with the C1133 value");
22  params.addRequiredParam<PostprocessorName>("C2222",
23  "The postprocessor associated with the C2222 value");
24  params.addRequiredParam<PostprocessorName>("C2233",
25  "The postprocessor associated with the C2233 value");
26  params.addRequiredParam<PostprocessorName>("C3333",
27  "The postprocessor associated with the C3333 value");
28  params.addRequiredParam<PostprocessorName>("C1212",
29  "The postprocessor associated with the C1212 value");
30  params.addRequiredParam<PostprocessorName>("C2323",
31  "The postprocessor associated with the C2323 value");
32  params.addRequiredParam<PostprocessorName>("C3131",
33  "The postprocessor associated with the C3131 value");
34  return params;
35 }
36 
37 MacroElastic::MacroElastic(const InputParameters & parameters)
38  : Elastic(parameters),
39  _C1111(getPostprocessorValue("C1111")),
40  _C1122(getPostprocessorValue("C1122")),
41  _C1133(getPostprocessorValue("C1133")),
42  _C2222(getPostprocessorValue("C2222")),
43  _C2233(getPostprocessorValue("C2233")),
44  _C3333(getPostprocessorValue("C3333")),
45  _C1212(getPostprocessorValue("C1212")),
46  _C2323(getPostprocessorValue("C2323")),
47  _C3131(getPostprocessorValue("C3131"))
48 {
49 }
50 
52 
54 
56 
57 bool
59 {
60  std::vector<Real> v(9);
61  v[0] = _C1111;
62  v[1] = _C1122;
63  v[2] = _C1133;
64  v[3] = _C2222;
65  v[4] = _C2233;
66  v[5] = _C3333;
67  v[6] = _C1212;
68  v[7] = _C2323;
69  v[8] = _C3131;
70 
71  tensor.fillFromInputVector(v, false);
72 
73  return true;
74 }
75 
76 void
78 {
80 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
SymmElasticityTensor * elasticityTensor() const
Definition: SolidModel.h:217
const PostprocessorValue & _C3131
Definition: MacroElastic.h:34
virtual void createElasticityTensor()
Definition: MacroElastic.C:77
virtual ~MacroElastic()
Definition: MacroElastic.C:53
InputParameters validParams< Elastic >()
Definition: Elastic.C:11
InputParameters validParams< MacroElastic >()
Definition: MacroElastic.C:13
const PostprocessorValue & _C3333
Definition: MacroElastic.h:31
const PostprocessorValue & _C2323
Definition: MacroElastic.h:33
const PostprocessorValue & _C1133
Definition: MacroElastic.h:28
MacroElastic(const InputParameters &parameters)
Definition: MacroElastic.C:37
const PostprocessorValue & _C1212
Definition: MacroElastic.h:32
void fillFromInputVector(std::vector< Real > input, bool all)
const PostprocessorValue & _C1122
Definition: MacroElastic.h:27
virtual bool updateElasticityTensor(SymmElasticityTensor &tensor)
Return true if the elasticity tensor changed.
Definition: MacroElastic.C:58
const PostprocessorValue & _C2233
Definition: MacroElastic.h:30
const PostprocessorValue & _C1111
Definition: MacroElastic.h:26
const PostprocessorValue & _C2222
Definition: MacroElastic.h:29