FEniCS / ffcx

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

Remove `ufcx.h` #687

Open garth-wells opened 2 months ago

garth-wells commented 2 months ago

With the removal of finite elements and dofmaps from UFCx in #681, there isn't much left apart from the kernel interface. Maybe we can removed ufcx.h and simply document the interface?

jhale commented 2 months ago

I'm currently trying to make ufcx.h and subsequent cffi compilation C11 compliant (complex number support is optional). So if it was removed that would simplify things a lot.

jhale commented 2 months ago

Here is the branch to make ufcx.h C11 compatible (in the sense that complex number support is optional) https://github.com/FEniCS/ffcx/blob/jhale/c11compliance/ffcx/codegeneration/ufcx.h

But then CFFI complains because it cannot deal with C preprocessor macros.

jhale commented 2 months ago

Any remaining necessary metadata about a form/expression could be written to a flat file format rather than being packaged up in a c-struct. This would also have the advantage of being easier to use the metadata across languages - the consumer would only have to worry about a single C interface for the kernel calls.

Edit: Downside is that it would be harder to consume this metadata in C-like languages.