LCOV - code coverage report
Current view: top level - include/kernels - MechanicsBasePD.h (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 4 4 100.0 %
Date: 2025-09-04 07:55:08 Functions: 2 2 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             : #pragma once
      11             : 
      12             : #include "PeridynamicsKernelBase.h"
      13             : #include "DerivativeMaterialInterface.h"
      14             : 
      15             : /**
      16             :  * Base kernel class for peridynamic solid mechanics models
      17             :  */
      18             : class MechanicsBasePD : public DerivativeMaterialInterface<PeridynamicsKernelBase>
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             : 
      23             :   MechanicsBasePD(const InputParameters & parameters);
      24             : 
      25             :   virtual void computeOffDiagJacobian(unsigned int jvar) override;
      26             : 
      27             :   /**
      28             :    * Function to compute local contribution to the off-diagonal Jacobian at the current nodes
      29             :    * @param coupled_component   The coupled variable number
      30             :    */
      31       32376 :   virtual void computeLocalOffDiagJacobian(unsigned int /* jvar_num */,
      32       32376 :                                            unsigned int /* coupled_component */){};
      33             : 
      34             :   /**
      35             :    * Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes
      36             :    * @param jvar_num   The number of the first coupled variable
      37             :    * @param coupled_component   The component number of the second coupled variable
      38             :    */
      39        7056 :   virtual void computePDNonlocalOffDiagJacobian(unsigned int /* jvar_num */,
      40        7056 :                                                 unsigned int /* coupled_component */){};
      41             : 
      42             :   virtual void initialSetup() override;
      43             :   virtual void prepare() override;
      44             : 
      45             : protected:
      46             :   /// displacement variables
      47             :   std::vector<MooseVariable *> _disp_var;
      48             : 
      49             :   ///@{ Temperature variable
      50             :   const bool _temp_coupled;
      51             :   MooseVariable * _temp_var;
      52             :   ///@}
      53             : 
      54             :   /// number of displacement components
      55             :   unsigned int _ndisp;
      56             : 
      57             :   ///@{ Parameters for out-of-plane strain in weak plane stress formulation
      58             :   const bool _out_of_plane_strain_coupled;
      59             :   MooseVariable * _out_of_plane_strain_var;
      60             :   ///@}
      61             : 
      62             :   /// Vector of bond in current configuration
      63             :   const std::vector<RealGradient> * _orientation;
      64             : 
      65             :   /// Current variable dof numbers for nodes i and j
      66             :   std::vector<dof_id_type> _ivardofs;
      67             : 
      68             :   /// weights used for the current element to obtain the nodal stress
      69             :   std::vector<Real> _weights;
      70             : 
      71             :   /// Vector of bond in current configuration
      72             :   RealGradient _current_vec;
      73             : 
      74             :   /// Unit vector of bond in current configuration
      75             :   RealGradient _current_unit_vec;
      76             : };

Generated by: LCOV version 1.14