www.mooseframework.org
ComputeExtraStressConstant.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 
13 
16 {
18  params.addClassDescription("Computes a constant extra stress that is added to the stress "
19  "calculated by the constitutive model");
20  params.addRequiredParam<std::vector<Real>>("extra_stress_tensor",
21  "Vector of values defining the constant extra stress "
22  "to add, in order 11, 22, 33, 23, 13, 12");
23  params.addParam<MaterialPropertyName>(
24  "prefactor", 1.0, "Name of material property defining additional constant prefactor");
25  return params;
26 }
27 
29  : ComputeExtraStressBase(parameters), _prefactor(getMaterialProperty<Real>("prefactor"))
30 {
31  _extra_stress_tensor.fillFromInputVector(getParam<std::vector<Real>>("extra_stress_tensor"));
32 }
33 
34 void
36 {
38 }
registerMooseObject("SolidMechanicsApp", ComputeExtraStressConstant)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ComputeExtraStressBase is the base class for extra_stress, which is added to stress calculated by the...
const MaterialProperty< Real > & _prefactor
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
ComputeExtraStressConstant(const InputParameters &parameters)
void fillFromInputVector(const std::vector< Real > &input, FillMethod fill_method=autodetect)
static InputParameters validParams()
static InputParameters validParams()
const T & getParam(const std::string &name) const
Computes a constant extra stress that is added to the stress calculated by the constitutive model...
MaterialProperty< RankTwoTensor > & _extra_stress
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)