20 "Class for calculating the residual and the Jacobian for Form I of the horizon-stabilized" 21 "peridynamic correspondence model under small strain assumptions");
25 "An integer corresponding to the variable this kernel acts on (0 for x, 1 for y, 2 for z)");
45 for (
unsigned int nd = 0; nd < _nnodes; ++nd)
46 for (
unsigned int i = 0; i < _nnodes; ++i)
47 _local_re(i) += (i == 0 ? -1 : 1) *
_multi[nd] *
56 for (
unsigned int i = 0; i < _nnodes; ++i)
57 for (
unsigned int j = 0;
j < _nnodes; ++
j)
58 _local_ke(i,
j) += (i == 0 ? -1 : 1) *
_multi[
j] *
60 _origin_vec * _bond_status;
68 for (
unsigned int nd = 0; nd < _nnodes; ++nd)
71 std::vector<dof_id_type> ivardofs(_nnodes);
72 ivardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), _var.number(), 0);
73 std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
74 std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
77 std::find(neighbors.begin(), neighbors.end(), _current_elem->node_id(1 - nd)) -
79 std::vector<dof_id_type> dg_neighbors =
80 _pdmesh.getBondDeformationGradientNeighbors(_current_elem->node_id(nd), nb_index);
86 for (
unsigned int nb = 0; nb < dg_neighbors.size(); ++nb)
87 if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[dg_neighbors[nb]])) > 0.5)
89 ivardofs[1] = _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])
90 ->dof_number(_sys.number(), _var.number(), 0);
91 vol_nb = _pdmesh.getNodeVolume(neighbors[dg_neighbors[nb]]);
93 origin_vec_nb = _pdmesh.getNodeCoord(neighbors[dg_neighbors[nb]]) -
94 _pdmesh.getNodeCoord(_current_elem->node_id(nd));
97 for (
unsigned int i = 0; i < _dim; ++i)
99 _horizon_radius[nd] / origin_vec_nb.
norm() * origin_vec_nb(i) * vol_nb;
101 dFdUk *=
_shape2[nd].inverse();
105 for (
unsigned int i = 0; i < _nnodes; ++i)
106 for (
unsigned int j = 0;
j < _nnodes; ++
j)
107 _local_ke(i,
j) = (i == 0 ? -1 : 1) * (
j == 0 ? 0 : 1) *
_multi[nd] *
111 addJacobian(_assembly, _local_ke,
_ivardofs, ivardofs, _var.scalingFactor());
113 if (_has_diag_save_in)
115 unsigned int rows = _nnodes;
116 DenseVector<Real> diag(rows);
117 for (
unsigned int i = 0; i < rows; ++i)
118 diag(i) = _local_ke(i, i);
120 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
121 for (
unsigned int i = 0; i < _diag_save_in.size(); ++i)
123 std::vector<dof_id_type> diag_save_in_dofs(2);
124 diag_save_in_dofs[0] = _current_elem->node_ptr(nd)->dof_number(
125 _diag_save_in[i]->sys().number(), _diag_save_in[i]->number(), 0);
126 diag_save_in_dofs[1] =
127 _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])
128 ->dof_number(_diag_save_in[i]->sys().number(), _diag_save_in[i]->number(), 0);
130 _diag_save_in[i]->sys().solution().add_vector(diag, diag_save_in_dofs);
139 unsigned int jvar_num,
unsigned int coupled_component)
144 std::vector<RankTwoTensor> dSdT(_nnodes);
145 for (
unsigned int nd = 0; nd < _nnodes; ++nd)
149 for (
unsigned int i = 0; i < _nnodes; ++i)
150 for (
unsigned int j = 0;
j < _nnodes; ++
j)
151 _local_ke(i,
j) += (i == 0 ? -1 : 1) *
_multi[
j] *
159 std::vector<RankTwoTensor> dSdE33(_nnodes);
160 for (
unsigned int nd = 0; nd < _nnodes; ++nd)
161 for (
unsigned int i = 0; i < 3; ++i)
162 for (
unsigned int j = 0;
j < 3; ++
j)
165 for (
unsigned int i = 0; i < _nnodes; ++i)
166 for (
unsigned int j = 0;
j < _nnodes; ++
j)
167 _local_ke(i,
j) += (i == 0 ? -1 : 1) *
_multi[
j] *
175 for (
unsigned int i = 0; i < _nnodes; ++i)
176 for (
unsigned int j = 0;
j < _nnodes; ++
j)
178 (i == 0 ? -1 : 1) *
_multi[
j] *
180 _origin_vec * _bond_status;
186 unsigned int jvar_num,
unsigned int coupled_component)
198 for (
unsigned int nd = 0; nd < _nnodes; ++nd)
202 std::vector<dof_id_type> jvardofs(_nnodes);
203 jvardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), jvar_num, 0);
204 std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
205 std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
208 std::find(neighbors.begin(), neighbors.end(), _current_elem->node_id(1 - nd)) -
210 std::vector<dof_id_type> dg_neighbors =
211 _pdmesh.getBondDeformationGradientNeighbors(_current_elem->node_id(nd), nb_index);
217 for (
unsigned int nb = 0; nb < dg_neighbors.size(); ++nb)
218 if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[dg_neighbors[nb]])) > 0.5)
221 _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])->dof_number(_sys.number(), jvar_num, 0);
222 vol_nb = _pdmesh.getNodeVolume(neighbors[dg_neighbors[nb]]);
224 origin_vec_nb = _pdmesh.getNodeCoord(neighbors[dg_neighbors[nb]]) -
225 _pdmesh.getNodeCoord(_current_elem->node_id(nd));
228 for (
unsigned int i = 0; i < _dim; ++i)
229 dFdUk(coupled_component, i) =
230 _horizon_radius[nd] / origin_vec_nb.
norm() * origin_vec_nb(i) * vol_nb;
232 dFdUk *=
_shape2[nd].inverse();
236 for (
unsigned int i = 0; i < _nnodes; ++i)
237 for (
unsigned int j = 0;
j < _nnodes; ++
j)
238 _local_ke(i,
j) = (i == 0 ? -1 : 1) * (
j == 0 ? 0 : 1) *
_multi[nd] *
242 addJacobian(_assembly, _local_ke,
_ivardofs, jvardofs, _var.scalingFactor());
const bool _temp_coupled
Temperature variable.
virtual RankTwoTensor computeDSDU(unsigned int component, unsigned int nd)
Function to compute derivative of stress with respect to displacements for small strain problems...
auto norm() const -> decltype(std::norm(Real()))
const MaterialProperty< RankFourTensor > & _Jacobian_mult
unsigned int number() const
const MaterialProperty< RankTwoTensor > & _stress
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
static InputParameters validParams()
MooseVariable * _out_of_plane_strain_var
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MooseVariable * _temp_var
void ErrorVector unsigned int
Base kernel class for bond-associated correspondence material models.