perf(precomputation): cleaned up allocations
recovered about 5% execution time
This commit is contained in:
@@ -53,7 +53,7 @@ namespace gridfire::engine {
|
||||
struct StepDerivatives {
|
||||
std::map<fourdst::atomic::Species, T> dydt{}; ///< Derivatives of abundances (dY/dt for each species).
|
||||
T nuclearEnergyGenerationRate = T(0.0); ///< Specific energy generation rate (e.g., erg/g/s).
|
||||
std::map<fourdst::atomic::Species, std::unordered_map<std::string, T>> reactionContributions{};
|
||||
std::optional<std::map<fourdst::atomic::Species, std::unordered_map<std::string, T>>> reactionContributions = std::nullopt;
|
||||
T neutrinoEnergyLossRate = T(0.0); // (erg/g/s)
|
||||
T totalNeutrinoFlux = T(0.0); // (neutrinos/g/s)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user