11 #include "MooseVariable.h"
18 params.addClassDescription(
"Base class for Peridynamic mechanic materials");
20 params.addRequiredCoupledVar(
"displacements",
"Nonlinear variable name for the displacements");
21 params.addCoupledVar(
"temperature",
"Nonlinear variable name for the temperature");
28 _has_temp(isCoupled(
"temperature")),
29 _temp_var(_has_temp ? getVar(
"temperature", 0) : nullptr),
30 _bond_status_var(&_subproblem.getStandardVariable(_tid,
"bond_status")),
31 _total_stretch(declareProperty<Real>(
"total_stretch")),
32 _mechanical_stretch(declareProperty<Real>(
"mechanical_stretch"))
34 if (
_dim != coupledComponents(
"displacements"))
35 mooseError(
"Size of displacements vector is different from the mesh dimension!");
37 for (
unsigned int i = 0; i < coupledComponents(
"displacements"); ++i)
38 _disp_var.push_back(getVar(
"displacements", i));
47 for (
unsigned int i = 0; i <
_dim; ++i)
50 _disp_var[i]->getNodalValue(*_current_elem->node_ptr(1));
52 _disp_var[i]->getNodalValue(*_current_elem->node_ptr(0));