mario.set_linear_strategy#

mario.set_linear_strategy(strategy: str)#

Set how MARIO should solve sparse linear systems under compute_method='solve'.

Parameters:

strategy

One of "auto", "direct" or "iterative".

  • "auto" chooses between sparse direct factorization and iterative Krylov solves based on matrix size and number of right-hand sides.

  • "direct" forces sparse direct factorization.

  • "iterative" forces iterative sparse solves.

Notes

This setting only affects formulas that already run through the solve-based path. It does not change the higher-level choice between explicit-inverse and solve-based formulas, which is controlled by mario.set_compute_method().