LCOV - code coverage report
Current view: top level - src/materials/cohesive_zone_model - CZMComputeLocalTractionBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: #31405 (292dce) with base fef103 Lines: 22 23 95.7 %
Date: 2025-09-04 07:57:23 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 "Assembly.h"
      11             : #include "CZMComputeLocalTractionBase.h"
      12             : 
      13             : InputParameters
      14         470 : CZMComputeLocalTractionBase::validParams()
      15             : {
      16         470 :   InputParameters params = InterfaceMaterial::validParams();
      17             : 
      18         470 :   params.addClassDescription("Base class for implementing cohesive zone constitutive material "
      19             :                              "models that can be formulated using the total displacement jump");
      20         940 :   params.addRequiredCoupledVar("displacements",
      21             :                                "The string of displacements suitable for the problem statement");
      22         470 :   params.suppressParameter<bool>("use_displaced_mesh");
      23         940 :   params.addParam<std::string>("base_name", "Material property base name");
      24         470 :   return params;
      25           0 : }
      26             : 
      27         217 : CZMComputeLocalTractionBase::CZMComputeLocalTractionBase(const InputParameters & parameters)
      28             :   : InterfaceMaterial(parameters),
      29         441 :     _base_name(isParamValid("base_name") && !getParam<std::string>("base_name").empty()
      30         217 :                    ? getParam<std::string>("base_name") + "_"
      31             :                    : ""),
      32         434 :     _interface_traction(declarePropertyByName<RealVectorValue>(_base_name + "interface_traction")),
      33         217 :     _dinterface_traction_djump(
      34         217 :         declarePropertyByName<RankTwoTensor>(_base_name + "dinterface_traction_djump")),
      35         217 :     _interface_displacement_jump(
      36         434 :         getMaterialPropertyByName<RealVectorValue>(_base_name + "interface_displacement_jump"))
      37             : {
      38         217 : }
      39             : 
      40             : void
      41        1820 : CZMComputeLocalTractionBase::initQpStatefulProperties()
      42             : {
      43        1820 :   _interface_traction[_qp] = 0;
      44        1820 : }
      45             : 
      46             : void
      47       86824 : CZMComputeLocalTractionBase::computeQpProperties()
      48             : {
      49       86824 :   computeInterfaceTractionAndDerivatives();
      50       86824 : }

Generated by: LCOV version 1.14