LCOV - code coverage report
Current view: top level - src/materials - ComputeAxisymmetricRZSmallStrain.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 16 19 84.2 %
Date: 2025-07-25 05:00:39 Functions: 4 4 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 "ComputeAxisymmetricRZSmallStrain.h"
      11             : #include "FEProblem.h"
      12             : #include "MooseMesh.h"
      13             : 
      14             : registerMooseObject("SolidMechanicsApp", ComputeAxisymmetricRZSmallStrain);
      15             : 
      16             : InputParameters
      17         240 : ComputeAxisymmetricRZSmallStrain::validParams()
      18             : {
      19         240 :   InputParameters params = Compute2DSmallStrain::validParams();
      20         240 :   params.addClassDescription("Compute a small strain in an Axisymmetric geometry");
      21         240 :   return params;
      22           0 : }
      23             : 
      24         180 : ComputeAxisymmetricRZSmallStrain::ComputeAxisymmetricRZSmallStrain(
      25         180 :     const InputParameters & parameters)
      26         180 :   : Compute2DSmallStrain(parameters)
      27             : {
      28         180 : }
      29             : 
      30             : void
      31         180 : ComputeAxisymmetricRZSmallStrain::initialSetup()
      32             : {
      33         180 :   Compute2DSmallStrain::initialSetup();
      34             : 
      35         180 :   if (getBlockCoordSystem() != Moose::COORD_RZ)
      36           0 :     mooseError("The coordinate system must be set to RZ for Axisymmetric geometries.");
      37             : 
      38         180 :   if (_out_of_plane_direction != 2)
      39           0 :     paramError("out_of_plane_direction",
      40             :                "The out-of-plane direction for axisymmetric systems is currently restricted to z");
      41         180 : }
      42             : 
      43             : Real
      44      242868 : ComputeAxisymmetricRZSmallStrain::computeOutOfPlaneStrain()
      45             : {
      46      242868 :   if (!MooseUtils::absoluteFuzzyEqual(_q_point[_qp](0), 0.0))
      47      242868 :     return (*_disp[0])[_qp] / _q_point[_qp](0);
      48             :   else
      49             :     return 0.0;
      50             : }

Generated by: LCOV version 1.14