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