FEniCS / ffcx

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

Use numpy-like descriptions for scalar type in command line #595

Closed chrisrichardson closed 9 months ago

chrisrichardson commented 1 year ago

Instead of using C types, it would be neater to use numpy types for the scalar type, when needed. e.g. ffcx --scalar_type=complex128 Form.py rather than ffcx --scalar_type="double _Complex" Form.py

The translation to implementation scalar type would take place in the "C" language implementation part.

chrisrichardson commented 1 year ago

This will require changes in dolfinx and anywhere that calls ffcx with scalar type.

chrisrichardson commented 1 year ago

Note that some languages have sufficient templating to defer the choice of scalar. E.g. c++ or numba

chrisrichardson commented 9 months ago

Fixed in PR #647