File indexing completed on 2025-02-22 10:31:15
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include "corecel/Macros.hh"
0011 #include "corecel/Types.hh"
0012 #include "corecel/data/Collection.hh"
0013 #include "celeritas/Constants.hh"
0014 #include "celeritas/Quantities.hh"
0015 #include "celeritas/Types.hh"
0016
0017 namespace celeritas
0018 {
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 struct CoulombParameters
0029 {
0030
0031 bool is_combined{};
0032
0033 real_type costheta_limit{};
0034
0035 real_type screening_factor{};
0036
0037 real_type a_sq_factor{};
0038
0039 NuclearFormFactorType form_factor_type{NuclearFormFactorType::exponential};
0040
0041 explicit CELER_FUNCTION operator bool() const
0042 {
0043 return costheta_limit >= -1 && costheta_limit <= 1
0044 && screening_factor > 0 && a_sq_factor >= 0
0045 && form_factor_type != NuclearFormFactorType::size_;
0046 }
0047 };
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 struct MottElementData
0062 {
0063
0064
0065 static constexpr size_type num_beta = 6;
0066 static constexpr size_type num_theta = 5;
0067 static constexpr size_type num_elements = 118;
0068
0069
0070 using BetaArray = Array<real_type, num_beta>;
0071 using ThetaArray = Array<real_type, num_theta>;
0072 using MottCoeffMatrix = Array<BetaArray, num_theta>;
0073
0074
0075 MottCoeffMatrix electron;
0076 MottCoeffMatrix positron;
0077 };
0078
0079
0080
0081
0082
0083 template<Ownership W, MemSpace M>
0084 struct WentzelOKVIData
0085 {
0086 template<class T>
0087 using ElementItems = celeritas::Collection<T, W, M, ElementId>;
0088 template<class T>
0089 using IsotopeItems = celeritas::Collection<T, W, M, IsotopeId>;
0090 template<class T>
0091 using MaterialItems = Collection<T, W, M, MaterialId>;
0092
0093
0094 CoulombParameters params;
0095
0096
0097 IsotopeItems<real_type> nuclear_form_prefactor;
0098
0099
0100 ElementItems<MottElementData> mott_coeffs;
0101
0102
0103 MaterialItems<real_type> inv_mass_cbrt_sq;
0104
0105
0106 explicit CELER_FUNCTION operator bool() const
0107 {
0108 return params && !mott_coeffs.empty()
0109 && params.is_combined == !inv_mass_cbrt_sq.empty();
0110 }
0111
0112 template<Ownership W2, MemSpace M2>
0113 WentzelOKVIData& operator=(WentzelOKVIData<W2, M2> const& other)
0114 {
0115 CELER_EXPECT(other);
0116 params = other.params;
0117 nuclear_form_prefactor = other.nuclear_form_prefactor;
0118 mott_coeffs = other.mott_coeffs;
0119 inv_mass_cbrt_sq = other.inv_mass_cbrt_sq;
0120 return *this;
0121 }
0122 };
0123
0124
0125 }