www.mooseframework.org
NodalRankTwoComponentPD.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<NodalRankTwoUserObjectBasePD>();
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 SNOSPD 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 
37 NodalRankTwoComponentPD::NodalRankTwoComponentPD(const InputParameters & parameters)
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_sln.add(dof, _tensor[id](_i, _j) * dg_vol_frac);
48 }
NodalRankTwoComponentPD::gatherWeightedValue
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.
Definition: NodalRankTwoComponentPD.C:45
NodalRankTwoComponentPD::NodalRankTwoComponentPD
NodalRankTwoComponentPD(const InputParameters &parameters)
Definition: NodalRankTwoComponentPD.C:37
NodalRankTwoUserObjectBasePD
Base userobject class for rank two tensor at individual material point.
Definition: NodalRankTwoUserObjectBasePD.h:22
NodalRankTwoComponentPD
Userobject class to compute the component values for rank two tensor at individual material point.
Definition: NodalRankTwoComponentPD.h:22
validParams< NodalRankTwoComponentPD >
InputParameters validParams< NodalRankTwoComponentPD >()
Definition: NodalRankTwoComponentPD.C:17
NodalRankTwoComponentPD::_j
const unsigned int _j
Definition: NodalRankTwoComponentPD.h:32
NodalRankTwoComponentPD::_i
const unsigned int _i
Component indices.
Definition: NodalRankTwoComponentPD.h:31
registerMooseObject
registerMooseObject("PeridynamicsApp", NodalRankTwoComponentPD)
NodalRankTwoUserObjectBasePD::_tensor
const MaterialProperty< RankTwoTensor > & _tensor
Material properties tensor.
Definition: NodalRankTwoUserObjectBasePD.h:41
NodalRankTwoComponentPD.h
ElementUserObjectBasePD::_aux_sln
NumericVector< Number > & _aux_sln
Solution vector for aux variables.
Definition: ElementUserObjectBasePD.h:36
validParams< NodalRankTwoUserObjectBasePD >
InputParameters validParams< NodalRankTwoUserObjectBasePD >()
Definition: NodalRankTwoUserObjectBasePD.C:16