Parameter settings for improving PyLith performance

Several performance improvements are coming in PyLith version 5 (anticipated release in early June 2026). Two of these improvements only involve updating PETSc options, so they can be used in PyLith version 4.1 and later.

Solver settings for elasticity with prescribed slip

  1. Set the length scale to match the nominal discretization size.
  2. Adjust the PETSc solver settings.
[pylithapp.petsc]
pc_type = gamg
dm_reorder_section = True
dm_reorder_section_type = cohesive
mg_fine_pc_type = vpbjacobi
ksp_gmres_restart = 100
mg_fine_ksp_max_it = 5
  1. Set the KSP and SNES absolute tolerances relative to the length scale (this will not be required in PyLith version 5). To achieve an accuracy in the displacement field of 1.0e-7 relative to the nominal displacement, u_\mathit{nominal}, use

ksp\_atol = 1.0 \times 10^{-7} \ u_\mathit{nominal} / h_o,
snes\_atol = 4.0 \times 10^{-7} \ u_\mathit{nominal} / h_o.

Note: If you see multiple SNES iterations for a linear problem, then check the length scale to make sure it matches the nominal discretization size, and then reduce the KSP absolute tolerance if necessary.

Adaptive time stepping

Refer to Adaptive Time-Stepping Options in the PyLith manual (development version).