Back to home page

EIC code displayed by LXR

 
 

    


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/TrivialInteractionModel.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/data/ParamsDataStore.hh"
0010 #include "celeritas/optical/surface/SurfaceModel.hh"
0011 
0012 #include "TrivialInteractionData.hh"
0013 
0014 namespace celeritas
0015 {
0016 namespace optical
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Trivial interaction model for optical surface physics.
0021  *
0022  * Calls precisely one interactor with no random sampling for a given surface.
0023  * Mainly useful for testing and very simple simulations.
0024  */
0025 class TrivialInteractionModel : public SurfaceModel
0026 {
0027   public:
0028     //!@{
0029     //! \name Type aliases
0030     using InputT = TrivialInteractionMode;
0031     //!@}
0032 
0033   public:
0034     //! Construct the model from an ID and layer map
0035     TrivialInteractionModel(SurfaceModelId,
0036                             std::map<PhysSurfaceId, InputT> const&);
0037 
0038     //! Get the list of physical surfaces this model applies to
0039     VecSurfaceLayer const& get_surfaces() const final { return surfaces_; }
0040 
0041     // Execute the model with host data
0042     void step(CoreParams const&, CoreStateHost&) const final;
0043 
0044     // Execute the model with device data
0045     void step(CoreParams const&, CoreStateDevice&) const final;
0046 
0047   private:
0048     VecSurfaceLayer surfaces_;
0049     ParamsDataStore<TrivialInteractionData> data_;
0050 };
0051 
0052 //---------------------------------------------------------------------------//
0053 }  // namespace optical
0054 }  // namespace celeritas