-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose inter-/histopolation matrices in GlobalProjector, add unit tests #347
base: devel
Are you sure you want to change the base?
Conversation
Hi @yguclu, it seems I cannot see why the latest test failed, do you have an idea? Also, did you have time to think about this PR yet? |
Python 3.11 tests passed upon relaunching test, without changes. |
@spossann It seems that the code could be simplified with these steps:
Before making any of these changes, could you please add a parallel test to this PR? |
The function |
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
…1, this fixes the problem with toarray() which did previously not work for StencilMatrix. Updated indexing in KroneckerStencilMatrix to include shift factors in index calculations. Added back the assert statement in GlobalProjector since the toarray() now works. The kernels still don't work properly for different shifts in the domain and the co-domain, but I believe equivalent changes can be done in the remaining kernels.
- Add compiler flags for GFortran >= 14 on Apple silicon chips - Add unit test in `test_epyccel_flags.py` to check compiler flags passed to `epyccel` - Update GitHub actions used in documentation workflow
NumPy 2.1 deprecates the `newshape` argument of the `reshape` function. Instead, one should use the positional-only argument `shape`. Every call in Psydac has been updated accordingly. This closes #432.
Update `apt` index files with `apt-get update` to avoid download error in CI workflow.
Clarify in the `README.md` file that, although the C backend may be selected for accelerating the kernel files with Pyccel, this is not fully working yet. Hence the Fortran backend (which is the default) is the only one available. A future version of Pyccel will certainly provide a C backend as capable as the Fortran one. See issue #431. Co-authored-by: Martin Campos Pinto <campos@ann.jussieu.fr>
The obsolete property `is_block` was never used in Psydac nor in Struphy, hence we remove it. --------- Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Fix the indexing in all kernels in `stencil2coo_kernels.py` so that the method `toarray` works for `StencilMatrix` objects in 1D/2D/3D with `shift` larger than 1. The unit tests for `toarray` in `test_stencil_matrix.py` have been parametrized to run with `shift` values of 1 and 2. --------- Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Pushed with the 3D tests uncommented to ensure they all go through. |
Fixes #346.
The inter-/histopolation matrices are now exposed in
GlobalProjector.imat_kronecker
as aLinearOperator
object of typeKroneckerStencilMatrix
(in the case where both domain and codomain are scalar spaces) orBlockLinearOperator
(in the case where at least one space is vector valued).The unit tests in
feec/tests/test_commuting_projections.py
have been enhanced: they now also test how closeimat_kronecker
is to being the right-inverse of thesolver
attribute (which uses a Kronecker product of 1D linear solvers).