www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
NodalRankTwoComponentPD Class Reference

Userobject class to compute the component values for rank two tensor at individual material point. More...

#include <NodalRankTwoComponentPD.h>

Inheritance diagram for NodalRankTwoComponentPD:
[legend]

Public Member Functions

 NodalRankTwoComponentPD (const InputParameters &parameters)
 
virtual void gatherWeightedValue (unsigned int id, dof_id_type dof, Real dg_vol_frac) override
 Function to gather bond-associated quantities to each material point. More...
 
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 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...
 
const unsigned int _i
 Component indices. More...
 
const unsigned int _j
 

Detailed Description

Userobject class to compute the component values for rank two tensor at individual material point.

Definition at line 22 of file NodalRankTwoComponentPD.h.

Constructor & Destructor Documentation

◆ NodalRankTwoComponentPD()

NodalRankTwoComponentPD::NodalRankTwoComponentPD ( const InputParameters &  parameters)

Definition at line 37 of file NodalRankTwoComponentPD.C.

38  : NodalRankTwoUserObjectBasePD(parameters),
39  _i(getParam<unsigned int>("index_i")),
40  _j(getParam<unsigned int>("index_j"))
41 {
42 }

Member Function Documentation

◆ computeValue()

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

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()

void NodalRankTwoComponentPD::gatherWeightedValue ( unsigned int  id,
dof_id_type  dof,
Real  dg_vol_frac 
)
overridevirtual

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)

Implements NodalRankTwoUserObjectBasePD.

Definition at line 45 of file NodalRankTwoComponentPD.C.

46 {
47  _aux_sln.add(dof, _tensor[id](_i, _j) * dg_vol_frac);
48 }

◆ 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

◆ _i

const unsigned int NodalRankTwoComponentPD::_i
protected

Component indices.

Definition at line 31 of file NodalRankTwoComponentPD.h.

Referenced by gatherWeightedValue().

◆ _j

const unsigned int NodalRankTwoComponentPD::_j
protected

Definition at line 32 of file NodalRankTwoComponentPD.h.

Referenced by gatherWeightedValue().

◆ _pdmesh

PeridynamicsMesh& ElementUserObjectBasePD::_pdmesh
protectedinherited

◆ _tensor

const MaterialProperty<RankTwoTensor>& NodalRankTwoUserObjectBasePD::_tensor
protectedinherited

Material properties tensor.

Definition at line 41 of file NodalRankTwoUserObjectBasePD.h.

Referenced by 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
NodalRankTwoComponentPD::_j
const unsigned int _j
Definition: NodalRankTwoComponentPD.h:32
NodalRankTwoComponentPD::_i
const unsigned int _i
Component indices.
Definition: NodalRankTwoComponentPD.h:31
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::NodalRankTwoUserObjectBasePD
NodalRankTwoUserObjectBasePD(const InputParameters &parameters)
Definition: NodalRankTwoUserObjectBasePD.C:32
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