https://mooseframework.inl.gov
NodalRankTwoComponentPD.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 #include "RankTwoTensor.h"
12 #include "AuxiliarySystem.h"
13 
15 
18 {
20  params.addClassDescription(
21  "Class for calculating components of nodal rank-two stress and strain tensors "
22  "from material properties (stress and strain) for edge elements (i.e., "
23  "bonds) connected at that node. NOTE: This UserObject only applies to the NOSPD model.");
24 
25  params.addRequiredRangeCheckedParam<unsigned int>(
26  "index_i",
27  "index_i >= 0 & index_i <= 2",
28  "The index i of ij for the tensor to output (0, 1, 2)");
29  params.addRequiredRangeCheckedParam<unsigned int>(
30  "index_j",
31  "index_j >= 0 & index_j <= 2",
32  "The index j of ij for the tensor to output (0, 1, 2)");
33 
34  return params;
35 }
36 
38  : NodalRankTwoUserObjectBasePD(parameters),
39  _i(getParam<unsigned int>("index_i")),
40  _j(getParam<unsigned int>("index_j"))
41 {
42 }
43 
44 void
45 NodalRankTwoComponentPD::gatherWeightedValue(unsigned int id, dof_id_type dof, Real dg_vol_frac)
46 {
47  _aux.solution().add(dof, _tensor[id](_i, _j) * dg_vol_frac);
48 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
NumericVector< Number > & solution()
const MaterialProperty< RankTwoTensor > & _tensor
Material properties tensor.
Base userobject class for rank two tensor at individual material point.
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.
const unsigned int _i
Component indices.
static InputParameters validParams()
registerMooseObject("PeridynamicsApp", NodalRankTwoComponentPD)
Userobject class to compute the component values for rank two tensor at individual material point...
void addClassDescription(const std::string &doc_string)
AuxiliarySystem & _aux
Reference to auxiliary system.
NodalRankTwoComponentPD(const InputParameters &parameters)
virtual void add(const numeric_index_type i, const Number value)=0
void ErrorVector unsigned int
uint8_t dof_id_type