LCOV - code coverage report
Current view: top level - src/kernels - ADSplitCHCRes.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 15 16 93.8 %
Date: 2025-09-04 07:55:36 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://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 "ADSplitCHCRes.h"
      11             : 
      12             : InputParameters
      13          55 : ADSplitCHCRes::validParams()
      14             : {
      15          55 :   InputParameters params = ADSplitCHBase::validParams();
      16          55 :   params.addClassDescription("Split formulation Cahn-Hilliard Kernel");
      17         110 :   params.addRequiredCoupledVar("w", "Chemical potential variable");
      18         110 :   params.addRequiredParam<MaterialPropertyName>("kappa_name", "The kappa used with the kernel");
      19          55 :   return params;
      20           0 : }
      21             : 
      22          29 : ADSplitCHCRes::ADSplitCHCRes(const InputParameters & parameters)
      23             :   : ADSplitCHBase(parameters),
      24          29 :     _kappa(getADMaterialProperty<Real>("kappa_name")),
      25          58 :     _w(adCoupledValue("w"))
      26             : {
      27          29 : }
      28             : 
      29             : ADReal
      30    11904000 : ADSplitCHCRes::computeQpResidual()
      31             : {
      32    11904000 :   auto residual = ADSplitCHBase::computeQpResidual();
      33             : 
      34    23808000 :   residual += -_w[_qp] * _test[_i][_qp];
      35    11904000 :   residual += _kappa[_qp] * _grad_u[_qp] * _grad_test[_i][_qp];
      36             : 
      37    11904000 :   return residual;
      38             : }

Generated by: LCOV version 1.14