Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:43

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/model/AbsorptionModel.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "celeritas/optical/ImportedModelAdapter.hh"
0010 #include "celeritas/optical/Model.hh"
0011 #include "celeritas/optical/Types.hh"
0012 
0013 namespace celeritas
0014 {
0015 namespace optical
0016 {
0017 //---------------------------------------------------------------------------//
0018 /*!
0019  * Set up and launch the optical absorption model interaction.
0020  */
0021 class AbsorptionModel final : public Model
0022 {
0023   public:
0024     //!@{
0025     //! \name Type aliases
0026     using SPConstImported = std::shared_ptr<ImportedModels const>;
0027     //!@}
0028 
0029   public:
0030     // Create a model builder for absorption
0031     static ModelBuilder make_builder(SPConstImported);
0032 
0033     // Construct with imported data
0034     AbsorptionModel(ActionId id, SPConstImported imported);
0035 
0036     // Build the mean free paths for this model
0037     void build_mfps(OptMatId mat, MfpBuilder&) const final;
0038 
0039     // Execute the model with host data
0040     void step(CoreParams const&, CoreStateHost&) const final;
0041 
0042     // Execute the model with device data
0043     void step(CoreParams const&, CoreStateDevice&) const final;
0044 
0045   private:
0046     ImportedModelAdapter imported_;
0047 };
0048 
0049 //---------------------------------------------------------------------------//
0050 }  // namespace optical
0051 }  // namespace celeritas