11 #include "RankTwoTensor.h"
18 params.addClassDescription(
19 "Base class for calculating residual and Jacobian for peridynamic mechanic kernels");
21 params.addCoupledVar(
"temperature",
"Nonlinear variable name for the temperature");
22 params.addCoupledVar(
"out_of_plane_strain",
23 "Nonlinear variable name for the out_of_plane strain for "
24 "plane stress analysis using SNOSPD formulation");
31 _temp_coupled(isCoupled(
"temperature")),
32 _temp_var(_temp_coupled ? getVar(
"temperature", 0) : nullptr),
33 _ndisp(coupledComponents(
"displacements")),
34 _out_of_plane_strain_coupled(isCoupled(
"out_of_plane_strain")),
35 _out_of_plane_strain_var(_out_of_plane_strain_coupled ? getVar(
"out_of_plane_strain", 0)
40 mooseError(
"Number of displacements should be consistent with mesh dimension!");
42 for (
unsigned int i = 0; i <
_ndisp; ++i)
43 _disp_var.push_back(getVar(
"displacements", i));
49 _orientation = &_assembly.getFE(FEType(), 1)->get_dxyzdxi();
59 for (
unsigned int i = 0; i < _nnodes; ++i)
60 _ivardofs_ij[i] = _current_elem->node_ptr(i)->dof_number(_sys.number(), _var.number(), 0);
62 for (
unsigned int i = 0; i < _dim; ++i)
64 _disp_var[i]->getNodalValue(*_current_elem->node_ptr(0));
75 if (jvar.number() == _var.number())
79 unsigned int coupled_component = 0;
82 for (
unsigned int i = 0; i < _dim; ++i)
83 if (jvar.number() ==
_disp_var[i]->number())
85 coupled_component = i;
91 coupled_component = 3;
97 coupled_component = 4;
103 DenseMatrix<Number> & ke = _assembly.jacobianBlock(_var.number(), jvar.number());
104 _local_ke.resize(ke.m(), ke.n());
111 if (_use_full_jacobian)