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

Generated by: LCOV version 1.14