LCOV - code coverage report
Current view: top level - include/raytracing - NeighborInfo.h (source / functions) Hit Total Coverage
Test: idaholab/moose ray_tracing: #31405 (292dce) with base fef103 Lines: 17 17 100.0 %
Date: 2025-09-04 07:56:07 Functions: 2 2 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             : #pragma once
      11             : 
      12             : // Local includes
      13             : #include "RayTracingCommon.h"
      14             : 
      15             : // MOOSE includes
      16             : #include "MooseTypes.h"
      17             : 
      18             : // Forward declarations
      19             : namespace libMesh
      20             : {
      21             : class Elem;
      22             : }
      23             : 
      24             : /**
      25             :  * Struct for containing the necessary information about a cached neighbor for ray tracing
      26             :  */
      27     3085700 : struct NeighborInfo
      28             : {
      29             :   /**
      30             :    * Constructor without bounds (used for neighbors that exist only at a point)
      31             :    */
      32      787010 :   NeighborInfo(const Elem * const elem, const std::vector<unsigned short> & sides)
      33      787010 :     : _elem(elem),
      34      787010 :       _sides(sides),
      35      787010 :       _side_normals(sides.size(), RayTracingCommon::invalid_point),
      36      787010 :       _lower_bound(-1),
      37      787010 :       _upper_bound(-1),
      38      787010 :       _valid(true)
      39             :   {
      40      787010 :   }
      41             : 
      42             :   /**
      43             :    * Constructor with bounds (used for neighbors that span an edge)
      44             :    */
      45      830855 :   NeighborInfo(const Elem * const elem,
      46             :                const std::vector<unsigned short> & sides,
      47             :                const Real lower_bound,
      48             :                const Real upper_bound)
      49      830855 :     : _elem(elem),
      50      830855 :       _sides(sides),
      51      830855 :       _side_normals(sides.size(), RayTracingCommon::invalid_point),
      52      830855 :       _lower_bound(lower_bound),
      53      830855 :       _upper_bound(upper_bound),
      54      830855 :       _valid(true)
      55             :   {
      56      830855 :   }
      57             : 
      58             :   /// The element
      59             :   const Elem * const _elem;
      60             :   /// The sides on the element that the neighboring portion is contained in
      61             :   const std::vector<unsigned short> _sides;
      62             :   /// The normals of each side in _sides
      63             :   std::vector<Point> _side_normals;
      64             :   /// The lower bound (used for neighbors that span an edge)
      65             :   const Real _lower_bound;
      66             :   /// The lower bound (used for neighbors that span an edge)
      67             :   const Real _upper_bound;
      68             :   /// Whether or not this neighbor is valid (needed for neighbors that span an edge)
      69             :   bool _valid;
      70             : };

Generated by: LCOV version 1.14