www.mooseframework.org
CompositeElasticityTensor.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 registerMooseObject("TensorMechanicsApp", CompositeElasticityTensor);
13 
15 
16 InputParameters
18 {
20  params.addClassDescription("Assemble an elasticity tensor from multiple tensor contributions "
21  "weighted by material properties");
22  params.addParam<std::string>("base_name",
23  "Optional parameter that allows the user to define "
24  "multiple mechanics material systems on the same "
25  "block, i.e. for multiple phases");
26  return params;
27 }
28 
29 CompositeElasticityTensor::CompositeElasticityTensor(const InputParameters & parameters)
30  : CompositeTensorBase<RankFourTensor, Material>(parameters),
31  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
32  _M_name(_base_name + "elasticity_tensor"),
33  _M(declareProperty<RankFourTensor>(_M_name))
34 {
35  // we take the tensor names to be the _base names_ of the elasticity tensors
36  for (unsigned int i = 0; i < _num_comp; ++i)
37  _tensor_names[i] += "_elasticity_tensor";
38 
39  initializeDerivativeProperties(_M_name);
40 }
41 
42 void
44 {
45  computeQpTensorProperties(_M);
46 }
CompositeElasticityTensor.h
CompositeElasticityTensor::_M
MaterialProperty< RankFourTensor > & _M
Definition: CompositeElasticityTensor.h:42
CompositeElasticityTensor::validParams
static InputParameters validParams()
Definition: CompositeElasticityTensor.C:17
CompositeElasticityTensor::computeQpProperties
void computeQpProperties()
Definition: CompositeElasticityTensor.C:43
validParams
InputParameters validParams()
CompositeElasticityTensor
CompositeElasticityTensor provides a simple RankFourTensor type MaterialProperty that can be used as ...
Definition: CompositeElasticityTensor.h:29
CompositeElasticityTensor::CompositeElasticityTensor
CompositeElasticityTensor(const InputParameters &parameters)
Definition: CompositeElasticityTensor.C:29
registerMooseObject
registerMooseObject("TensorMechanicsApp", CompositeElasticityTensor)
RankFourTensorTempl< Real >
defineLegacyParams
defineLegacyParams(CompositeElasticityTensor)
CompositeElasticityTensor::_M_name
const std::string _M_name
Definition: CompositeElasticityTensor.h:40