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/cont/Array.hh"
0013 #include "corecel/data/Collection.hh"
0014 #include "celeritas/Quantities.hh"
0015 #include "celeritas/Types.hh"
0016
0017 namespace celeritas
0018 {
0019
0020
0021
0022
0023 struct UrbanFluctuationParameters
0024 {
0025 using Energy = units::MevEnergy;
0026 using Real2 = Array<real_type, 2>;
0027
0028 Real2 binding_energy;
0029 Real2 log_binding_energy;
0030 Real2 oscillator_strength;
0031 };
0032
0033
0034
0035
0036
0037 template<Ownership W, MemSpace M>
0038 struct FluctuationData
0039 {
0040 template<class T>
0041 using MaterialItems = Collection<T, W, M, MaterialId>;
0042 using Mass = units::MevMass;
0043
0044
0045
0046 ParticleId electron_id;
0047 Mass electron_mass;
0048 MaterialItems<UrbanFluctuationParameters> urban;
0049
0050
0051
0052
0053 explicit CELER_FUNCTION operator bool() const
0054 {
0055 return electron_id && electron_mass > zero_quantity();
0056 }
0057
0058
0059 template<Ownership W2, MemSpace M2>
0060 FluctuationData& operator=(FluctuationData<W2, M2> const& other)
0061 {
0062 electron_id = other.electron_id;
0063 electron_mass = other.electron_mass;
0064 urban = other.urban;
0065 return *this;
0066 }
0067 };
0068
0069
0070 }