LCOV - code coverage report
Current view: top level - src/materials - Compute1DSmallStrain.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #31405 (292dce) with base fef103 Lines: 16 17 94.1 %
Date: 2025-09-04 07:57:23 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 "Compute1DSmallStrain.h"
      11             : 
      12             : #include "libmesh/quadrature.h"
      13             : 
      14             : InputParameters
      15          84 : Compute1DSmallStrain::validParams()
      16             : {
      17          84 :   InputParameters params = ComputeSmallStrain::validParams();
      18          84 :   params.addClassDescription("Compute a small strain in 1D problem");
      19          84 :   return params;
      20           0 : }
      21             : 
      22          63 : Compute1DSmallStrain::Compute1DSmallStrain(const InputParameters & parameters)
      23          63 :   : ComputeSmallStrain(parameters)
      24             : {
      25          63 : }
      26             : 
      27             : void
      28        4148 : Compute1DSmallStrain::computeProperties()
      29             : {
      30       12444 :   for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
      31             :   {
      32        8296 :     _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
      33        8296 :     _total_strain[_qp](1, 1) = computeStrainYY();
      34        8296 :     _total_strain[_qp](2, 2) = computeStrainZZ();
      35             : 
      36        8296 :     _mechanical_strain[_qp] = _total_strain[_qp];
      37             : 
      38             :     // Remove the eigenstrain
      39       16592 :     for (auto es : _eigenstrains)
      40        8296 :       _mechanical_strain[_qp] -= (*es)[_qp];
      41             :   }
      42        4148 : }

Generated by: LCOV version 1.14