LCOV - code coverage report
Current view: top level - src/materials/lagrangian - ComputeLagrangianObjectiveCustomStress.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #33187 (5aa0b2) with base d7c4bd Lines: 13 14 92.9 %
Date: 2026-06-30 12:24:09 Functions: 3 6 50.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 "ComputeLagrangianObjectiveCustomStress.h"
      11             : 
      12             : registerMooseObject("SolidMechanicsApp", ComputeLagrangianObjectiveCustomStress);
      13             : registerMooseObject("SolidMechanicsApp", ComputeLagrangianObjectiveCustomSymmetricStress);
      14             : 
      15             : template <bool symmetric>
      16             : InputParameters
      17         560 : ComputeLagrangianObjectiveCustomStressTmpl<symmetric>::validParams()
      18             : {
      19         560 :   InputParameters params = ComputeLagrangianObjectiveStress::validParams();
      20        1120 :   params.addRequiredParam<MaterialPropertyName>("custom_small_stress",
      21             :                                                 "The name of the small stress.");
      22        1120 :   params.addRequiredParam<MaterialPropertyName>("custom_small_jacobian",
      23             :                                                 "The name of the small stress Jacobian.");
      24         560 :   return params;
      25           0 : }
      26             : 
      27             : template <bool symmetric>
      28         420 : ComputeLagrangianObjectiveCustomStressTmpl<symmetric>::ComputeLagrangianObjectiveCustomStressTmpl(
      29             :     const InputParameters & parameters)
      30             :   : ComputeLagrangianObjectiveStress(parameters),
      31         420 :     _custom_stress(getMaterialProperty<StressType>("custom_small_stress")),
      32        1260 :     _custom_jacobian(getMaterialProperty<JacobianType>("custom_small_jacobian"))
      33             : {
      34         420 : }
      35             : 
      36             : template <bool symmetric>
      37             : void
      38      269952 : ComputeLagrangianObjectiveCustomStressTmpl<symmetric>::computeQpSmallStress()
      39             : {
      40      269952 :   _small_stress[_qp] = RankTwoTensor(_custom_stress[_qp]);
      41      269952 :   _small_jacobian[_qp] = RankFourTensor(_custom_jacobian[_qp]);
      42      269952 : }

Generated by: LCOV version 1.14