Repository navigation
Conversation
…neighbours and cell-to-cell facet coordinate transforms
…l facet ID to store facets instead of the facet's position in plex cone of the cell
|
Moved helper methods that operate on the reference element to FIAT, see firedrakeproject/fiat#303 |
|
It's hard to see the ultimate goal without a consumer of the attributes added by the PR. Why does the low-level reference-facet data need to be attached to every facet? |
|
The data can be derived from the DMPlex, but DMPlex does not return the arrays in Firedrake’s local facet numbering.
|
|
The coordinate transforms can be obtained from UFL: You can project them into |
|
@pbrubeck For neighbouring cells, my updated code already uses the DMPlex information. Same for exterior facet masks . For the cell-facet coordinate transforms, I need to go through the FIAT local numbering (that is store the arrays in FIAT local facet ordering) because my particle tracing algorithms are implemented in the reference cell. The mesh entity collision algorithm figures out which facet was crossed based on the barycentric coordinates of the point at the crossing: Which is why the arrays used by the cell-crossing algorithm, namely to figure out which cell is the neighbour across the crossed facet and to map the coordinates of the point to that cell, have to be filled using the same numbering as the crossed facet index (which is FIAT local ordering). |
|
From my understanding you are converting from reference coordinates on the Firedrake uses these orientation arrays for assembly already, so my suggestion to use UFL was to avoid two places in the code that read them. However, is not easier to have neighbors communicate to each other in physical coordinates? Say that you compose the transformations: |
That's right.
I'm not entirely clear on this approach. Firstly, in which reference frame do these UFL expressions apply? Are they describing transformations between facet-local coordinates or cell coordinates of points on facets? What I'm computing in my approach is the latter via the chain |
Compute and cache properties derived from cell-facet adjacency data on meshes:
cell_facet_neighbours: maps each cell to its neighbouring cells across each of its local facetscell_facet_coord_transforms: stores affine reference-coordinate transforms between neighbouring cells across interior facetscell_facet_exterior_mask: marks cell-local facets lying on the exterior domain boundary (distinguishes exterior facets from rank partition boundaries)