forked from pyccel/psydac
-
Notifications
You must be signed in to change notification settings - Fork 0
Rebase devel tiny #38
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closes pyccel#476: * Do not restrict the maximum Python version to 3.12 in `pyproject.toml` * Require `Cython >= 3` to avoid `h5py` installation crash w/ Python 3.13 * Require `sympde == 0.19.2` which supports Python 3.13 * Run unit tests with Python 3.13 too
Currently, Psydac can not be used on Apple M4 computers since the `PSYDAC_BACKEND_GPYCCEL['flags']` is not set correctly. This change sets the flag for `Apple MX (etc.)` to `apple-mX`, which should work so long as the naming scheme stays unchanged. In addition, the regular expression used to find the GFortran version is now defined in a raw string instead of a standard Python UTF8 string. This avoids a `SyntaxWarning: invalid escape sequence`. --------- Co-authored-by: Yaman Güçlü <[email protected]>
* Use raw strings for docstrings with LaTeX to avoid UTF8 syntax warnings on escape sequences; * Use CSC matrices to avoid SciPy sparse solver warning. We do not address the NumPy warnings which arise in our MPI unit tests (see pyccel#353).
…yccel#484) Main changes -------------- * Rename the method `dot` of the base class `VectorSpace` as `inner`, and make it an abstract method (which must be implemented by the subclasses). * Rename the method `dot` of the base class `Vector` as `inner`. This is a concrete method which calls `self.space.inner` and does not need to be overridden by the subclasses. * Add `inner` methods to the classes `StencilVector`, `BlockVectorSpace`, and `DenseVectorSpace`. These methods override the abstract method of the base class as required, and are derived from the former functions `Stencil.dot`, `BlockVector.dot`, and `DenseVector.dot`, which have been removed (see next point). * Remove the property `dtype` and the method `dot` (now `inner`) from the classes `StencilVector`, `BlockVector`, and `DenseVector`, because the default methods of the base class already provide a sufficient implementation. This fixes pyccel#330. Necessary additional changes ------------------------------ * Update all linear solvers in `linalg.solvers` with the new method calls; * Update all unit tests with the new method calls, in files: - `api/tests/test_assembly.py` - `feec/tests/test_commuting_projections.py` - `feec/tests/test_global_projectors.py` - `linalg/tests/test_block.py` - `linalg/tests/test_linalg.py` - `linalg/tests/test_stencil_interface_matrix.py` - `linalg/tests/test_stencil_vector.py` Unrelated additional changes ----------------------------- * Rename the class `VectorDot` as `VectorInner` in module `api.ast.linalg`, although never used in Psydac. * Speed up 3D unit tests in: - `feec/tests/test_commuting_projectors.py` - `feec/tests/test_global_projectors.py`
--------- Co-authored-by: Yaman Güçlü <[email protected]>
…yccel#493) Implement `M.dot(u).inner(v)`, or `(M @ u).inner(v)`, without creating a temporary vector. The result of the dot product is written to a local work vector stored in the `LinearOperator` object. This work vector is then used to compute the inner product with the vector `v`. The subclasses do not need to override this method, unless a more efficient implementation which avoids writing to the work vector altogether (reducing memory pressure) is needed. A unit test is added: function `test_dot_inner` in file psydac/linalg/tests/test_linalg.py. Additionally, the helper function `get_StencilVectorSpace` defined in psydac/linalg/tests/test_linalg.py (only used in the same file and in test_matrix_free.py) has a new signature and now works in any number of dimensions. Fixes pyccel#491.
This PR changes the code generation involved in the `discretize` function to avoid calculating unnecessary derivatives. This allows for using constant spline (degree 0) discretizations, for which we have to make a special case in the calculation of ghost regions in `psydac/linalg/stencil.py`. Additionally, we add basic unit tests checking discretizations using zero-degree splines. This fixes pyccel#489 and fixes pyccel#307. On this occasion, we also do small changes in the `.github/workflows/testing.yml` script as some tests had complications without them. --------- Co-authored-by: Yaman Güçlü <[email protected]>
Always use the maximum padding between test and trial spaces in `allocate_matrices` in `DiscreteBilinearForm`. (Earlier this was not done in the case of scalar spaces.) Fixes pyccel#504.
Pyccel 2.0 was just released, which means some of the kernels in Psydac need to be updated: - Remove the `template` decorator (see pyccel/pyccel#2331) * Add `T` as `TypeVar` * Specify `T`, `T[:]`, `T[:,:]`, ... in function arguments. - Replace `@types` decorators (see pyccel/pyccel#2329) - Replace `const` with `Final` (see pyccel/pyccel#2340) Further changes: - Update import path for `epyccel` (fixes pyccel#426) - Update arguments to `epyccel` (see pyccel/pyccel#2348): * Rename `fflags` to `flags` * Replace `accelerators` list with `openmp` bool - Require Pyccel >= 2.0.1 (fixes pyccel#471) --------- Co-authored-by: Yaman Güçlü <[email protected]> Co-authored-by: Elena Moral Sánchez <[email protected]> Co-authored-by: Emily Bourne <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.