Line data Source code
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 : 10 : #include "CompositeElasticityTensor.h" 11 : 12 : registerMooseObject("TensorMechanicsApp", CompositeElasticityTensor); 13 : 14 : InputParameters 15 72 : CompositeElasticityTensor::validParams() 16 : { 17 72 : InputParameters params = CompositeTensorBase<RankFourTensor, Material>::validParams(); 18 72 : params.addClassDescription("Assemble an elasticity tensor from multiple tensor contributions " 19 : "weighted by material properties"); 20 144 : params.addParam<std::string>("base_name", 21 : "Optional parameter that allows the user to define " 22 : "multiple mechanics material systems on the same " 23 : "block, i.e. for multiple phases"); 24 72 : return params; 25 0 : } 26 : 27 54 : CompositeElasticityTensor::CompositeElasticityTensor(const InputParameters & parameters) 28 : : CompositeTensorBase<RankFourTensor, Material>(parameters), 29 54 : _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""), 30 54 : _M_name(_base_name + "elasticity_tensor"), 31 108 : _M(declareProperty<RankFourTensor>(_M_name)) 32 : { 33 : // we take the tensor names to be the _base names_ of the elasticity tensors 34 117 : for (unsigned int i = 0; i < _num_comp; ++i) 35 63 : _tensor_names[i] += "_elasticity_tensor"; 36 : 37 54 : initializeDerivativeProperties(_M_name); 38 54 : } 39 : 40 : void 41 92206 : CompositeElasticityTensor::computeQpProperties() 42 : { 43 92206 : computeQpTensorProperties(_M); 44 92206 : }