File indexing completed on 2026-01-07 10:01:43
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Types.hh"
0010 #include "corecel/data/CollectionMirror.hh"
0011 #include "celeritas/io/ImportOpticalMaterial.hh"
0012 #include "celeritas/optical/ImportedModelAdapter.hh"
0013 #include "celeritas/optical/Model.hh"
0014
0015 #include "../WavelengthShiftData.hh"
0016
0017 namespace celeritas
0018 {
0019 struct ImportData;
0020
0021 namespace optical
0022 {
0023
0024
0025
0026
0027 class WavelengthShiftModel : public Model
0028 {
0029 public:
0030
0031
0032 using SPConstImported = std::shared_ptr<ImportedModels const>;
0033 using HostRef = HostCRef<WavelengthShiftData>;
0034 using DeviceRef = DeviceCRef<WavelengthShiftData>;
0035
0036
0037
0038 struct Input
0039 {
0040 ImportModelClass model{ImportModelClass::size_};
0041 std::vector<ImportWavelengthShift> data;
0042 WlsTimeProfile time_profile{WlsTimeProfile::size_};
0043 };
0044
0045 public:
0046
0047 static ModelBuilder make_builder(SPConstImported, Input);
0048
0049
0050 WavelengthShiftModel(ActionId, SPConstImported, Input);
0051
0052
0053 void build_mfps(OptMatId, MfpBuilder&) const final;
0054
0055
0056 void step(CoreParams const&, CoreStateHost&) const final;
0057
0058
0059 void step(CoreParams const&, CoreStateDevice&) const final;
0060
0061
0062 HostRef const& host_ref() const { return data_.host_ref(); }
0063
0064
0065 DeviceRef const& device_ref() const { return data_.device_ref(); }
0066
0067 private:
0068 ImportedModelAdapter imported_;
0069 CollectionMirror<WavelengthShiftData> data_;
0070 };
0071
0072
0073 }
0074 }