General template for PETSc solver configuration (compiled)