![]() |
|
|||
File indexing completed on 2025-02-22 10:31:27
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file celeritas/optical/interactor/AbsorptionInteractor.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include "corecel/Macros.hh" 0011 #include "celeritas/optical/Interaction.hh" 0012 0013 namespace celeritas 0014 { 0015 namespace optical 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Sample optical absorption interaction. 0020 * 0021 * Absorption rate is governed by sampling its mean free path in the action 0022 * loop. The interactor simply returns an interaction saying the optical 0023 * photon has been absorbed. 0024 */ 0025 class AbsorptionInteractor 0026 { 0027 public: 0028 // Sample an interaction (no RNG needed) 0029 inline CELER_FUNCTION Interaction operator()() const; 0030 }; 0031 0032 //---------------------------------------------------------------------------// 0033 // INLINE DEFINITIONS 0034 //---------------------------------------------------------------------------// 0035 /*! 0036 * Sample an absorption interaction. 0037 */ 0038 CELER_FUNCTION Interaction AbsorptionInteractor::operator()() const 0039 { 0040 return Interaction::from_absorption(); 0041 } 0042 0043 //---------------------------------------------------------------------------// 0044 } // namespace optical 0045 } // 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 |
![]() ![]() |