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: f45d79 Lines: 22 23 95.7 %
Date: 2025-07-25 05:00:39 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         404 : CZMComputeLocalTractionBase::validParams()
      15             : {
      16         404 :   InputParameters params = InterfaceMaterial::validParams();
      17             : 
      18         404 :   params.addClassDescription("Base class for implementing cohesive zone constitutive material "
      19             :                              "models that can be formulated using the total displacement jump");
      20         808 :   params.addRequiredCoupledVar("displacements",
      21             :                                "The string of displacements suitable for the problem statement");
      22         404 :   params.suppressParameter<bool>("use_displaced_mesh");
      23         808 :   params.addParam<std::string>("base_name", "Material property base name");
      24         404 :   return params;
      25           0 : }
      26             : 
      27         186 : CZMComputeLocalTractionBase::CZMComputeLocalTractionBase(const InputParameters & parameters)
      28             :   : InterfaceMaterial(parameters),
      29         378 :     _base_name(isParamValid("base_name") && !getParam<std::string>("base_name").empty()
      30         186 :                    ? getParam<std::string>("base_name") + "_"
      31             :                    : ""),
      32         372 :     _interface_traction(declarePropertyByName<RealVectorValue>(_base_name + "interface_traction")),
      33         186 :     _dinterface_traction_djump(
      34         186 :         declarePropertyByName<RankTwoTensor>(_base_name + "dinterface_traction_djump")),
      35         186 :     _interface_displacement_jump(
      36         372 :         getMaterialPropertyByName<RealVectorValue>(_base_name + "interface_displacement_jump"))
      37             : {
      38         186 : }
      39             : 
      40             : void
      41        1456 : CZMComputeLocalTractionBase::initQpStatefulProperties()
      42             : {
      43        1456 :   _interface_traction[_qp] = 0;
      44        1456 : }
      45             : 
      46             : void
      47       65552 : CZMComputeLocalTractionBase::computeQpProperties()
      48             : {
      49       65552 :   computeInterfaceTractionAndDerivatives();
      50       65552 : }

Generated by: LCOV version 1.14