www.mooseframework.org
StressUpdateBase.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 
10 #include "StressUpdateBase.h"
11 
12 #include "MooseMesh.h"
13 
15 
16 InputParameters
18 {
19  InputParameters params = Material::validParams();
20  params.addClassDescription("Calculates an admissible state (stress that lies on or within the "
21  "yield surface, plastic strains, internal parameters, etc). This "
22  "class is intended to be a parent class for classes with specific "
23  "constitutive models.");
24  params.addParam<std::string>(
25  "base_name",
26  "Optional parameter that defines a prefix for all material "
27  "properties related to this stress update model. This allows for "
28  "multiple models of the same type to be used without naming conflicts.");
29  // The return stress increment classes are intended to be iterative materials, so must set compute
30  // = false for all inheriting classes
31  params.set<bool>("compute") = false;
32  params.suppressParameter<bool>("compute");
33  return params;
34 }
35 
36 StressUpdateBase::StressUpdateBase(const InputParameters & parameters)
37  : Material(parameters),
38  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : "")
39 {
40 }
41 
42 void
43 StressUpdateBase::setQp(unsigned int qp)
44 {
45  _qp = qp;
46 }
47 
48 void
50 {
51  mooseError(
52  "propagateQpStatefulProperties called: it needs to be implemented by your inelastic model");
53 }
54 
55 Real
57 {
58  return std::numeric_limits<Real>::max();
59 }
StressUpdateBase::setQp
void setQp(unsigned int qp)
Sets the value of the global variable _qp for inheriting classes.
Definition: StressUpdateBase.C:43
StressUpdateBase::propagateQpStatefulProperties
virtual void propagateQpStatefulProperties()
If updateState is not called during a timestep, this will be.
Definition: StressUpdateBase.C:49
StressUpdateBase::StressUpdateBase
StressUpdateBase(const InputParameters &parameters)
Definition: StressUpdateBase.C:36
validParams
InputParameters validParams()
StressUpdateBase::computeTimeStepLimit
virtual Real computeTimeStepLimit()
Definition: StressUpdateBase.C:56
defineLegacyParams
defineLegacyParams(StressUpdateBase)
StressUpdateBase
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
Definition: StressUpdateBase.h:52
StressUpdateBase.h
StressUpdateBase::validParams
static InputParameters validParams()
Definition: StressUpdateBase.C:17