feat(python): Python Bindings

Python Bindings are working again
This commit is contained in:
2025-12-20 16:02:52 -05:00
parent d65c237b26
commit 11a596b75b
78 changed files with 4411 additions and 1110 deletions

View File

@@ -8,34 +8,8 @@ namespace gridfire::config {
double relTol = 1.0e-5;
};
struct SpectralSolverConfig {
struct Trigger {
double timestepCollapseRatio = 0.5;
size_t maxConvergenceFailures = 2;
double relativeFailureRate = 0.5;
size_t windowSize = 10;
};
struct MonitorFunctionConfig {
double structure_weight = 1.0;
double abundance_weight = 10.0;
double alpha = 0.2;
double beta = 0.8;
};
struct BasisConfig {
size_t num_elements = 50;
};
double absTol = 1.0e-8;
double relTol = 1.0e-5;
size_t degree = 3;
MonitorFunctionConfig monitorFunction;
BasisConfig basis;
Trigger trigger;
};
struct SolverConfig {
CVODESolverConfig cvode;
SpectralSolverConfig spectral;
};
struct AdaptiveEngineViewConfig {
@@ -57,5 +31,4 @@ namespace gridfire::config {
};
}

View File

@@ -25,6 +25,7 @@
#include <set>
#include "gridfire/engine/types/engine_types.h"
#include "gridfire/engine/scratchpads/blob.h"
namespace gridfire::policy {

View File

@@ -20,6 +20,9 @@ namespace gridfire::solver {
void set_callback(const std::function<void(const TimestepContextBase&)> &callback);
void set_callback(const std::function<void(const TimestepContextBase&)> &callback, size_t zone_idx);
void clear_callback();
void clear_callback(size_t zone_idx);
void set_stdout_logging(bool enable) override;
void set_detailed_logging(bool enable) override;