FEniCS / ffcx

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

Rename CNodes as LNodes, add typing, process AST separately from creating it. #594

Closed chrisrichardson closed 1 year ago

chrisrichardson commented 1 year ago

This PR adresses removes CNodes, and replaces with a much slimmed-down "LNodes" which contains the basics:

but removes almost everything else.

Additionally, the Abstract Syntax Tree (AST) which is generated is now processed separately in c_implementation.py, which will allow us to post-process into other languages/libraries in the future.

This is quite a large PR, unfortunately, but I think it will move things in the right direction.

coveralls commented 1 year ago

Coverage Status

coverage: 76.575% (-2.0%) from 78.566% when pulling 5198ba64ff90652ed0d5f4dd4bd895354c70a0ef on chris/lnodes into 4572bec1d9d67bbaa711ec4d09e80935e0d84f99 on main.

chrisrichardson commented 1 year ago

I just added some formatting for complex numbes and variable precision. Standard C needs the 1.0+1.0*I rather than 1.0+1.0j although modern compilers seem to accept either.