File indexing completed on 2025-02-22 10:31:31
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include <unordered_map>
0011
0012 #include "corecel/Types.hh"
0013 #include "corecel/data/CollectionMirror.hh"
0014 #include "corecel/data/ParamsDataInterface.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 SPConstParticles particles;
0040 std::unordered_map<PDGNumber, LoopingThreshold> looping;
0041 };
0042
0043 public:
0044
0045 static std::shared_ptr<SimParams>
0046 from_import(ImportData const&, SPConstParticles);
0047
0048
0049 static std::shared_ptr<SimParams> from_import(ImportData const&,
0050 SPConstParticles,
0051 short int max_field_substeps);
0052
0053
0054 explicit SimParams(Input const&);
0055
0056
0057 SimParams();
0058
0059
0060 HostRef const& host_ref() const final { return data_.host_ref(); }
0061
0062
0063 DeviceRef const& device_ref() const final { return data_.device_ref(); }
0064
0065 private:
0066
0067 CollectionMirror<SimParamsData> data_;
0068 };
0069
0070
0071 }