![]() |
|
|||
File indexing completed on 2025-02-22 10:31:22
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2022-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/global/alongstep/AlongStep.hh 0007 //! \brief Along-step function and helper classes 0008 //---------------------------------------------------------------------------// 0009 #pragma once 0010 0011 #include "celeritas/global/CoreTrackView.hh" 0012 0013 #include "detail/ElossApplier.hh" // IWYU pragma: associated 0014 #include "detail/MscApplier.hh" // IWYU pragma: associated 0015 #include "detail/MscStepLimitApplier.hh" // IWYU pragma: associated 0016 #include "detail/PropagationApplier.hh" // IWYU pragma: associated 0017 #include "detail/TimeUpdater.hh" // IWYU pragma: associated 0018 #include "detail/TrackUpdater.hh" // IWYU pragma: associated 0019 0020 namespace celeritas 0021 { 0022 //---------------------------------------------------------------------------// 0023 /*! 0024 * Perform the along-step action using helper functions. 0025 * 0026 * \tparam MH MSC helper, e.g. \c detail::NoMsc 0027 * \tparam MP Propagator factory, e.g. \c detail::LinearPropagatorFactory 0028 * \tparam EH Energy loss helper, e.g. \c detail::TrackNoEloss 0029 */ 0030 template<class MH, class MP, class EH> 0031 struct AlongStep 0032 { 0033 inline CELER_FUNCTION void operator()(CoreTrackView& track); 0034 0035 MH msc; 0036 MP make_propagator; 0037 EH eloss; 0038 }; 0039 0040 //---------------------------------------------------------------------------// 0041 // DEDUCTION GUIDES 0042 //---------------------------------------------------------------------------// 0043 template<class MH, class MP, class EH> 0044 CELER_FUNCTION AlongStep(MH&&, MP&&, EH&&) -> AlongStep<MH, MP, EH>; 0045 0046 //---------------------------------------------------------------------------// 0047 // INLINE DEFINITIONS 0048 //---------------------------------------------------------------------------// 0049 template<class MH, class MP, class EH> 0050 CELER_FUNCTION void AlongStep<MH, MP, EH>::operator()(CoreTrackView& track) 0051 { 0052 detail::MscStepLimitApplier{msc}(track); 0053 detail::PropagationApplier{make_propagator}(track); 0054 detail::MscApplier{msc}(track); 0055 detail::TimeUpdater{}(track); 0056 detail::ElossApplier{eloss}(track); 0057 detail::TrackUpdater{}(track); 0058 } 0059 0060 //---------------------------------------------------------------------------// 0061 } // 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 |
![]() ![]() |