![]() |
|
|||
File indexing completed on 2025-09-17 08:53: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/geo/GeoMaterialData.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/data/Collection.hh" 0010 #include "geocel/Types.hh" 0011 #include "celeritas/Types.hh" 0012 0013 namespace celeritas 0014 { 0015 //---------------------------------------------------------------------------// 0016 /*! 0017 * Shared data for mapping geometry to materials. 0018 */ 0019 template<Ownership W, MemSpace M> 0020 struct GeoMaterialParamsData 0021 { 0022 template<class T> 0023 using VolumeItems = celeritas::Collection<T, W, M, VolumeId>; 0024 0025 VolumeItems<PhysMatId> materials; 0026 0027 //! True if assigned 0028 explicit CELER_FUNCTION operator bool() const 0029 { 0030 return !materials.empty(); 0031 } 0032 0033 //! Assign from another set of data 0034 template<Ownership W2, MemSpace M2> 0035 GeoMaterialParamsData& operator=(GeoMaterialParamsData<W2, M2> const& other) 0036 { 0037 CELER_EXPECT(other); 0038 materials = other.materials; 0039 return *this; 0040 } 0041 }; 0042 0043 //---------------------------------------------------------------------------// 0044 } // 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 |
![]() ![]() |