https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeneralizedPlaneStrainUserObjectBasePD.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 "RankFourTensor.h"
12
15{
17 params.addClassDescription("Base class for calculating the scalar residual and diagonal Jacobian "
18 "entry for generalized plane strain formulation");
19
20 MooseEnum strainType("SMALL", "SMALL");
21 params.addParam<MooseEnum>("strain", strainType, "Strain formulation");
22 params.addParam<FunctionName>(
23 "out_of_plane_pressure",
24 "0",
25 "Function used to prescribe pressure in the out-of-plane direction");
26 params.addParam<Real>("factor", 1.0, "Scale factor applied to prescribed pressure");
27 params.set<ExecFlagEnum>("execute_on") = EXEC_LINEAR;
28
29 return params;
30}
31
33 const InputParameters & parameters)
34 : ElementUserObjectBasePD(parameters),
35 _strain(getParam<MooseEnum>("strain")),
36 _Cijkl(getMaterialProperty<RankFourTensor>("elasticity_tensor")),
37 _pressure(getFunction("out_of_plane_pressure")),
38 _factor(getParam<Real>("factor"))
39{
40}
41
42void
48
49void
51{
52 const auto & gpsuo = static_cast<const GeneralizedPlaneStrainUserObjectBasePD &>(uo);
53 _residual += gpsuo._residual;
54 _jacobian += gpsuo._jacobian;
55}
56
57void
63
64Real
69
70Real
const ExecFlagType EXEC_LINEAR
Base element userobject class for peridynamics.
static InputParameters validParams()
Base userObject class to compute the residual and diagonal Jacobian components for scalar out-of-plan...
virtual void threadJoin(const UserObject &uo) override
Real returnJacobian() const
Function to return the computed diagonal Jacobian.
Real returnResidual() const
Function to return the computed residual.
GeneralizedPlaneStrainUserObjectBasePD(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void gatherSum(T &value)