[Sparse_Matrix] Add a runnable example that solves a Matrix Market system end to end

Aperta
#407 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cmake, cpp

Direzione di ricerca

Start with Sparse_Matrix/CMakeLists.txt and the test assets in Sparse_Matrix/test/assets/; check how existing test executables are built and how the library loads Matrix Market files. Build the requested examples/solve_mtx.cpp target with the solver options and output described in the issue, then verify the stated command converges and prints the residual and that CI builds the example.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: sparse-matrix priority: P3 size: S type: enhancement

Summary

The library has no example program, so the only usage documentation is the README snippets, which don't compile (see the README issue). A small CLI would double as a smoke test and a docs-site demo.

Location

  • Sparse_Matrix/CMakeLists.txt
  • Sparse_Matrix/test/assets/

Evidence

find Sparse_Matrix -name '*example*' is empty; the only executables are under test/.

Expected

An examples/solve_mtx.cpp target: load a .mtx, pick a solver/preconditioner, print iterations, residual and timing.

Proposed fix

Add option(SMM_WITH_EXAMPLES), an example using SMM::loadMatrix, BiCGStab + SGS/ILU0 and ConjugateGradient + IC0; reference it from both READMEs. Optionally add a relative-residual (||r||/||b||) stopping mode, since the current absolute L2 criterion depends on problem scale.

Acceptance criteria

  • ./solve_mtx test/assets/mesh1e1_structural_48_48_177.mtx --solver cg converges and prints the residual
  • Example is built in CI

Repository audit, November 2026 · Phase 9 · New features · evidence: found by code reading · ref core-cpp-045


Generated by Claude Code

Lingua principale
C++
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ibra-kdbra/Math-Problems

Tutte le issue di ibra-kdbra/Math-Problems

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.