Skip to content

Conversation

@connorjward
Copy link
Contributor

@connorjward connorjward commented Jan 11, 2024

Replace PyOP2 with pyop3.

Thesis link

Summary

Data structures for unstructured meshes are much more complicated than N-dimensional arrays. Firedrake therefore does an awful lot of very involved bookkeeping to make sure that things work.

The key contribution of pyop3 is a new abstraction for describing data layouts, called axis trees. Axis trees are able to describe mesh data layouts completely from a high-level specification. This has the dual set of benefits of: (a) being able to delete a lot of complex Firedrake code, and (b) we can now express a whole suite of algorithms that would otherwise be very difficult to write.

You can think of pyop3 as 'a JIT-compiled numpy for unstructured mesh data'.

pyop3

Core concepts

Expected benefits

API changes visible in Firedrake

Drop support for variable layer extruded meshes

Users should use a cell submesh instead to get the right behaviour.

Explanation

The functionality appeared not to be used by the community (e.g. thetisproject/thetis#405) and porting the functionality would have been a large amount of work.

.sub() expects a tuple instead of integer for tensor spaces.

@connorjward connorjward changed the title pyop3 (WIP) pyop3 Mar 21, 2024
--global and others added 27 commits July 30, 2025 15:20
WIP
Currently failing because ragged temporaries crash. This is currently
hitting a breakpoint in layouts.py so we can progress from there.
WIP
Fixed a lot of intermediate bugs. Now getting a segfault... Probably
should start looking where we have those ragged temporaries.
Now a failure much much later on in the process.
What a momentous occasion.
Seems like some of the traversals (esp. replace) can be quite expensive.
We seem to gain with eager evals of some conditions...
SO much nicer this time around!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants