Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 "ComputeLagrangianCauchyCustomStress.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", ComputeLagrangianCauchyCustomStress); 13 : 14 : InputParameters 15 40 : ComputeLagrangianCauchyCustomStress::validParams() 16 : { 17 40 : InputParameters params = ComputeLagrangianStressCauchy::validParams(); 18 : 19 40 : params.addClassDescription("Custom stress update providing the Cauchy stress"); 20 : 21 80 : params.addRequiredParam<MaterialPropertyName>("custom_cauchy_stress", 22 : "The name of the Cauchy stress."); 23 80 : params.addRequiredParam<MaterialPropertyName>("custom_cauchy_jacobian", 24 : "The name of the Cauchy stress Jacobian."); 25 : 26 40 : return params; 27 0 : } 28 : 29 30 : ComputeLagrangianCauchyCustomStress::ComputeLagrangianCauchyCustomStress( 30 30 : const InputParameters & parameters) 31 : : ComputeLagrangianStressCauchy(parameters), 32 30 : _custom_stress(getMaterialProperty<RankTwoTensor>("custom_cauchy_stress")), 33 90 : _custom_jacobian(getMaterialProperty<RankFourTensor>("custom_cauchy_jacobian")) 34 : { 35 30 : } 36 : 37 : void 38 12864 : ComputeLagrangianCauchyCustomStress::computeQpCauchyStress() 39 : { 40 12864 : _cauchy_stress[_qp] = _custom_stress[_qp]; 41 12864 : _cauchy_jacobian[_qp] = _custom_jacobian[_qp]; 42 12864 : }