LCOV - code coverage report
Current view: top level - src/kernels - ADPrefactorLaplacianSplit.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31706 (f8ed4a) with base bb0a08 Lines: 12 13 92.3 %
Date: 2025-11-03 17:26:54 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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             : }

Generated by: LCOV version 1.14