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 "Compute1DSmallStrain.h" 11 : 12 : #include "libmesh/quadrature.h" 13 : 14 : InputParameters 15 72 : Compute1DSmallStrain::validParams() 16 : { 17 72 : InputParameters params = ComputeSmallStrain::validParams(); 18 72 : params.addClassDescription("Compute a small strain in 1D problem"); 19 72 : return params; 20 0 : } 21 : 22 54 : Compute1DSmallStrain::Compute1DSmallStrain(const InputParameters & parameters) 23 54 : : ComputeSmallStrain(parameters) 24 : { 25 54 : } 26 : 27 : void 28 3000 : Compute1DSmallStrain::computeProperties() 29 : { 30 9000 : for (_qp = 0; _qp < _qrule->n_points(); ++_qp) 31 : { 32 6000 : _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0); 33 6000 : _total_strain[_qp](1, 1) = computeStrainYY(); 34 6000 : _total_strain[_qp](2, 2) = computeStrainZZ(); 35 : 36 6000 : _mechanical_strain[_qp] = _total_strain[_qp]; 37 : 38 : // Remove the eigenstrain 39 12000 : for (auto es : _eigenstrains) 40 6000 : _mechanical_strain[_qp] -= (*es)[_qp]; 41 : } 42 3000 : }