LCOV - code coverage report
Current view: top level - src/interfacekernels - InterfaceDiffusionBoundaryTerm.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #32971 (54bef8) with base c6cf66 Lines: 19 22 86.4 %
Date: 2026-05-29 20:38:39 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 "InterfaceDiffusionBoundaryTerm.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", InterfaceDiffusionBoundaryTerm);
      13             : 
      14             : InputParameters
      15          30 : InterfaceDiffusionBoundaryTerm::validParams()
      16             : {
      17          30 :   InputParameters params = InterfaceDiffusionBase::validParams();
      18          30 :   params.addClassDescription("Add weak form surface terms of the Diffusion equation for two "
      19             :                              "different variables across a subdomain boundary");
      20          30 :   return params;
      21           0 : }
      22             : 
      23          16 : InterfaceDiffusionBoundaryTerm::InterfaceDiffusionBoundaryTerm(const InputParameters & parameters)
      24          16 :   : InterfaceDiffusionBase(parameters)
      25             : {
      26          16 : }
      27             : 
      28             : Real
      29      244000 : InterfaceDiffusionBoundaryTerm::computeQpResidual(Moose::DGResidualType type)
      30             : {
      31             :   // add weak form surface terms for the diffusion equation
      32      244000 :   switch (type)
      33             :   {
      34      122000 :     case Moose::Element:
      35      122000 :       return -_D * _grad_u[_qp] * _normals[_qp] * _test[_i][_qp];
      36             : 
      37      122000 :     case Moose::Neighbor:
      38      122000 :       return -_D_neighbor * _grad_neighbor_value[_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
      39             :   }
      40             : 
      41           0 :   mooseError("Internal error.");
      42             : }
      43             : 
      44             : Real
      45      170240 : InterfaceDiffusionBoundaryTerm::computeQpJacobian(Moose::DGJacobianType type)
      46             : {
      47      170240 :   switch (type)
      48             :   {
      49       52480 :     case Moose::ElementElement:
      50       52480 :       return -_D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
      51             : 
      52       52480 :     case Moose::NeighborNeighbor:
      53       52480 :       return -_D_neighbor * _grad_phi_neighbor[_j][_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
      54             : 
      55             :     case Moose::ElementNeighbor:
      56             :       return 0.0;
      57             : 
      58             :     case Moose::NeighborElement:
      59             :       return 0.0;
      60             :   }
      61             : 
      62           0 :   mooseError("Internal error.");
      63             : }

Generated by: LCOV version 1.14