LCOV - code coverage report
Current view: top level - src/kernels - LaplacianSplit.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: 5 5 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 "LaplacianSplit.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", LaplacianSplit);
      13             : 
      14             : InputParameters
      15          78 : LaplacianSplit::validParams()
      16             : {
      17          78 :   InputParameters params = KernelGrad::validParams();
      18          78 :   params.addClassDescription(
      19             :       "Split with a variable that holds the Laplacian of a phase field variable.");
      20         156 :   params.addRequiredCoupledVar("c", "Field variable to take the Laplacian of");
      21          78 :   return params;
      22           0 : }
      23             : 
      24          40 : LaplacianSplit::LaplacianSplit(const InputParameters & parameters)
      25          40 :   : KernelGrad(parameters), _var_c(coupled("c")), _grad_c(coupledGradient("c"))
      26             : {
      27          40 : }
      28             : 
      29             : RealGradient
      30     1077800 : LaplacianSplit::precomputeQpResidual()
      31             : {
      32     1077800 :   return _grad_c[_qp]; // * _grad_test[_i][_qp]
      33             : }
      34             : 
      35             : RealGradient
      36     3220800 : LaplacianSplit::precomputeQpJacobian()
      37             : {
      38     3220800 :   return 0.0;
      39             : }
      40             : 
      41             : Real
      42    12883200 : LaplacianSplit::computeQpOffDiagJacobian(unsigned int jvar)
      43             : {
      44    12883200 :   if (jvar == _var_c)
      45    12883200 :     return _grad_phi[_j][_qp] * _grad_test[_i][_qp];
      46             : 
      47             :   return 0.0;
      48             : }

Generated by: LCOV version 1.14