LCOV - code coverage report
Current view: top level - src/materials - ADComputeRSphericalSmallStrain.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #32971 (54bef8) with base c6cf66 Lines: 16 19 84.2 %
Date: 2026-05-29 20:40:07 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "ADComputeRSphericalSmallStrain.h"
      11             : #include "Assembly.h"
      12             : 
      13             : #include "libmesh/quadrature.h"
      14             : 
      15             : registerMooseObject("SolidMechanicsApp", ADComputeRSphericalSmallStrain);
      16             : 
      17             : InputParameters
      18          56 : ADComputeRSphericalSmallStrain::validParams()
      19             : {
      20          56 :   InputParameters params = ADComputeSmallStrain::validParams();
      21          56 :   params.addClassDescription("Compute a small strain 1D spherical symmetry case.");
      22          56 :   return params;
      23           0 : }
      24             : 
      25          42 : ADComputeRSphericalSmallStrain::ADComputeRSphericalSmallStrain(const InputParameters & parameters)
      26          42 :   : ADComputeSmallStrain(parameters)
      27             : {
      28          42 : }
      29             : 
      30             : void
      31         386 : ADComputeRSphericalSmallStrain::computeProperties()
      32             : {
      33        1158 :   for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
      34             :   {
      35         772 :     _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
      36             : 
      37         772 :     if (_q_point[_qp](0) != 0.0)
      38        1544 :       _total_strain[_qp](1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
      39             : 
      40             :     else
      41           0 :       _total_strain[_qp](1, 1) = 0.0;
      42             : 
      43             :     // \epsilon_{\theta \theta} = \epsilon{\phi \phi} in this 1D spherical system
      44         772 :     _total_strain[_qp](2, 2) = _total_strain[_qp](1, 1);
      45             : 
      46         772 :     _mechanical_strain[_qp] = _total_strain[_qp];
      47             : 
      48             :     // Remove the eigenstrains
      49         772 :     for (auto es : _eigenstrains)
      50           0 :       _mechanical_strain[_qp] -= (*es)[_qp];
      51             :   }
      52         386 : }

Generated by: LCOV version 1.14