https://mooseframework.inl.gov
NodalDamageIndexPD.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 
10 #include "NodalDamageIndexPD.h"
11 #include "PeridynamicsMesh.h"
12 #include "AuxiliarySystem.h"
13 
14 registerMooseObject("PeridynamicsApp", NodalDamageIndexPD);
15 
18 {
20  params.addClassDescription("Class for computing damage index for each material point in "
21  "peridynamic fracture modeling and simulation");
22 
23  params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_TIMESTEP_END};
24 
25  return params;
26 }
27 
30 {
31 }
32 
33 void
35 {
36  Real neighbor_vol = _pdmesh.getNodeVolume(_current_elem->node_id(1 - id));
37  Real node_vol_sum = _pdmesh.getHorizonVolume(_current_elem->node_id(id));
38 
40  _aux.solution().add(dof, neighbor_vol / node_vol_sum);
41 }
NodalDamageIndexPD(const InputParameters &parameters)
NumericVector< Number > & solution()
PeridynamicsMesh & _pdmesh
Reference to Peridynamic mesh.
T & set(const std::string &name, bool quiet_mode=false)
UserObject class to compute damage index for each material point in PD fracture modeling and simulati...
const ExecFlagType EXEC_TIMESTEP_END
OutputData getElementalValue(const Elem *elem, unsigned int idx=0) const
static InputParameters validParams()
Real getHorizonVolume(dof_id_type node_id)
Function to return summation of neighbor nodal volumes for node node_id.
UserObject base class to compute nodal quantities stored as AuxVariable at a material point based on ...
MooseVariable * _bond_status_var
Bond status aux variable.
registerMooseObject("PeridynamicsApp", NodalDamageIndexPD)
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Elem *const & _current_elem
void addClassDescription(const std::string &doc_string)
AuxiliarySystem & _aux
Reference to auxiliary system.
virtual void add(const numeric_index_type i, const Number value)=0
uint8_t dof_id_type
virtual void computeValue(unsigned int id, dof_id_type dof) override
Function to assemble elemental quantities to nodal AuxVariable at a material point.
const ExecFlagType EXEC_INITIAL