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