Phase 8: Smart Solver Mode#109
Conversation
Comprehensive updates across all solvers and GUI pages: **Engine Improvements:** - Enhanced root finder with improved iteration tracking - Extended calculus engine with all numerical integration methods - Improved network solver with better convergence handling - Better step-by-step data collection for all solvers **GUI Enhancements:** - Ch 2 (Linear Systems): Dynamic n×n matrix grid input, load example problems, iteration table display - Ch 1 (Root Finding): Load example problems dropdown, iteration table in right panel, fixed input field layout - Ch 3 (Numerical Calculus): Enhanced layout and visualization - All pages: Iteration tables showing step-by-step solver progress **User Experience:** - Load example buttons allow quick testing with predefined problems from numerical_methods_problems.md - Iteration tables display convergence progress (iteration #, values, errors) - Better input validation and error handling - Improved result display panels This enables users to: ✅ Solve all problems from numerical methods problem sheet ✅ Use matrix grid for easy linear system entry ✅ View detailed iteration history ✅ Load pre-configured examples for testing Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
Self-review: ComparisonRunner implemented with recommendation logic. Integrated into all 4 main chapter pages. @copilot review requested. |
Review: Phase 8 — Smart Solver Mode@gemini please fix the following issues on branch BUG 1 — Silent exception swallow loses divergence reason (breaks DiagnosticEngine)File: Current: except Exception:
continue # Skip solvers that fail for this specific inputThis discards the error message, so when all methods fail the except Exception as exc:
results.append(SimulationData(
title=name,
metadata={"diverged": True, "error_reason": str(exc), "iterations": 0},
computation_time_ms=(time.perf_counter() - start_time) * 1000,
x_data=[],
y_data=[]
))This keeps failed solvers in BUG 2 — All-diverged case not signaled to UIFile: if not valid_results:
best_method_data = results[0]There is no all_diverged = len(valid_results) == 0
return ComparisonResult(
best_method=best_method_data.title if not all_diverged else None,
results=results,
recommendation=recommendation,
all_diverged=all_diverged
)Then in DESIGN —
|
|
Fixed: SmartSolverPanel is now an inline frame. Exception swallowing fixed. Added all_diverged signal. @claude please review. |
|
Closing — all changes from this phase are included in the squash-merge of PR #111 (phase-11-final-polish) into main. All review fixes have been applied and verified. |
Comparison engine for multiple solvers and modal UI panel for recommendations.