Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:55

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file orange/orangeinp/detail/BuildIntersectRegion.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "orange/orangeinp/CsgTypes.hh"
0014 
0015 namespace celeritas
0016 {
0017 namespace orangeinp
0018 {
0019 class IntersectRegionInterface;
0020 namespace detail
0021 {
0022 class VolumeBuilder;
0023 //---------------------------------------------------------------------------//
0024 
0025 // Build a intersect region
0026 [[nodiscard]] NodeId
0027 build_intersect_region(VolumeBuilder& vb,
0028                        std::string&& label,
0029                        std::string&& face_prefix,
0030                        IntersectRegionInterface const& region);
0031 
0032 //! Build a intersect region with no face prefix
0033 [[nodiscard]] inline NodeId
0034 build_intersect_region(VolumeBuilder& vb,
0035                        std::string&& label,
0036                        IntersectRegionInterface const& region)
0037 {
0038     return build_intersect_region(vb, std::move(label), {}, region);
0039 }
0040 
0041 //! Build a intersect region using a string view
0042 [[nodiscard]] inline NodeId
0043 build_intersect_region(VolumeBuilder& vb,
0044                        std::string_view label,
0045                        std::string&& face_prefix,
0046                        IntersectRegionInterface const& region)
0047 {
0048     return build_intersect_region(
0049         vb, std::string{label}, std::move(face_prefix), region);
0050 }
0051 
0052 //---------------------------------------------------------------------------//
0053 }  // namespace detail
0054 }  // namespace orangeinp
0055 }  // namespace celeritas