LCOV - code coverage report
Current view: top level - include/materials - ComputeAxisymmetric1DIncrementalStrain.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 2 2 100.0 %
Date: 2025-07-25 05:00:39 Functions: 1 1 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             : #pragma once
      11             : 
      12             : #include "Compute1DIncrementalStrain.h"
      13             : #include "SubblockIndexProvider.h"
      14             : 
      15             : /**
      16             :  * ComputeAxisymmetric1DIncrementalStrain defines a strain increment only
      17             :  * for incremental small strains in an Axisymmetric 1D problem.
      18             :  * The COORD_TYPE in the Problem block must be set to RZ.
      19             :  */
      20             : class ComputeAxisymmetric1DIncrementalStrain : public Compute1DIncrementalStrain
      21             : {
      22             : public:
      23             :   static InputParameters validParams();
      24             : 
      25             :   ComputeAxisymmetric1DIncrementalStrain(const InputParameters & parameters);
      26             : 
      27             :   void initialSetup() override;
      28             : 
      29             : protected:
      30             :   /// Computes the current dUy/dy for axisymmetric problems
      31             :   Real computeGradDispYY() override;
      32             : 
      33             :   /// Computes the old dUy/dy for axisymmetric problems
      34             :   Real computeGradDispYYOld() override;
      35             : 
      36             :   /// Computes the current dUz/dz for axisymmetric problems, where
      37             :   ///  \f$ \epsilon_{\theta} = \frac{u_r}{r} \f$
      38             :   Real computeGradDispZZ() override;
      39             : 
      40             :   /// Computes the old dUz/dz for axisymmetric problems, where
      41             :   ///  \f$ \epsilon_{\theta-old} = \frac{u_{r-old}}{r_{old}} \f$
      42             :   Real computeGradDispZZOld() override;
      43             : 
      44             :   /// gets its subblock index for current element
      45        9952 :   unsigned int getCurrentSubblockIndex() const
      46             :   {
      47        9952 :     return _subblock_id_provider ? _subblock_id_provider->getSubblockIndex(*_current_elem) : 0;
      48             :   };
      49             : 
      50             :   /// the old value of the first component of the displacements vector
      51             :   const VariableValue & _disp_old_0;
      52             : 
      53             :   /// A Userobject that carries the subblock ID for all elements
      54             :   const SubblockIndexProvider * const _subblock_id_provider;
      55             : 
      56             :   /// Whether an out-of-plane strain variable is coupled
      57             :   bool _has_out_of_plane_strain;
      58             : 
      59             :   ///{@ Current and old values of the out-of-plane strain variable
      60             :   const VariableValue & _out_of_plane_strain;
      61             :   const VariableValue & _out_of_plane_strain_old;
      62             :   ///@}
      63             : 
      64             :   /// Whether an out-of-plane strain scalar variable is coupled
      65             :   bool _has_scalar_out_of_plane_strain;
      66             : 
      67             :   ///{@ Current and old values of the out-of-plane strain scalar variable
      68             :   std::vector<const VariableValue *> _scalar_out_of_plane_strain;
      69             :   std::vector<const VariableValue *> _scalar_out_of_plane_strain_old;
      70             :   ///@}
      71             : };

Generated by: LCOV version 1.14