https://mooseframework.inl.gov
PeridynamicsMaterialBase.C
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 
11 
14 {
16  params.addClassDescription("Base class for peridynamics material models");
17 
18  return params;
19 }
20 
22  : Material(parameters),
23  _pdmesh(dynamic_cast<PeridynamicsMesh &>(_mesh)),
24  _dim(_pdmesh.dimension()),
25  _nnodes(2),
26  _horizon_radius(_nnodes),
27  _node_vol(_nnodes),
28  _horizon_vol(_nnodes)
29 {
30 }
31 
32 void
34 {
35  for (unsigned int nd = 0; nd < _nnodes; ++nd)
36  {
37  _horizon_radius[nd] = _pdmesh.getHorizon(_current_elem->node_id(nd));
38  _node_vol[nd] = _pdmesh.getNodeVolume(_current_elem->node_id(nd));
40  }
41 
43  _pdmesh.getNodeCoord(_current_elem->node_id(0));
44 }
PeridynamicsMesh & _pdmesh
Mesh related information for material points of current bond/element.
Peridynamics mesh class.
std::vector< Real > _horizon_radius
static InputParameters validParams()
Real getHorizonVolume(dof_id_type node_id)
Function to return summation of neighbor nodal volumes for node node_id.
PeridynamicsMaterialBase(const InputParameters &parameters)
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
void setupMeshRelatedData()
Function to setup mesh related data to be used in this class.
Point getNodeCoord(dof_id_type node_id)
Function to return coordinates for node node_id.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
const Elem *const & _current_elem
Real getHorizon(dof_id_type node_id)
Function to return horizon size.