Real SolidMechX::computeQpResidual() { if (!_constant_properties) recomputeConstants(); _strain(0,0) = _grad_u[_qp](0); _strain(1,1) = _grad_y[_qp](1); _strain(0,1) = _grad_u[_qp](1)+_grad_y[_qp](0); _stress(0) = _c1*_strain(0,0)+_c1*_c2*_strain(1,1); _stress(1) = _c1*_c3*_strain(0,1); if ( 3 == _mesh_dimension){ _strain(2,2) = _grad_z[_qp](2); _strain(0,2) = _grad_u[_qp](2)+_grad_z[_qp](0); _stress(0) += _c1*_c2*_strain(2,2); _stress(2) = _c1*_c3*_strain(0,2); } Real value = (_stress*_grad_test[_i][_qp]); return value; }
Real SolidMechZ::computeQpResidual() { if (!_constant_properties) recomputeConstants(); _strain(0,0) = _grad_x[_qp](0); _strain(1,1) = _grad_y[_qp](1); _strain(2,2) = _grad_u[_qp](2); _strain(1,2) = _grad_u[_qp](1)+_grad_y[_qp](2); _strain(0,2) = _grad_x[_qp](2)+_grad_u[_qp](0); _stress(0) = _c1*_c3*_strain(0,2); _stress(1) = _c1*_c3*_strain(1,2); _stress(2) = _c1*_c2*_strain(0,0)+_c1*_c2*_strain(1,1)+_c1*_strain(2,2); return (_stress*_grad_test[_i][_qp]); }