FEniCS / ffcx

Next generation FEniCS Form Compiler for finite element forms
https://fenicsproject.org
Other
140 stars 39 forks source link

Add support for mixed-dimensional kernels (codimension 1) #675

Closed jpdean closed 1 month ago

jpdean commented 3 months ago

This PR adds support for mixed-dimensional kernels of codimension 1. It requires this PR to work.

It would be nice to avoid passing cell to analyse_modified_terminal. Please let me know if anyone has any thoughts on this.

michalhabera commented 3 months ago

I think you've correctly noted that passing cell into analyse_modified_terminal is weird. It feels odd to store codim (which is the property of the element) to modified terminal, which has the purpose of defining the context in which the element/terminal is tabulated. In many places you already have the cell and the element, from which you can deduce the codimension, no?

For the analysis, I'd try to deduce the codim from cell and element and for the access you might need to store the codim as property of tabledata. Does that make sense or I am missing something?

jpdean commented 2 months ago

Thanks for the feedback everyone! This PR means that permutations are now only needed for the codim 0 cell, which simplifies this PR quite a lot. I think this will address most of the comments here, but I'll work on fixing the others soon.

jpdean commented 1 month ago

Are there any further issues anyone would like me to address?