File indexing completed on 2026-11-14 10:22:21
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Macros.hh"
0010 #include "corecel/Types.hh"
0011 #include "corecel/data/Collection.hh"
0012 #include "corecel/grid/NonuniformGridData.hh"
0013 #include "celeritas/Types.hh"
0014
0015 namespace celeritas
0016 {
0017
0018
0019
0020
0021 template<Ownership W, MemSpace M>
0022 struct NeutronCaptureData
0023 {
0024 template<class T>
0025 using Items = Collection<T, W, M>;
0026 template<class T>
0027 using ElementItems = Collection<T, W, M, ElementId>;
0028
0029
0030
0031
0032 ParticleId neutron_id;
0033
0034
0035 ElementItems<NonuniformGridRecord> micro_xs;
0036
0037
0038 Items<real_type> reals;
0039
0040
0041
0042
0043 static CELER_CONSTEXPR_FUNCTION units::MevEnergy max_valid_energy()
0044 {
0045 return units::MevEnergy{20};
0046 }
0047
0048
0049 explicit CELER_FUNCTION operator bool() const
0050 {
0051 return neutron_id && !micro_xs.empty() && !reals.empty();
0052 }
0053
0054
0055 template<Ownership W2, MemSpace M2>
0056 NeutronCaptureData& operator=(NeutronCaptureData<W2, M2> const& other)
0057 {
0058 CELER_EXPECT(other);
0059 neutron_id = other.neutron_id;
0060 micro_xs = other.micro_xs;
0061 reals = other.reals;
0062 return *this;
0063 }
0064 };
0065
0066
0067 }