LCOV - code coverage report
Current view: top level - src/interfacekernels - InterfaceDiffusionBoundaryTerm.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 19 22 86.4 %
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 "InterfaceDiffusionBoundaryTerm.h"
      11             : 
      12             : registerMooseObject("PhaseFieldApp", InterfaceDiffusionBoundaryTerm);
      13             : 
      14             : InputParameters
      15          46 : InterfaceDiffusionBoundaryTerm::validParams()
      16             : {
      17          46 :   InputParameters params = InterfaceDiffusionBase::validParams();
      18          46 :   params.addClassDescription("Add weak form surface terms of the Diffusion equation for two "
      19             :                              "different variables across a subdomain boundary");
      20          46 :   return params;
      21           0 : }
      22             : 
      23          24 : InterfaceDiffusionBoundaryTerm::InterfaceDiffusionBoundaryTerm(const InputParameters & parameters)
      24          24 :   : InterfaceDiffusionBase(parameters)
      25             : {
      26          24 : }
      27             : 
      28             : Real
      29      304800 : InterfaceDiffusionBoundaryTerm::computeQpResidual(Moose::DGResidualType type)
      30             : {
      31             :   // add weak form surface terms for the diffusion equation
      32      304800 :   switch (type)
      33             :   {
      34      152400 :     case Moose::Element:
      35      152400 :       return -_D * _grad_u[_qp] * _normals[_qp] * _test[_i][_qp];
      36             : 
      37      152400 :     case Moose::Neighbor:
      38      152400 :       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      203520 : InterfaceDiffusionBoundaryTerm::computeQpJacobian(Moose::DGJacobianType type)
      46             : {
      47      203520 :   switch (type)
      48             :   {
      49       62720 :     case Moose::ElementElement:
      50       62720 :       return -_D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
      51             : 
      52       62720 :     case Moose::NeighborNeighbor:
      53       62720 :       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