GeoStat-Framework / pentapy

A Python toolbox for pentadiagonal linear systems
https://pentapy.readthedocs.io/
MIT License
14 stars 4 forks source link

Enable multiple right-hand sides, fix C-division and `n=3`-edge case, made tests elaborate #26

Closed MothNik closed 2 months ago

MothNik commented 3 months ago

Edit June 09, 2024

27 is an improved version of this pull request. The following describes the basic changes that #27 relies on. However, this pull request is not really required anymore. I will still leave it open for a bit.


This pull request primarily tackles #11 by enabling multiple right hand sides for the pentapy-solvers. Currently, this is only implemented in a serial fashion because the current API does not specify the memory layout of the input Arrays. This makes it quite hard to completely remove the GIL which is required for parallelization of Cython level, but the serial fashion implements the feature in a first step βœ… Implementing this required a shotgun refactoring on Cython-level for a consistent, scalable flow and memory handling that relies on memoisation.

Furthermore the pull request fixes

I've found the development with the current package setup causes so much friction on simple tasks and maintainability was not really facilitated, so

Finally, some typos were fixed. With a VSCode extension like CSpell or a similar spell checker, this can be avioded.

I tried to update the changelog, but feel free to adapt this. I don't really know what has to be updated in terms of other documentations and stuff around, but you know better. I also don't know where to update the version and if these changes are a minor or a major jump for the version.

I really hope that I didn't miss anything, but all the new tests pass and the bound checker never ran into an out of bounds error βœ…

Sorry, that this is such a big PR, but I would not have been able to ensure that everything works fine with the current package setup πŸ™

MothNik commented 3 months ago

This Pull request should be squashed before merging.

MothNik commented 3 months ago

For the documentation, the only thing that changed is the API of solve. I hope you like the additional details, although the type hint for solver on top is a bit big.