https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
32void
34{
35 for (unsigned int nd = 0; nd < _nnodes; ++nd)
36 {
38 _node_vol[nd] = _pdmesh.getNodeVolume(_current_elem->node_id(nd));
40 }
41
44}
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
const Elem *const & _current_elem
void setupMeshRelatedData()
Function to setup mesh related data to be used in this class.
static InputParameters validParams()
PeridynamicsMesh & _pdmesh
Mesh related information for material points of current bond/element.
PeridynamicsMaterialBase(const InputParameters &parameters)
Peridynamics mesh class.
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
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.
Real getHorizonVolume(dof_id_type node_id)
Function to return summation of neighbor nodal volumes for node node_id.