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

Generated by: LCOV version 1.14