File indexing completed on 2025-09-16 08:52:27
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <unordered_map>
0010
0011 #include "corecel/Types.hh"
0012 #include "corecel/data/CollectionMirror.hh"
0013 #include "corecel/data/ParamsDataInterface.hh"
0014 #include "corecel/math/NumericLimits.hh"
0015 #include "celeritas/phys/PDGNumber.hh"
0016
0017 #include "SimData.hh"
0018
0019 namespace celeritas
0020 {
0021 class ParticleParams;
0022 struct ImportData;
0023
0024
0025
0026
0027
0028 class SimParams final : public ParamsDataInterface<SimParamsData>
0029 {
0030 public:
0031
0032
0033 using SPConstParticles = std::shared_ptr<ParticleParams const>;
0034
0035
0036
0037 struct Input
0038 {
0039
0040 static Input from_import(ImportData const&, SPConstParticles);
0041
0042
0043 static Input from_import(ImportData const&,
0044 SPConstParticles,
0045 size_type max_field_substeps);
0046
0047
0048
0049 SPConstParticles particles;
0050 std::unordered_map<PDGNumber, LoopingThreshold> looping;
0051 size_type max_steps = numeric_limits<size_type>::max();
0052 };
0053
0054 public:
0055
0056 explicit SimParams(Input const&);
0057
0058
0059 HostRef const& host_ref() const final { return data_.host_ref(); }
0060
0061
0062 DeviceRef const& device_ref() const final { return data_.device_ref(); }
0063
0064 private:
0065
0066 CollectionMirror<SimParamsData> data_;
0067 };
0068
0069
0070 }