Skip to content

"linearsolver" block

Linear solver settings are configured in the JSON block "linearsolver".

json { "linearsolver": { "type": "gmres", "preconditioner": "lu", "maxiters": 10000, "restarts": 1600, "tolerance": 1.0e-26 } }

If the whole block is omitted, AsFem falls back to its default linear solver settings.

Options

  • "type": optional string. Default is "gmres".
  • "preconditioner": optional string. Default is "bjacobi".
  • "maxiters": optional integer. Default is 10000.
  • "restarts": optional integer. Default is 2000.
  • "tolerance": optional floating-point value. Default is 1.0e-16.

Use a floating-point literal such as 1.0e-16 for "tolerance". The current parser checks it with is_number_float().

Supported solver types

text gmres fgmres lgmres dgmres pgmres cg chebyshev richardson bcgs bicg mumps superlu

Supported preconditioners

text jacobi bjacobi sor eisenstat icc ilu asm gasm gamg bddc ksp composite lu cholesky none shell

The old "solver" and "preconditioner" entries inside "nlsolver" are not part of the current parser anymore. Linear solver settings now belong in the separate "linearsolver" block.