www.mooseframework.org
CompositeElasticityTensor.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 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = CompositeTensorBase<RankFourTensor, Material>::validParams();
14  params.addClassDescription("Assemble an elasticity tensor from multiple tensor contributions "
15  "weighted by material properties");
16  params.addParam<std::string>("base_name",
17  "Optional parameter that allows the user to define "
18  "multiple mechanics material systems on the same "
19  "block, i.e. for multiple phases");
20  return params;
21 }
22 
23 CompositeElasticityTensor::CompositeElasticityTensor(const InputParameters & parameters)
24  : CompositeTensorBase<RankFourTensor, Material>(parameters),
25  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
26  _M_name(_base_name + "elasticity_tensor"),
27  _M(declareProperty<RankFourTensor>(_M_name))
28 {
29  // we take the tensor names to be the _base names_ of the elasticity tensors
30  for (unsigned int i = 0; i < _num_comp; ++i)
31  _tensor_names[i] += "_elasticity_tensor";
32 
33  initializeDerivativeProperties(_M_name);
34 }
35 
36 void
38 {
39  computeQpTensorProperties(_M);
40 }
CompositeElasticityTensor(const InputParameters &parameters)
InputParameters validParams< CompositeElasticityTensor >()
MaterialProperty< RankFourTensor > & _M