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

backport of #837, #838, #834 plus distutils fix #835

Merged
merged 9 commits into from
Nov 29, 2023

Conversation

gertjanvanzwieten
Copy link
Contributor

@gertjanvanzwieten gertjanvanzwieten commented Oct 20, 2023

No description provided.

gertjanvanzwieten and others added 8 commits November 29, 2023 10:29
The function sphinx.util.status_iterator was deprecated in favour of
sphinx.util.display.status_iterator. This patch changes the generate_api
function sphinx_mods.py accordingly.
This patch updates the URL to the Intel OneAPI documentation to its new
location.
MKL version 2024.0.0 that appeared on PyPi on Nov 14, 2023, triggers an as yet
unexplained WinError exception on Windows. This patch limits the dependency to
the most recent version before it, which is 2023.2.1 released Oct 19, 2023,
until these problems are resolved.
The implementations of the degree one std and the bubble bases for the
`SimplexTopology` incorrectly assume that the `simplices` array contains
vertex in `range(nverts)` without holes, and use this array as is as
dofs, thereby introducing zeros in the basis for every dof in
`set(range(simplices.max() + 1)) - set(simplices.flat)`. The boundary of
a `SimplexTopology`, however, simply returns a subset of the volume
`simplices` array, without renumbering.

This bug was introduced by 7e29a28, which removes `_renumber` as
preprocessor for the `simplices` parameter of
the `SimplexTopology` constructor.

To fix this problem this patch adds a `contiguous_simplices` property
and uses thses as dofs. The alternative, requiring constructing a
`SimplexTopology` with contiguous `simplices`, was rejected because this
puts a computational burden on every boundary of a `SimplexTopology`,
even if we don't create a basis.
This patch adds the `connectivity` attribute to `EmptyTopology` for
completeness.
This patch implements the `boundary` and `interfaces` attributes for the
`EmptyTopology`, which is needed by a subsequent patch fixing empty
boundaries of a `SimplexTopology`.
The constructor of `SimplexTopology` trips over

    assert numpy.greater(self.simplices[:, 1:], self.simplices[:, :-1]).all()

if there are no simplices. This is triggered when taking the boundary of
a fully periodic mesh.

This patch fixes the problem by returning an `EmptyTopology` when the
boundary is empty. In addition this patch adds a slightly improved error
message when trying to create an empty `SimplexTopology.
This patch changed the implementation of _takeslice such that it wraps
evaluable.Range directly rather than a lambda function, which caused the
resulting array to not be picklable. A unit test is added to safeguard against
similar mistakes in future.
@gertjanvanzwieten gertjanvanzwieten changed the title fix picklability of sliced function array backport of #837, #838, #834 Nov 29, 2023
This patch removes the version check from __init__.py, which broke in Python
3.12 with the removal of distutils after being deprecated since Python 3.10. No
replacement test is introduced as dependency checks should be the
responsibility of pip.
@gertjanvanzwieten gertjanvanzwieten changed the title backport of #837, #838, #834 backport of #837, #838, #834 plus distutils fix Nov 29, 2023
@gertjanvanzwieten gertjanvanzwieten merged commit f595ff5 into release/8 Nov 29, 2023
21 of 22 checks passed
@joostvanzwieten joostvanzwieten deleted the pickleslice-bpo branch February 27, 2024 10:27
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