LCOV - code coverage report
Current view: top level - src/userobjects - NodalRankTwoComponentPD.C (source / functions) Hit Total Coverage
Test: idaholab/moose peridynamics: #31405 (292dce) with base fef103 Lines: 0 14 0.0 %
Date: 2025-09-04 07:55:08 Functions: 0 3 0.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 "NodalRankTwoComponentPD.h"
      11             : #include "RankTwoTensor.h"
      12             : #include "AuxiliarySystem.h"
      13             : 
      14             : registerMooseObject("PeridynamicsApp", NodalRankTwoComponentPD);
      15             : 
      16             : InputParameters
      17           0 : NodalRankTwoComponentPD::validParams()
      18             : {
      19           0 :   InputParameters params = NodalRankTwoUserObjectBasePD::validParams();
      20           0 :   params.addClassDescription(
      21             :       "Class for calculating components of nodal rank-two stress and strain tensors "
      22             :       "from material properties (stress and strain) for edge elements (i.e., "
      23             :       "bonds) connected at that node. NOTE: This UserObject only applies to the NOSPD model.");
      24             : 
      25           0 :   params.addRequiredRangeCheckedParam<unsigned int>(
      26             :       "index_i",
      27             :       "index_i >= 0 & index_i <= 2",
      28             :       "The index i of ij for the tensor to output (0, 1, 2)");
      29           0 :   params.addRequiredRangeCheckedParam<unsigned int>(
      30             :       "index_j",
      31             :       "index_j >= 0 & index_j <= 2",
      32             :       "The index j of ij for the tensor to output (0, 1, 2)");
      33             : 
      34           0 :   return params;
      35           0 : }
      36             : 
      37           0 : NodalRankTwoComponentPD::NodalRankTwoComponentPD(const InputParameters & parameters)
      38             :   : NodalRankTwoUserObjectBasePD(parameters),
      39           0 :     _i(getParam<unsigned int>("index_i")),
      40           0 :     _j(getParam<unsigned int>("index_j"))
      41             : {
      42           0 : }
      43             : 
      44             : void
      45           0 : NodalRankTwoComponentPD::gatherWeightedValue(unsigned int id, dof_id_type dof, Real dg_vol_frac)
      46             : {
      47           0 :   _aux.solution().add(dof, _tensor[id](_i, _j) * dg_vol_frac);
      48           0 : }

Generated by: LCOV version 1.14