LCOV - code coverage report
Current view: top level - src/kernels - ADWeakPlaneStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #32971 (54bef8) with base c6cf66 Lines: 16 16 100.0 %
Date: 2026-05-29 20:40:07 Functions: 3 3 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 "ADWeakPlaneStress.h"
      11             : 
      12             : registerMooseObject("SolidMechanicsApp", ADWeakPlaneStress);
      13             : 
      14             : InputParameters
      15          38 : ADWeakPlaneStress::validParams()
      16             : {
      17          38 :   InputParameters params = ADKernelValue::validParams();
      18          38 :   params.addClassDescription("Plane stress kernel to provide out-of-plane strain contribution.");
      19          76 :   params.addParam<std::string>("base_name", "Material property base name");
      20          76 :   MooseEnum direction("x y z", "z");
      21          76 :   params.addParam<MooseEnum>("out_of_plane_strain_direction",
      22             :                              direction,
      23             :                              "The direction of the out-of-plane strain variable");
      24          38 :   params.set<bool>("use_displaced_mesh") = false;
      25             : 
      26          38 :   return params;
      27          38 : }
      28             : 
      29          19 : ADWeakPlaneStress::ADWeakPlaneStress(const InputParameters & parameters)
      30             :   : ADKernelValue(parameters),
      31          19 :     _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
      32          38 :     _stress(getADMaterialProperty<RankTwoTensor>(_base_name + "stress")),
      33          57 :     _direction(getParam<MooseEnum>("out_of_plane_strain_direction"))
      34             : {
      35          19 : }
      36             : 
      37             : ADReal
      38        4016 : ADWeakPlaneStress::precomputeQpResidual()
      39             : {
      40        4016 :   return _stress[_qp](_direction, _direction);
      41             : }

Generated by: LCOV version 1.14