Skip to content
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

Update stencil2coo kernels for shifts > 1 #442

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Conversation

max-models
Copy link
Contributor

@max-models max-models commented Sep 26, 2024

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.

…oarray() works for StencilMatrix in 1D. A unit test (test_stencil_matrix_1d_toarray) can be found in test_stencil_matrix.py
…atrix_1d_serial_toarray and test_stencil_matrix_2d_serial_toarray instead. Changed the index generation for the 2D and 3D kernels in stencil2coo_kernels.py
@max-models max-models marked this pull request as ready for review September 26, 2024 13:25
psydac/linalg/tests/test_stencil_matrix.py Outdated Show resolved Hide resolved
psydac/linalg/tests/test_stencil_matrix.py Outdated Show resolved Hide resolved
@yguclu yguclu changed the title Update of stencil2coo 1D kernels for shifts > 1 Update stencil2coo kernels for shifts > 1 Sep 27, 2024
max-models and others added 2 commits September 27, 2024 11:40
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
@yguclu yguclu merged commit 4ac671e into devel Sep 27, 2024
7 checks passed
@yguclu yguclu deleted the fix-stencilmatrix-toarray branch September 27, 2024 14:24
max-models added a commit that referenced this pull request Oct 1, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants