Closed yguclu closed 1 month ago
Summary of what I understood in this PR:
continuous-integration.yml
and new sympde 0.19.0
reflected in pyproject.toml
maxwell_2d_multi_patch.py
gives a passing result:$ python3.12 examples/maxwell_2d_multi_patch.py
> Grid :: [4,4]
> Degree :: [2,2]
> CG info :: {'niter': 829, 'success': np.True_, 'res_norm': 9.976906608695098e-09}
> L2 error :: 1.59e+00
> Solution time :: 2.72e+01
> Evaluat. time :: 3.61e-02
We make Psydac support Python 3.12 by using NumPy >= 2.0 together with Petsc4py >= 3.21 and the master branch of Igakit (updated on 6 Aug 2024). We also increase the required SymPDE version to 0.19.0. For simplicity, the same requirements are made for older versions of Python.
This closes #406.
Rationale
Python 3.12 does not have a
distutils
module. Therefore, NumPy 2.0 was released on 16 Jun 2024 with a newmeson
backend for thef2py
tool which is part of the library. As of 6 Aug 2024, Igakit also moved fromdistutils
to themeson-python
build system in combination with NumPy 2.0.The first version of
petsc4py
which is compatible with Python 3.12 is shipped with PETSc 3.21, hence we use this now instead of PETSc 3.20. Such a version ofpetsc4py
also requires NumPy >= 2.0.The move to NumPy 2.0 also means that some numeric datatypes behave differently. For this we need SymPDE >= 0.19.0.
Summary of changes
pyproject.toml
, set maximum Python version to 3.12, and require SymPDE 0.19.0 instead of 0.18.3;README.md
, increase PETSc version to 3.21.4;integral
ofTensorFemSpace
, convert any NumPy result to the native Python type to avoid errors with SymPy'ssympify
(after the upgrade to NumPy 2.0);continuous-integration.yml
, add tests with Python 3.12, increase PETSc version to 3.21.4, and add check of parallel h5py.