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 "GBEvolution.h" 11 : 12 : registerMooseObject("PhaseFieldApp", GBEvolution); 13 : registerMooseObject("PhaseFieldApp", ADGBEvolution); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 3520 : GBEvolutionTempl<is_ad>::validParams() 18 : { 19 3520 : InputParameters params = GBEvolutionBaseTempl<is_ad>::validParams(); 20 7040 : params.addRequiredParam<Real>("GBenergy", "Grain boundary energy in J/m^2"); 21 3520 : return params; 22 0 : } 23 : 24 : template <bool is_ad> 25 2709 : GBEvolutionTempl<is_ad>::GBEvolutionTempl(const InputParameters & parameters) 26 5418 : : GBEvolutionBaseTempl<is_ad>(parameters), _GBEnergy(this->template getParam<Real>("GBenergy")) 27 : { 28 2709 : } 29 : 30 : template <bool is_ad> 31 : void 32 118526288 : GBEvolutionTempl<is_ad>::computeQpProperties() 33 : { 34 : // eV/nm^2 35 118526288 : this->_sigma[this->_qp] = _GBEnergy * this->_JtoeV * (this->_length_scale * this->_length_scale); 36 : 37 118526288 : GBEvolutionBaseTempl<is_ad>::computeQpProperties(); 38 118526288 : } 39 : 40 : template class GBEvolutionTempl<false>; 41 : template class GBEvolutionTempl<true>;