https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PeridynamicsKernelBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "Kernel.h"
13#include "Assembly.h"
14#include "SystemBase.h"
15#include "PeridynamicsMesh.h"
16
21{
22public:
24
26
27 virtual void computeResidual() override;
28 virtual void computeJacobian() override;
29 virtual Real computeQpResidual() override { return 0.0; }
30
31protected:
35 virtual void computeLocalResidual() = 0;
36
40 virtual void computeNonlocalResidual() {}
41
45 virtual void computeLocalJacobian() {}
46
50 virtual void prepare();
51
54
57
60 const unsigned int _dim;
61 const unsigned int _nnodes;
62 std::vector<Real> _node_vol;
63 std::vector<Real> _dg_vol_frac;
64 std::vector<Real> _horizon_radius;
65 std::vector<Real> _horizon_vol;
67
69 RealGradient _origin_vec;
70
73};
const InputParameters & parameters() const
Base kernel class for peridynamic models.
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
virtual Real computeQpResidual() override
std::vector< Real > _horizon_radius
Real _bond_status
Bond status of current bond/edge2.
std::vector< Real > _horizon_vol
Peridynamics mesh class.