fix(MultiscalePartitioningEngineView): began work to call the QSE solver every timestep
one major issue was that QSE solving was only running at each partition. This was creating effectivley infinite sources of partitioned species. Now we partition when engine updates are triggered, however, solveQSEAbundance is called every timestep. This has major performance implications and so has required a lot of optimization to make it even somewhat viable. For now construction is much slower. Time per iteration is still slower than it was before; however, it is tractable. There is also currently too much stiffness in the network. This is likeley a bug that was introduced in this refactoring which will be addressed soon.
This commit is contained in:
@@ -62,6 +62,7 @@ namespace gridfire {
|
||||
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{};
|
||||
|
||||
StepDerivatives() : dydt(), nuclearEnergyGenerationRate(T(0.0)) {}
|
||||
};
|
||||
@@ -406,11 +407,15 @@ namespace gridfire {
|
||||
* @note It is up to each engine to decide how to handle filling in the return composition.
|
||||
* @note These methods return an unfinalized composition which must then be finalized by the caller
|
||||
* @param comp Input composition to "normalize".
|
||||
* @param T9
|
||||
* @param rho
|
||||
* @return An updated composition which is a superset of comp. This may contain species which were culled, for
|
||||
* example, by either QSE partitioning or reaction flow rate culling
|
||||
*/
|
||||
virtual fourdst::composition::Composition collectComposition(
|
||||
fourdst::composition::CompositionAbstract &comp
|
||||
const fourdst::composition::CompositionAbstract &comp,
|
||||
double T9,
|
||||
double rho
|
||||
) const = 0;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user