|
|
|||
File indexing completed on 2026-11-07 10:11:39
0001 //------------------------------- -*- C++ -*- -------------------------------// 0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details 0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0004 //---------------------------------------------------------------------------// 0005 //! \file celeritas/optical/surface/model/TrivialInteractionData.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "corecel/data/Collection.hh" 0011 #include "celeritas/optical/Types.hh" 0012 0013 namespace celeritas 0014 { 0015 namespace optical 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Data for the trivial surface interaction model. 0020 */ 0021 template<Ownership W, MemSpace M> 0022 struct TrivialInteractionData 0023 { 0024 //!@{ 0025 //! \name Type aliases 0026 template<class T> 0027 using SurfaceItems = Collection<T, W, M, SubModelId>; 0028 //!@} 0029 0030 SurfaceItems<TrivialInteractionMode> modes; 0031 0032 //! Whether data is assigned and valid 0033 explicit CELER_FUNCTION operator bool() const { return !modes.empty(); } 0034 0035 //! Assign from another set of data 0036 template<Ownership W2, MemSpace M2> 0037 TrivialInteractionData<W, M>& operator=( 0038 TrivialInteractionData<W2, M2> const& other) 0039 { 0040 CELER_EXPECT(other); 0041 modes = other.modes; 0042 CELER_ENSURE(*this); 0043 return *this; 0044 } 0045 }; 0046 0047 //---------------------------------------------------------------------------// 0048 } // namespace optical 0049 } // namespace celeritas
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|