https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
44void
45NodalRankTwoComponentPD::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}
registerMooseObject("PeridynamicsApp", NodalRankTwoComponentPD)
void ErrorVector unsigned int
AuxiliarySystem & _aux
Reference to auxiliary system.
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Userobject class to compute the component values 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.
NodalRankTwoComponentPD(const InputParameters &parameters)
static InputParameters validParams()
Base userobject class for rank two tensor at individual material point.
const MaterialProperty< RankTwoTensor > & _tensor
Material properties tensor.
NumericVector< Number > & solution()
virtual void add(const numeric_index_type i, const T value)=0