Line data Source code
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 "CrystalPlasticitySlipResistanceGSS.h" 11 : 12 : registerMooseObject("SolidMechanicsApp", CrystalPlasticitySlipResistanceGSS); 13 : 14 : InputParameters 15 156 : CrystalPlasticitySlipResistanceGSS::validParams() 16 : { 17 156 : InputParameters params = CrystalPlasticitySlipResistance::validParams(); 18 312 : 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 156 : params.addClassDescription("Phenomenological constitutive models' slip resistance base class. " 23 : "Override the virtual functions in your class"); 24 156 : return params; 25 0 : } 26 : 27 78 : CrystalPlasticitySlipResistanceGSS::CrystalPlasticitySlipResistanceGSS( 28 78 : const InputParameters & parameters) 29 : : CrystalPlasticitySlipResistance(parameters), 30 78 : _mat_prop_state_var( 31 78 : getMaterialProperty<std::vector<Real>>(parameters.get<std::string>("uo_state_var_name"))) 32 : { 33 78 : } 34 : 35 : bool 36 634478 : CrystalPlasticitySlipResistanceGSS::calcSlipResistance(unsigned int qp, 37 : std::vector<Real> & val) const 38 : { 39 9381782 : for (unsigned int i = 0; i < _variable_size; ++i) 40 8747304 : val[i] = _mat_prop_state_var[qp][i]; 41 : 42 634478 : return true; 43 : }