pyccel / psydac

Python 3 library for isogeometric analysis
https://pyccel.github.io/psydac/
MIT License
52 stars 18 forks source link

Fix example file maxwell_2d_multi_patch.py #387

Closed jowezarek closed 7 months ago

jowezarek commented 7 months ago

In psydac/examples/, the file maxwell_2d_multi_patch.py did not run because of this line

equation_h.set_solver('pcg', pc='jacobi', tol=1e-8, info=True)

Passing the string 'jacobi' is no longer allowed since PR #360. I copied the workaround found in api/tests/test_2d_multipatch_mapping_maxwell.py:

equation_h.assemble()
jacobi_pc = equation_h.linear_system.lhs.diagonal(inverse=True)
equation_h.set_solver('pcg', pc=jacobi_pc, tol=1e-8, info=True)