Line data Source code
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 "CrystalPlasticitySlipResistanceGSS.h" 11 : 12 : registerMooseObject("TensorMechanicsApp", CrystalPlasticitySlipResistanceGSS); 13 : 14 : InputParameters 15 78 : CrystalPlasticitySlipResistanceGSS::validParams() 16 : { 17 78 : InputParameters params = CrystalPlasticitySlipResistance::validParams(); 18 156 : params.addParam<std::string>("uo_state_var_name", 19 : "Name of state variable property: Same as " 20 : "state variable user object specified in input " 21 : "file."); 22 78 : params.addClassDescription("Phenomenological constitutive models' slip resistance base class. " 23 : "Override the virtual functions in your class"); 24 78 : return params; 25 0 : } 26 : 27 39 : CrystalPlasticitySlipResistanceGSS::CrystalPlasticitySlipResistanceGSS( 28 39 : const InputParameters & parameters) 29 : : CrystalPlasticitySlipResistance(parameters), 30 39 : _mat_prop_state_var( 31 39 : getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_state_var_name"))) 32 : { 33 39 : } 34 : 35 : bool 36 349511 : CrystalPlasticitySlipResistanceGSS::calcSlipResistance(unsigned int qp, 37 : std::vector<Real> & val) const 38 : { 39 5133467 : for (unsigned int i = 0; i < _variable_size; ++i) 40 4783956 : val[i] = _mat_prop_state_var[qp][i]; 41 : 42 349511 : return true; 43 : }