File indexing completed on 2026-11-14 10:22:22
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <functional>
0010
0011 #include "corecel/data/ParamsDataStore.hh"
0012 #include "corecel/inp/Grid.hh"
0013 #include "celeritas/mat/IsotopeView.hh"
0014 #include "celeritas/mat/MaterialView.hh"
0015 #include "celeritas/neutron/data/NeutronCaptureData.hh"
0016 #include "celeritas/phys/AtomicNumber.hh"
0017 #include "celeritas/phys/Model.hh"
0018
0019 namespace celeritas
0020 {
0021 class MaterialParams;
0022 class ParticleParams;
0023
0024
0025
0026
0027
0028 class NeutronCaptureModel final : public Model, public StaticConcreteAction
0029 {
0030 public:
0031
0032 using ReadData = std::function<inp::Grid(AtomicNumber)>;
0033 using HostRef = HostCRef<NeutronCaptureData>;
0034 using DeviceRef = DeviceCRef<NeutronCaptureData>;
0035
0036
0037 public:
0038
0039 NeutronCaptureModel(ActionId id,
0040 ParticleParams const& particles,
0041 MaterialParams const& materials,
0042 ReadData load_data);
0043
0044
0045 SetApplicability applicability() const final;
0046
0047
0048 XsTable micro_xs(Applicability) const final;
0049
0050
0051 void step(CoreParams const&, CoreStateHost&) const final;
0052
0053
0054 void step(CoreParams const&, CoreStateDevice&) const final;
0055
0056
0057
0058 HostRef const& host_ref() const { return mirror_.host_ref(); }
0059 DeviceRef const& device_ref() const { return mirror_.device_ref(); }
0060
0061
0062 private:
0063
0064
0065
0066 ParamsDataStore<NeutronCaptureData> mirror_;
0067 };
0068
0069
0070 }