LCOV - code coverage report
Current view: top level - src/kernels - SimpleCoupledACInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 18 19 94.7 %
Date: 2025-09-04 07:55:36 Functions: 4 4 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 "SimpleCoupledACInterface.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", SimpleCoupledACInterface);
      13             : 
      14             : InputParameters
      15         138 : SimpleCoupledACInterface::validParams()
      16             : {
      17         138 :   InputParameters params = Kernel::validParams();
      18         138 :   params.addClassDescription("Gradient energy for Allen-Cahn Kernel with constant Mobility and "
      19             :                              "Interfacial parameter for a coupled order parameter variable.");
      20         276 :   params.addRequiredCoupledVar("v", "Coupled variable that the Laplacian is taken of");
      21         276 :   params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
      22         276 :   params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa used with the kernel");
      23         138 :   return params;
      24           0 : }
      25             : 
      26          72 : SimpleCoupledACInterface::SimpleCoupledACInterface(const InputParameters & parameters)
      27             :   : Kernel(parameters),
      28          72 :     _L(getMaterialProperty<Real>("mob_name")),
      29         144 :     _kappa(getMaterialProperty<Real>("kappa_name")),
      30          72 :     _grad_v(coupledGradient("v")),
      31         144 :     _v_var(coupled("v", 0))
      32             : {
      33          72 : }
      34             : 
      35             : Real
      36    17351520 : SimpleCoupledACInterface::computeQpResidual()
      37             : {
      38    17351520 :   return _grad_v[_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
      39             : }
      40             : 
      41             : Real
      42    35747200 : SimpleCoupledACInterface::computeQpOffDiagJacobian(unsigned int jvar)
      43             : {
      44    35747200 :   if (jvar == _v_var)
      45    10876800 :     return _grad_phi[_j][_qp] * _kappa[_qp] * _L[_qp] * _grad_test[_i][_qp];
      46             : 
      47             :   return 0.0;
      48             : }

Generated by: LCOV version 1.14