Celeritas 0.6.0-129+develop.846910afa
|
Device-compatible map between physics surface IDs and models/indices. More...
#include <SurfacePhysicsMapData.hh>
Public Types | |
using | PhysSurfaceId = SurfaceModel::PhysSurfaceId |
using | SurfaceModelId = SurfaceModel::SurfaceModelId |
using | InternalSurfaceId = SurfaceModel::InternalSurfaceId |
template<class T > | |
using | SurfaceItems = Collection< T, W, M, PhysSurfaceId > |
Public Member Functions | |
CELER_FUNCTION | operator bool () const |
True if assigned. | |
template<Ownership W2, MemSpace M2> | |
SurfacePhysicsMapData & | operator= (SurfacePhysicsMapData< W2, M2 > const &other) |
Assign from another set of data. | |
Public Attributes | |
SurfaceItems< SurfaceModelId > | surface_models |
SurfaceItems< InternalSurfaceId > | internal_surface_ids |
Device-compatible map between physics surface IDs and models/indices.
One or more instances of these should be stored as member data inside a downstream ParamsData class. For instance, optical surface physics will have one map for roughness, one for reflectivity, and one for interaction.
If a SurfaceModel
with ID 10 returns a list of surfaces {3, 1, 5}
and another with ID 11 returns {{}, 0, 4}
, then this class will have a key-value mapping stored as two arrays:
Note that the "default" surface (the empty item returned by the second surface model) becomes an additional pseudo-surface at the end of the array. The surface physics will always have one more surface entry than the actual geometry.
With this setup, Collection
data can be accessed locally by indexing on ModelSurfaceId
.