build(meson): much more robust build system
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "fourdst/composition/composition.h"
|
||||
#include "fourdst/logging/logging.h"
|
||||
#include "fourdst/atomic/species.h"
|
||||
#include "fourdst/composition/utils.h"
|
||||
#include "fourdst/composition/utils/utils.h"
|
||||
|
||||
#include "quill/Logger.h"
|
||||
#include "quill/Backend.h"
|
||||
@@ -156,8 +156,8 @@ void record_abundance_history_callback(const gridfire::solver::PointSolverTimest
|
||||
std::vector<double> Y;
|
||||
for (const auto& species : engine.getNetworkSpecies(ctx.state_ctx)) {
|
||||
const size_t sid = engine.getSpeciesIndex(ctx.state_ctx, species);
|
||||
double y = N_VGetArrayPointer(ctx.state)[sid];
|
||||
Y.push_back(y > 0.0 ? y : 0.0); // Regularize tiny negative abundances to zero
|
||||
const double y = ctx.abundance(sid);
|
||||
Y.push_back(y > 0.0 ? y : 0.0);
|
||||
}
|
||||
|
||||
const fourdst::composition::Composition comp(engine.getNetworkSpecies(ctx.state_ctx), Y);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "fourdst/composition/composition.h"
|
||||
#include "fourdst/logging/logging.h"
|
||||
#include "fourdst/atomic/species.h"
|
||||
#include "fourdst/composition/utils.h"
|
||||
#include "fourdst/composition/utils/utils.h"
|
||||
|
||||
#include "quill/Logger.h"
|
||||
#include "quill/Backend.h"
|
||||
@@ -226,14 +226,12 @@ void log_results(const gridfire::NetOut& netOut, const gridfire::NetIn& netIn) {
|
||||
void record_abundance_history_callback(const gridfire::solver::PointSolverTimestepContext& ctx) {
|
||||
s_wrote_abundance_history = true;
|
||||
const auto& engine = ctx.engine;
|
||||
// std::unordered_map<std::string, std::pair<double, double>> abundances;
|
||||
std::vector<double> Y;
|
||||
for (const auto& species : engine.getNetworkSpecies(ctx.state_ctx)) {
|
||||
const size_t sid = engine.getSpeciesIndex(ctx.state_ctx, species);
|
||||
double y = N_VGetArrayPointer(ctx.state)[sid];
|
||||
Y.push_back(y > 0.0 ? y : 0.0); // Regularize tiny negative abundances to zero
|
||||
const double y = ctx.abundance(sid);
|
||||
Y.push_back(y > 0.0 ? y : 0.0);
|
||||
}
|
||||
|
||||
fourdst::composition::Composition comp(engine.getNetworkSpecies(ctx.state_ctx), Y);
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "fourdst/composition/composition.h"
|
||||
#include "fourdst/logging/logging.h"
|
||||
#include "fourdst/atomic/species.h"
|
||||
#include "fourdst/composition/utils.h"
|
||||
#include "fourdst/composition/utils/utils.h"
|
||||
|
||||
#include "quill/Logger.h"
|
||||
#include "quill/Backend.h"
|
||||
@@ -157,10 +157,9 @@ void record_abundance_history_callback(const gridfire::solver::PointSolverTimest
|
||||
std::vector<double> Y;
|
||||
for (const auto& species : engine.getNetworkSpecies(ctx.state_ctx)) {
|
||||
const size_t sid = engine.getSpeciesIndex(ctx.state_ctx, species);
|
||||
double y = N_VGetArrayPointer(ctx.state)[sid];
|
||||
Y.push_back(y > 0.0 ? y : 0.0); // Regularize tiny negative abundances to zero
|
||||
const double y = ctx.abundance(sid);
|
||||
Y.push_back(y > 0.0 ? y : 0.0);
|
||||
}
|
||||
|
||||
const fourdst::composition::Composition comp(engine.getNetworkSpecies(ctx.state_ctx), Y);
|
||||
IntermediateResult stepResult;
|
||||
stepResult.comp = comp;
|
||||
|
||||
Reference in New Issue
Block a user