www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NodalRankTwoUserObjectBasePD Class Referenceabstract

Base userobject class for rank two tensor at individual material point. More...

#include <NodalRankTwoUserObjectBasePD.h>

Inheritance diagram for NodalRankTwoUserObjectBasePD:
[legend]

Public Member Functions

 NodalRankTwoUserObjectBasePD (const InputParameters &parameters)
 
virtual void computeValue (unsigned int id, dof_id_type dof) override
 Function to assemble elemental quantities to nodal AuxVariable at a material point. More...
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void threadJoin (const UserObject &) override
 
virtual void finalize () override
 

Protected Member Functions

virtual void gatherWeightedValue (unsigned int id, dof_id_type dof, Real dg_vol_frac)=0
 Function to gather bond-associated quantities to each material point. More...
 

Protected Attributes

const MaterialProperty< RankTwoTensor > & _tensor
 Material properties tensor. More...
 
MooseVariable * _var
 Pointer to the aux variable this userobject operates on. More...
 
MooseVariable * _bond_status_var
 Bond status aux variable. More...
 
AuxiliarySystem & _aux
 Reference to auxiliary system. More...
 
NumericVector< Number > & _aux_sln
 Solution vector for aux variables. More...
 
PeridynamicsMesh_pdmesh
 Reference to Peridynamic mesh. More...
 

Detailed Description

Base userobject class for rank two tensor at individual material point.

Definition at line 22 of file NodalRankTwoUserObjectBasePD.h.

Constructor & Destructor Documentation

◆ NodalRankTwoUserObjectBasePD()

NodalRankTwoUserObjectBasePD::NodalRankTwoUserObjectBasePD ( const InputParameters &  parameters)

Definition at line 32 of file NodalRankTwoUserObjectBasePD.C.

34  _tensor(getMaterialProperty<RankTwoTensor>("rank_two_tensor"))
35 {
36 }

Member Function Documentation

◆ computeValue()

void NodalRankTwoUserObjectBasePD::computeValue ( unsigned int  id,
dof_id_type  dof 
)
overridevirtual

Function to assemble elemental quantities to nodal AuxVariable at a material point.

Parameters
idThe local index of element node (either 1 or 2 for Edge2 element)
dofThe global DOF of element node
Returns
The computed value for the node

Implements NodalAuxVariableUserObjectBasePD.

Definition at line 39 of file NodalRankTwoUserObjectBasePD.C.

40 {
41  dof_id_type id_j_in_i =
42  _pdmesh.getNeighborIndex(_current_elem->node_id(id), _current_elem->node_id(1 - id));
43  Real dg_vol_frac = _pdmesh.getDefGradVolFraction(_current_elem->node_id(id), id_j_in_i);
44 
45  // gather volume weighted contribution only if the bond is active
46  if (_bond_status_var->getElementalValue(_current_elem) > 0.5)
47  gatherWeightedValue(id, dof, dg_vol_frac);
48 }

◆ execute()

void NodalAuxVariableUserObjectBasePD::execute ( )
overridevirtualinherited

Definition at line 43 of file NodalAuxVariableUserObjectBasePD.C.

44 {
45  for (unsigned int i = 0; i < 2; ++i)
46  {
47  dof_id_type dof = _current_elem->node_ptr(i)->dof_number(_aux.number(), _var->number(), 0);
48 
49  computeValue(i, dof);
50  }
51 }

◆ finalize()

void NodalAuxVariableUserObjectBasePD::finalize ( )
overridevirtualinherited

Definition at line 54 of file NodalAuxVariableUserObjectBasePD.C.

55 {
56  _aux_sln.close();
57 }

◆ gatherWeightedValue()

virtual void NodalRankTwoUserObjectBasePD::gatherWeightedValue ( unsigned int  id,
dof_id_type  dof,
Real  dg_vol_frac 
)
protectedpure virtual

Function to gather bond-associated quantities to each material point.

Parameters
idThe local index of element node (either 1 or 2 for Edge2 element)
dofThe global DOF of element node
dg_vol_fracvolume fraction of deformation gradient approximation to its summation at a node
Returns
What the function returns (if it returns anything)

Implemented in NodalRankTwoScalarPD, and NodalRankTwoComponentPD.

Referenced by computeValue().

◆ initialize()

void NodalAuxVariableUserObjectBasePD::initialize ( )
overridevirtualinherited

Definition at line 35 of file NodalAuxVariableUserObjectBasePD.C.

36 {
37  std::vector<std::string> zero_vars;
38  zero_vars.push_back(_var->name());
39  _aux.zeroVariables(zero_vars);
40 }

◆ threadJoin()

virtual void NodalAuxVariableUserObjectBasePD::threadJoin ( const UserObject &  )
inlineoverridevirtualinherited

Definition at line 30 of file NodalAuxVariableUserObjectBasePD.h.

30 {};

Member Data Documentation

◆ _aux

AuxiliarySystem& ElementUserObjectBasePD::_aux
protectedinherited

Reference to auxiliary system.

Definition at line 33 of file ElementUserObjectBasePD.h.

Referenced by NodalAuxVariableUserObjectBasePD::execute(), and NodalAuxVariableUserObjectBasePD::initialize().

◆ _aux_sln

NumericVector<Number>& ElementUserObjectBasePD::_aux_sln
protectedinherited

◆ _bond_status_var

MooseVariable* ElementUserObjectBasePD::_bond_status_var
protectedinherited

Bond status aux variable.

Definition at line 30 of file ElementUserObjectBasePD.h.

Referenced by computeValue(), NodalNumIntactBondsPD::computeValue(), and NodalDamageIndexPD::computeValue().

◆ _pdmesh

PeridynamicsMesh& ElementUserObjectBasePD::_pdmesh
protectedinherited

◆ _tensor

const MaterialProperty<RankTwoTensor>& NodalRankTwoUserObjectBasePD::_tensor
protected

Material properties tensor.

Definition at line 41 of file NodalRankTwoUserObjectBasePD.h.

Referenced by NodalRankTwoComponentPD::gatherWeightedValue(), and NodalRankTwoScalarPD::gatherWeightedValue().

◆ _var

MooseVariable* NodalAuxVariableUserObjectBasePD::_var
protectedinherited

Pointer to the aux variable this userobject operates on.

Definition at line 43 of file NodalAuxVariableUserObjectBasePD.h.

Referenced by NodalAuxVariableUserObjectBasePD::execute(), and NodalAuxVariableUserObjectBasePD::initialize().


The documentation for this class was generated from the following files:
ElementUserObjectBasePD::_aux
AuxiliarySystem & _aux
Reference to auxiliary system.
Definition: ElementUserObjectBasePD.h:33
NodalAuxVariableUserObjectBasePD::NodalAuxVariableUserObjectBasePD
NodalAuxVariableUserObjectBasePD(const InputParameters &parameters)
Definition: NodalAuxVariableUserObjectBasePD.C:28
NodalAuxVariableUserObjectBasePD::computeValue
virtual void computeValue(unsigned int id, dof_id_type dof)=0
Function to assemble elemental quantities to nodal AuxVariable at a material point.
NodalAuxVariableUserObjectBasePD::_var
MooseVariable * _var
Pointer to the aux variable this userobject operates on.
Definition: NodalAuxVariableUserObjectBasePD.h:43
PeridynamicsMesh::getNeighborIndex
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.
Definition: PeridynamicsMesh.C:368
NodalRankTwoUserObjectBasePD::gatherWeightedValue
virtual void gatherWeightedValue(unsigned int id, dof_id_type dof, Real dg_vol_frac)=0
Function to gather bond-associated quantities to each material point.
NodalRankTwoUserObjectBasePD::_tensor
const MaterialProperty< RankTwoTensor > & _tensor
Material properties tensor.
Definition: NodalRankTwoUserObjectBasePD.h:41
ElementUserObjectBasePD::_bond_status_var
MooseVariable * _bond_status_var
Bond status aux variable.
Definition: ElementUserObjectBasePD.h:30
ElementUserObjectBasePD::_aux_sln
NumericVector< Number > & _aux_sln
Solution vector for aux variables.
Definition: ElementUserObjectBasePD.h:36
ElementUserObjectBasePD::_pdmesh
PeridynamicsMesh & _pdmesh
Reference to Peridynamic mesh.
Definition: ElementUserObjectBasePD.h:39
PeridynamicsMesh::getDefGradVolFraction
Real getDefGradVolFraction(dof_id_type node_id, dof_id_type neighbor_id)
Function to return summation of volumes of bond-associated neighbors used in the deformation gradient...
Definition: PeridynamicsMesh.C:453