feat: extend PDE discovery system to support Burgers equation#11
Merged
minimumtone merged 1 commit intomainfrom Aug 18, 2025
Merged
Conversation
- Add BurgersFDM class with nonlinear FDM solver using upwind differencing - Implement discover_burgers_equation method with nonlinear candidate formulas - Update Streamlit interface with equation type selection (heat conduction vs Burgers) - Create burgers_data_generation.py for synthetic Burgers equation data - Add test_burgers_system.py for comprehensive testing - Update documentation to include Burgers equation capabilities - Generate sample data files: burgers_single.csv, burgers_multi.csv Key features: - Nonlinear convection term u×∂u/∂x with upwind differencing for stability - Combined stability conditions: CFL ≤ 1.0 and diffusion r ≤ 0.5 - Step function initial condition for shock wave formation - Candidate formulas including standard Burgers equation structure - Interactive visualization of shock wave evolution Co-Authored-By: satoshi minamoto <minimumtone@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration bot
added a commit
that referenced
this pull request
Feb 24, 2026
Bug fixes (Red): #1 evaluation.py: total score positive weights now sum to 1.0 (0.30/0.20/0.30/0.20) #2 evaluation.py: _generalisation_score returns 0.5 for zero improvement (neutral) #3 splitters.py: ElementExclusionSplitter.n_splits() returns max before split() #4 runner.py: OOD eval data size mismatch check before use #5 runner.py/ood.py: OOD detector fits on train split only (no self-scoring leak) Design/quality fixes (Yellow): #6 features.py: d_elec convention documented (Ni=8 ground-state config) #7 features.py: omega capped at 100.0 instead of 1e6 fallback #8 visualization.py: leak_penalty bar uses separate negative accumulator #9 report.py: tabulate try/except with to_string() fallback #10 workflows.py: removed invalid random_state from Ridge Minor improvements (Green): #11 dataset.py: _POOL_LIGHT now includes Mg, Si, Sc #12 search.py: feature key normalized with strip().lower() #13 literature_graph/__init__.py: public imports for all key classes New file: - requirements.txt with all dependencies listed Co-Authored-By: unknown <>
5 tasks
devin-ai-integration bot
added a commit
that referenced
this pull request
Feb 24, 2026
Red (critical bugs): #1 OOD normalization: save min/max from fit(), reuse in score() #2 kNN self-reference: use k+1 neighbors, skip self in training #3 OOD visualization: pass correct train/test indices to plots #4 Standardized coefficient: remove double-scaling in WorkflowLIN #5 OOD split selection: dedicated RandomCV split, deterministic Yellow (design issues): #6 ValidityScore.total: clarify weight ranges and score bounds #7 FeatureSetName: simplify enum values (remove FS_BASE+ prefix) #8 Literature DOIs: add doi_verified=False flag to Paper schema #9 Runner refactoring: extract _run_ood_detection() and _collect_ood_errors_for_eval() Green (minor): Co-Authored-By: unknown <> #10 Dead code: replace exact float==0 with tolerance-based check #11 requirements.txt: document optional deps with usage notes
7 tasks
devin-ai-integration bot
added a commit
that referenced
this pull request
Feb 24, 2026
… async, etc) Fixes: #1 Replace module-global _SESSION with gr.State for session isolation #2 Cast n_samples slider to int to prevent TypeError #3 Use actual split indices from runner for OOD Map visualization #4 Fix inputs_filter choices to match InputScope enum values #5 Move theme= to launch() (Gradio 6.0+ API) #6 Add app.queue() for async execution #7 Convert run_experiment to generator with yield for streaming progress #8 Auto-refresh all tabs on experiment completion #9 Cache FAISS index at app startup in session state #10 De-duplicate parity plot data by (workflow, feature_set, sample_index) #11 Generate filter choices dynamically from session data #12 Use timestamp-based output directories Co-Authored-By: unknown <>
devin-ai-integration bot
added a commit
that referenced
this pull request
Mar 11, 2026
…eak detect, #9 bootstrap CI, #11 n_jobs) - #5: as_serializable() utility in _compat.py for numpy-safe JSON export - #7: detect_target_leakage() in multicollinearity.py (Phase 0 correlation check) - #3: XGBoost early stopping refinement after GridSearchCV - #9: Bootstrap 95% CI for RMSE_test in evaluation.py - #11: Global _get_inner_n_jobs() to prevent nested parallelism contention - Integrate leak_suspects into evaluation leak_penalty (behavioural + correlation) - Report.py: RMSE CI column + leak suspect table in validity ranking - GUI: Bootstrap CI + leak count in FS comparison table + validity DataFrame Co-Authored-By: unknown <>
5 tasks
devin-ai-integration bot
added a commit
that referenced
this pull request
Mar 13, 2026
HIGH priority (fixes 1-4): - #1: Lazy workflow instantiation via lambda factories in _run_job - #2: Phase 4 OOD multi-fold ensemble across all seeds - #3: O(1) hash dict lookup in _collect_ood_errors (replaces O(n) np.array_equal) - #4: AIC/BIC forward stepwise guard for n_features > 30 MEDIUM priority (fixes 5-9): - #5: Consolidate safe_array/_safe_np into _utils.py (single source of truth) - #6: Configurable weights for ValidityScore.total via FeatureValidityEvaluator(weights=...) - #7: Fix generalisation score formula: min(1.0, geo_mean) instead of min(1.0, 0.5+0.5*geo_mean) - #8: Dynamic column names in RunRegistry.to_dataframe via dataclasses.fields() - #9: Initialize OODDetector._actual_k in __init__ (not just fit()) LOW priority (fixes 10-12): - #10: Unified mlflow/feast/mint interface (passing object implies use) - #11: Externalize _DELTA_H_BINARY to data/delta_h_binary.json - #12: Add Phase 0.5 documentation to user_manual.md Co-Authored-By: satoshi minamoto <minimumtone@gmail.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: extend PDE discovery system to support Burgers equation
Summary
This PR extends the existing PDE discovery system to handle nonlinear partial differential equations, specifically the Burgers equation (∂u/∂t + u×∂u/∂x = ν×∂²u/∂x²). The implementation adds:
The system now supports discovering both linear diffusion equations and nonlinear convection-diffusion equations from numerical data, significantly expanding its capabilities for physics-informed machine learning applications.
Review & Testing Checklist for Human
Critical: Verify upwind differencing implementation - The BurgersFDM.solve() method uses upwind differencing for the nonlinear convection term u×∂u/∂x. Review lines 122-125 in pde_discovery.py to ensure the conditional logic and finite difference stencils are mathematically correct.
Critical: Investigate PDE discovery accuracy - Current tests show 50% error in viscosity coefficient discovery (test_burgers_system.py output). The structural discovery works (finds correct u×∂u/∂x + ν×∂²u/∂x² form) but parameter optimization needs improvement.
Test end-to-end functionality - Run
streamlit run pde_discovery.py --server.port 8504and verify both equation types work correctly: heat conduction with Gaussian initial conditions and Burgers with step function initial conditions producing visible shock waves.Verify stability conditions - The combined CFL (≤ 1.0) and diffusion (r ≤ 0.5) stability checks in BurgersFDM.init should prevent numerical instability. Test with various parameter combinations to ensure warnings appear appropriately.
Recommended test plan:
python burgers_data_generation.pypython test_pde_system.pyandpython test_burgers_system.pyDiagram
%%{ init : { "theme" : "default" }}%% graph TD UI["pde_discovery.py<br/>Streamlit Interface"]:::major-edit HeatFDM["HeatConductionFDM<br/>Linear Solver"]:::context BurgersFDM["BurgersFDM<br/>Nonlinear Solver"]:::major-edit PDERegression["PDESymbolicRegression<br/>Discovery Engine"]:::major-edit DataGen["burgers_data_generation.py<br/>Synthetic Data"]:::major-edit TestSuite["test_burgers_system.py<br/>Validation Tests"]:::major-edit UI --> HeatFDM UI --> BurgersFDM UI --> PDERegression BurgersFDM --> DataGen PDERegression --> TestSuite PDERegression --> |"discover_heat_equation()"| HeatFDM PDERegression --> |"discover_burgers_equation()"| BurgersFDM subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes