Celeritas 0.6.0-129+develop.846910afa
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
celeritas::SurfacePhysicsMapData< W, M > Struct Template Reference

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>
SurfacePhysicsMapDataoperator= (SurfacePhysicsMapData< W2, M2 > const &other)
 Assign from another set of data.
 

Public Attributes

SurfaceItems< SurfaceModelIdsurface_models
 
SurfaceItems< InternalSurfaceIdinternal_surface_ids
 

Detailed Description

template<Ownership W, MemSpace M>
struct celeritas::SurfacePhysicsMapData< W, M >

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:

surface_models = {11, 10, <null>, 10, 11, 10, 11};
internal_surface_ids = {1, 1, <null>, 0, 2, 2, 0};

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.

Todo:
This will change when we map geometric surfaces to vectors of physics surface interfaces.

With this setup, Collection data can be accessed locally by indexing on ModelSurfaceId .


The documentation for this struct was generated from the following file: