18 "Base class for calculating the residual and Jacobian for the peridynamic kernels");
20 params.
addParam<
bool>(
"full_jacobian",
22 "Whether to include coupling terms with nodes connected to neighbors in "
23 "the Jacobian matrix for state based formulations");
30 _bond_status_var(&_subproblem.getStandardVariable(_tid,
"bond_status")),
31 _use_full_jacobian(getParam<bool>(
"full_jacobian")),
33 _dim(_pdmesh.dimension()),
36 _dg_vol_frac(_nnodes),
37 _horizon_radius(_nnodes),
45 for (
unsigned int nd = 0; nd <
_nnodes; ++nd)
48 dof_id_type id_ji_in_ij =
68 "PeridynamicsKernelBase is designed to only work with EDGE2 elements");
73 for (
unsigned int i = 0; i <
_save_in.size(); ++i)
93 DenseVector<Number> diag(rows);
94 for (
unsigned int i = 0; i < rows; ++i)
std::vector< MooseVariableFEBase * > _save_in
const Elem *const & _current_elem
std::vector< MooseVariableFEBase * > _diag_save_in
static InputParameters validParams()
unsigned int number() const
DofValue getElementalValue(const Elem *elem, unsigned int idx=0) const
virtual void computeLocalResidual()=0
Function to compute local contribution to the residual at the current nodes.
virtual void computeLocalJacobian()
Function to compute local contribution to the diagonal Jacobian at the current nodes.
virtual void computeNonlocalResidual()
Function to compute nonlocal contribution to the residual at the current nodes.
static InputParameters validParams()
RealGradient _origin_vec
Vector for current bond under undefored configuration.
virtual void computeResidual() override
std::vector< Real > _node_vol
virtual void prepare()
Function to precalculate data which will be used in the derived classes.
MooseVariable * _bond_status_var
Bond_status variable.
PeridynamicsMesh & _pdmesh
Parameters for peridynamic mesh information.
const bool _use_full_jacobian
Option to use full jacobian including nonlocal constribution or not.
virtual void computeJacobian() override
std::vector< Real > _dg_vol_frac
const unsigned int _nnodes
PeridynamicsKernelBase(const InputParameters ¶meters)
std::vector< Real > _horizon_radius
Real _bond_status
Bond status of current bond/edge2.
std::vector< Real > _horizon_vol
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
Real getHorizonSubsetVolumeFraction(dof_id_type node_id, dof_id_type neighbor_id)
Function to return the volume fraction of a horizon subset used for bond-associated deformation gradi...
Real getHorizon(dof_id_type node_id)
Function to return horizon size.
Point getNodeCoord(dof_id_type node_id)
Function to return coordinates for node node_id.
dof_id_type getNeighborIndex(dof_id_type node_i, dof_id_type node_j)
Function to return the local neighbor index of node_j from node_i's neighbor list.
Real getHorizonVolume(dof_id_type node_id)
Function to return summation of neighbor nodal volumes for node node_id.
virtual void computeNonlocalJacobian()
DenseMatrix< Number > _local_ke
void accumulateTaggedLocalMatrix()
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
void accumulateTaggedLocalResidual()
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
DenseVector< Number > _local_re
virtual void zero() override final
virtual void zero() override final
virtual unsigned int size() const override final