LCOV - code coverage report
Current view: top level - src/materials - ADComputeAxisymmetricRZSmallStrain.C (source / functions) Hit Total Coverage
Test: idaholab/moose tensor_mechanics: d6b47a Lines: 16 20 80.0 %
Date: 2024-02-27 11:53:14 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://www.mooseframework.org
       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 "ADComputeAxisymmetricRZSmallStrain.h"
      11             : #include "FEProblem.h"
      12             : #include "MooseMesh.h"
      13             : 
      14             : registerMooseObject("TensorMechanicsApp", ADComputeAxisymmetricRZSmallStrain);
      15             : 
      16             : InputParameters
      17          84 : ADComputeAxisymmetricRZSmallStrain::validParams()
      18             : {
      19          84 :   InputParameters params = ADCompute2DSmallStrain::validParams();
      20          84 :   params.addClassDescription("Compute a small strain in an Axisymmetric geometry");
      21          84 :   return params;
      22           0 : }
      23             : 
      24          63 : ADComputeAxisymmetricRZSmallStrain::ADComputeAxisymmetricRZSmallStrain(
      25          63 :     const InputParameters & parameters)
      26          63 :   : ADCompute2DSmallStrain(parameters)
      27             : {
      28          63 : }
      29             : 
      30             : void
      31          63 : ADComputeAxisymmetricRZSmallStrain::initialSetup()
      32             : {
      33          63 :   ADCompute2DSmallStrain::initialSetup();
      34             : 
      35          63 :   if (getBlockCoordSystem() != Moose::COORD_RZ)
      36           0 :     mooseError("The coordinate system must be set to RZ for Axisymmetric geometries.");
      37             : 
      38          63 :   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          63 : }
      42             : 
      43             : ADReal
      44      223552 : ADComputeAxisymmetricRZSmallStrain::computeOutOfPlaneStrain()
      45             : {
      46      223552 :   if (!MooseUtils::absoluteFuzzyEqual(_q_point[_qp](0), 0.0))
      47      223552 :     return (*_disp[0])[_qp] / _q_point[_qp](0);
      48             :   else
      49           0 :     return 0.0;
      50             : }

Generated by: LCOV version 1.14