1.4 KiB
External Solver Tools
This directory contains helper programs for FemLite external-solver workflows. They are developer tools, not runtime library code.
femlite_file_solver.py
femlite_file_solver.py is a small reference solver for the V5 file-exchange
linear solver backend. It reads the handoff manifest, either Matrix Market or
FemLite CSR-array matrix files, and FemLite vector files produced by
LS_EXT_BACKEND_FILE. It solves the dense system with pivoting, writes the
solution vector, and emits a JSON diagnostic report.
Example command template for the runtime backend:
python tools/solvers/femlite_file_solver.py --manifest {manifest:q}
Supported command-template tokens are expanded by the Fortran backend before the command is launched. Common tokens include:
{matrix}/{matrix:q}{rhs}/{rhs:q}{solution}/{solution:q}{csr}/{csr:q}{manifest}/{manifest:q}{nrow},{ncol},{nnz},{tol},{max_iter}
The :q suffix quotes the token for command-line use.
By default the solver reads the Matrix Market file when it exists and falls back
to CSR arrays. Use --matrix-source csr to force the CSR path, which is useful
when validating index-base conversion and adapter handling of compressed sparse
row arrays.
The Python solver intentionally uses only the standard library. It is suitable for small regression packages and adapter bring-up, not for production-scale finite element systems.