Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.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 "ADPrefactorLaplacianSplit.h" 11 : 12 : registerMooseObject("PhaseFieldApp", ADPrefactorLaplacianSplit); 13 : 14 : InputParameters 15 839 : ADPrefactorLaplacianSplit::validParams() 16 : { 17 839 : InputParameters params = ADLaplacianSplit::validParams(); 18 839 : params.addClassDescription("Laplacian split with a prefactor."); 19 1678 : params.addRequiredParam<Real>("prefactor", "prefactor of the Laplacian operator"); 20 1678 : params.addParam<MaterialPropertyName>("density_value", "1.0", "density of the fluid mixture"); 21 839 : return params; 22 0 : } 23 : 24 444 : ADPrefactorLaplacianSplit::ADPrefactorLaplacianSplit(const InputParameters & parameters) 25 : : ADLaplacianSplit(parameters), 26 444 : _prefactor(getParam<Real>("prefactor")), 27 1332 : _rho_val(getADMaterialProperty<Real>("density_value")) 28 : { 29 444 : } 30 : 31 : ADRealGradient 32 45220220 : ADPrefactorLaplacianSplit::precomputeQpResidual() 33 : { 34 45220220 : return (_prefactor / _rho_val[_qp]) * ADLaplacianSplit::precomputeQpResidual(); 35 : }