Line data Source code
1 : //* This file is part of the RACCOON application 2 : //* being developed at Dolbow lab at Duke University 3 : //* http://dolbow.pratt.duke.edu 4 : 5 : #include "ADPFFSource.h" 6 : 7 : registerMooseObject("raccoonApp", ADPFFSource); 8 : 9 : InputParameters 10 190 : ADPFFSource::validParams() 11 : { 12 190 : InputParameters params = ADKernelValue::validParams(); 13 190 : params.addClassDescription("The source term in the phase-field evolution equation. The weak form " 14 : "is $(w, \\dfrac{\\partial \\psi}{\\partial d})$."); 15 380 : params.addParam<MaterialPropertyName>("free_energy", 16 : "psi" 17 : "The Helmholtz free energy"); 18 190 : return params; 19 0 : } 20 : 21 26 : ADPFFSource::ADPFFSource(const InputParameters & parameters) 22 : : ADKernelValue(parameters), 23 : DerivativeMaterialPropertyNameInterface(), 24 52 : _psi_name(getParam<MaterialPropertyName>("free_energy")), 25 78 : _dpsi_dd(getADMaterialProperty<Real>(derivativePropertyNameFirst(_psi_name, _var.name()))) 26 : { 27 26 : } 28 : 29 : ADReal 30 8164740 : ADPFFSource::precomputeQpResidual() 31 : { 32 8164740 : return _dpsi_dd[_qp]; 33 : }