SpECTRE Documentation Coverage Report
Current view: top level - Domain/Structure - IndexToSliceAt.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 50.0 % 2 1
Test Date: 2026-10-22 17:29:42
Legend: Lines:     hit not hit

            Line data    Source code
       1            0 : // Distributed under the MIT License.
       2              : // See LICENSE.txt for details.
       3              : 
       4              : #pragma once
       5              : 
       6              : #include <cstddef>
       7              : 
       8              : #include "DataStructures/Index.hpp"
       9              : #include "Domain/Structure/Direction.hpp"
      10              : #include "Domain/Structure/Side.hpp"
      11              : 
      12              : /// \ingroup ComputationalDomainGroup
      13              : /// \brief Finds the index in the perpendicular dimension of an element boundary
      14              : ///
      15              : /// Optionally provide an `offset` to find an index offset from the element
      16              : /// boundary.
      17              : template <size_t Dim>
      18            1 : size_t index_to_slice_at(const Index<Dim>& extents,
      19              :                          const Direction<Dim>& direction,
      20              :                          const size_t offset = 0) {
      21              :   return direction.side() == Side::Lower
      22              :              ? offset
      23              :              : extents[direction.dimension()] - 1 - offset;
      24              : }
        

Generated by: LCOV version 2.0-1