feat(SpectralSolver): Began work on multizone spectral solver

The single zone solver we have is too slow for a true high resolution
multi-zone enviroment. Began work on a spectral element method
multi-zone solver
This commit is contained in:
2025-12-10 12:50:35 -05:00
parent b57ed57166
commit 97a7fd05d2
16 changed files with 1100 additions and 91 deletions

View File

@@ -14,6 +14,8 @@
#include "gridfire/engine/procedures/construction.h"
#include "gridfire/config/config.h"
#include "ankerl/unordered_dense.h"
#include <string>
#include <unordered_map>
#include <vector>
@@ -764,6 +766,8 @@ namespace gridfire::engine {
m_store_intermediate_reaction_contributions = value;
}
[[nodiscard]] std::optional<StepDerivatives<double>> getMostRecentRHSCalculation() const override;
private:
struct PrecomputedReaction {
@@ -887,6 +891,7 @@ namespace gridfire::engine {
mutable std::unordered_map<size_t, StepDerivatives<double>> m_stepDerivativesCache;
mutable std::unordered_map<size_t, CppAD::sparse_rcv<std::vector<size_t>, std::vector<double>>> m_jacobianSubsetCache;
mutable std::unordered_map<size_t, CppAD::sparse_jac_work> m_jacWorkCache;
mutable std::optional<StepDerivatives<double>> m_most_recent_rhs_calculation;
bool m_has_been_primed = false; ///< Flag indicating if the engine has been primed.