![]() |
|
|||
File indexing completed on 2025-09-19 08:49:41
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/alongstep/AlongStepNeutralAction.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include <string> 0010 0011 #include "corecel/Assert.hh" 0012 #include "celeritas/Types.hh" 0013 #include "celeritas/global/ActionInterface.hh" 0014 0015 namespace celeritas 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Along-step kernel for particles without fields or energy loss. 0020 * 0021 * This should only be used for testing and demonstration purposes because real 0022 * EM physics always has continuous energy loss for charged particles. 0023 */ 0024 class AlongStepNeutralAction final : public CoreStepActionInterface 0025 { 0026 public: 0027 // Construct with next action ID 0028 explicit AlongStepNeutralAction(ActionId id); 0029 0030 // Launch kernel with host data 0031 void step(CoreParams const&, CoreStateHost&) const final; 0032 0033 // Launch kernel with device data 0034 void step(CoreParams const&, CoreStateDevice&) const final; 0035 0036 //! ID of the model 0037 ActionId action_id() const final { return id_; } 0038 0039 //! Short name for the along-step kernel 0040 std::string_view label() const final { return "along-step-neutral"; } 0041 0042 //! Short description of the action 0043 std::string_view description() const final 0044 { 0045 return "apply along-step for neutral particles"; 0046 } 0047 0048 //! Dependency ordering of the action 0049 StepActionOrder order() const final { return StepActionOrder::along; } 0050 0051 private: 0052 ActionId id_; 0053 }; 0054 0055 //---------------------------------------------------------------------------// 0056 } // 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 |
![]() ![]() |