https://mooseframework.inl.gov
DamageBase.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 
10 #include "DamageBase.h"
11 
12 template <bool is_ad>
15 {
17  params.addClassDescription(
18  "Base class for damage models for use in conjunction with "
19  "ComputeMultipleInelasticStress. The damage model updates the "
20  "stress and Jacobian multiplier at the end of the stress computation.");
21  params.addParam<std::string>("base_name",
22  "Optional parameter that allows the user to define "
23  "multiple mechanics material systems on the same "
24  "block, i.e. for multiple phases");
25  // The damage materials are designed to be called by another model, and not
26  // called directly by MOOSE, so set compute=false.
27  params.set<bool>("compute") = false;
28  params.suppressParameter<bool>("compute");
29  return params;
30 }
31 
32 template <bool is_ad>
34  : Material(parameters),
35  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : "")
36 {
37 }
38 
39 template <bool is_ad>
40 void
42 {
43  _qp = qp;
44 }
45 
46 template <bool is_ad>
47 void
49 {
50 }
51 
52 template <bool is_ad>
53 Real
55 {
56  return std::numeric_limits<Real>::max();
57 }
58 
59 template <bool is_ad>
60 void
62  const GenericRankTwoTensor<is_ad> & /*rotation_increment*/)
63 {
64 }
65 
66 template class DamageBaseTempl<false>;
67 template class DamageBaseTempl<true>;
virtual void updateDamage()
Update the internal variable(s) that evolve the damage.
Definition: DamageBase.C:48
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void setQp(unsigned int qp)
Sets the value of the member variable _qp for use in inheriting classes.
Definition: DamageBase.C:41
void suppressParameter(const std::string &name)
static InputParameters validParams()
Definition: DamageBase.C:14
static InputParameters validParams()
virtual void finiteStrainRotation(const GenericRankTwoTensor< is_ad > &rotation_increment)
Perform any necessary rotation of internal variables for finite strain.
Definition: DamageBase.C:61
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
DamageBaseTempl(const InputParameters &parameters)
Definition: DamageBase.C:33
void addClassDescription(const std::string &doc_string)
virtual Real computeTimeStepLimit()
Compute the limiting value of the time step for this material.
Definition: DamageBase.C:54
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor