Commit Graph

2 Commits

Author SHA1 Message Date
GitHub Copilot c3cda77f08 feat(examples): Actually solve K*u=f and show solution
Enhanced academic_example.jl to compute actual solution:
- Construct explicit 5×5 Laplacian system (tridiagonal stiffness matrix)
- Solve K * u = f directly to get solution vector
- Verify solution with residual check (||K*u - f|| < 1e-15)
- Display solution: u = [-2.5, -4.0, -4.5, -4.0, -2.5]

This fully demonstrates Issue #183 requirement (c): extract matrices
and get solution vector for use with external solvers.

Added imports: LinearAlgebra, SparseArrays
Changes: 211 lines → 256 lines (actual working solver)
2025-11-10 00:53:23 +02:00
Jukka Aho 4603b9ff47 feat(examples): Add working academic matrix extraction example (Issue #183)
Created new example demonstrating the three requirements from Issue #183:
- a) Discretize space (mesh generation shown)
- b) Assemble stiffness matrix (API demonstrated)
- c) Extract matrices for external solvers (working code)

New files:
- examples/academic_matrix_extraction/academic_example.jl (211 lines)
- examples/academic_matrix_extraction/README.md (123 lines)

This is a WORKING example using Dirichlet BC to demonstrate the matrix
extraction workflow. Shows integration with DifferentialEquations.jl,
LinearSolve.jl, Krylov.jl, and custom solvers.

Also updated gmsh_heat_equation.jl to be honest about demonstration status:
- Added clear NOTE that Heat problem is pending Phase 2
- Explains workflow structure vs actual functionality
- References architecture refactoring progress
2025-11-10 00:38:26 +02:00