LCOV - code coverage report
Current view: top level - include/userobjects - HexagonalSubchannelGapBin.h (source / functions) Hit Total Coverage
Test: neams-th-coe/cardinal: be601f Lines: 2 2 100.0 %
Date: 2025-07-15 20:50:38 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /********************************************************************/
       2             : /*                  SOFTWARE COPYRIGHT NOTIFICATION                 */
       3             : /*                             Cardinal                             */
       4             : /*                                                                  */
       5             : /*                  (c) 2021 UChicago Argonne, LLC                  */
       6             : /*                        ALL RIGHTS RESERVED                       */
       7             : /*                                                                  */
       8             : /*                 Prepared by UChicago Argonne, LLC                */
       9             : /*               Under Contract No. DE-AC02-06CH11357               */
      10             : /*                With the U. S. Department of Energy               */
      11             : /*                                                                  */
      12             : /*             Prepared by Battelle Energy Alliance, LLC            */
      13             : /*               Under Contract No. DE-AC07-05ID14517               */
      14             : /*                With the U. S. Department of Energy               */
      15             : /*                                                                  */
      16             : /*                 See LICENSE for full restrictions                */
      17             : /********************************************************************/
      18             : 
      19             : #pragma once
      20             : 
      21             : #include "PlaneSpatialBinUserObject.h"
      22             : #include "HexagonalLatticeUtils.h"
      23             : 
      24             : /**
      25             :  * Class that bins spatial coordinates into a hexagonal subchannel gap discretization
      26             :  * with unique bins for each gap.
      27             :  */
      28             : class HexagonalSubchannelGapBin : public PlaneSpatialBinUserObject
      29             : {
      30             : public:
      31             :   static InputParameters validParams();
      32             : 
      33             :   HexagonalSubchannelGapBin(const InputParameters & parameters);
      34             : 
      35             :   virtual unsigned int bin(const Point & p) const override;
      36             : 
      37             :   virtual unsigned int num_bins() const override;
      38             : 
      39             :   virtual Real distanceFromGap(const Point & point, const unsigned int & gap_index) const override;
      40             : 
      41             :   virtual unsigned int gapIndex(const Point & point) const override;
      42             : 
      43             :   virtual void
      44             :   gapIndexAndDistance(const Point & point, unsigned int & index, Real & distance) const override;
      45             : 
      46          12 :   virtual const std::vector<Point> & gapUnitNormals() const override
      47             :   {
      48          12 :     return _hex_lattice->gapUnitNormals();
      49             :   }
      50             : 
      51             : protected:
      52             :   /// Bundle pitch
      53             :   const Real & _bundle_pitch;
      54             : 
      55             :   /// Pin pitch
      56             :   const Real & _pin_pitch;
      57             : 
      58             :   /// Pin diameter
      59             :   const Real & _pin_diameter;
      60             : 
      61             :   /// Total number of rings of pins
      62             :   const unsigned int & _n_rings;
      63             : 
      64             :   /// Vertical axis of the bundle along which the pins are aligned
      65             :   const unsigned int _axis;
      66             : 
      67             :   /// Underlying utility providing hexagonal lattice capabilities
      68             :   std::unique_ptr<HexagonalLatticeUtils> _hex_lattice;
      69             : };

Generated by: LCOV version 1.14