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)
68 "PeridynamicsKernelBase is designed to only work with EDGE2 elements");
73 for (
unsigned int i = 0; i <
_save_in.size(); ++i)
94 for (
unsigned int i = 0; i < rows; ++i)
static InputParameters validParams()
virtual void zero() override final
void accumulateTaggedLocalResidual()
std::vector< Real > _node_vol
std::vector< MooseVariableFEBase *> _save_in
Real _bond_status
Bond status of current bond/edge2.
virtual void zero() override final
unsigned int number() const
virtual void computeNonlocalResidual()
Function to compute nonlocal contribution to the residual at the current nodes.
const unsigned int _nnodes
std::vector< Real > _horizon_radius
std::vector< Real > _dg_vol_frac
virtual void computeNonlocalJacobian()
DenseMatrix< Number > _local_ke
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.
virtual void computeLocalJacobian()
Function to compute local contribution to the diagonal Jacobian at the current nodes.
OutputData getElementalValue(const Elem *elem, unsigned int idx=0) const
PeridynamicsKernelBase(const InputParameters ¶meters)
Real getHorizonVolume(dof_id_type node_id)
Function to return summation of neighbor nodal volumes for node node_id.
std::vector< MooseVariableFEBase *> _diag_save_in
static InputParameters validParams()
const bool _use_full_jacobian
Option to use full jacobian including nonlocal constribution or not.
virtual void computeLocalResidual()=0
Function to compute local contribution to the residual at the current nodes.
void accumulateTaggedLocalMatrix()
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 getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
virtual void prepare()
Function to precalculate data which will be used in the derived classes.
virtual void computeJacobian() override
Point getNodeCoord(dof_id_type node_id)
Function to return coordinates for node node_id.
DenseVector< Number > _local_re
std::vector< Real > _horizon_vol
virtual unsigned int size() const override final
RealGradient _origin_vec
Vector for current bond under undefored configuration.
const Elem *const & _current_elem
MooseVariable * _bond_status_var
Bond_status variable.
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
virtual void computeResidual() override
Real getHorizon(dof_id_type node_id)
Function to return horizon size.
PeridynamicsMesh & _pdmesh
Parameters for peridynamic mesh information.