Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inital prototype / proof-of-concept for PyBind11/Fortwrap wrapping #88

Merged
merged 9 commits into from
Sep 11, 2023

Conversation

vegardjervell
Copy link
Collaborator

"Reopening" PR #61 here so that we can have some nice repo structure :)

vegardjervell and others added 9 commits May 10, 2023 17:53
… wrapping

The current `pybind11_bindings.cpp` contains minor manual tweaks that are necessary and have not yet been automated. Specifically: The lambdas exposed to python take `std::vector`s as arguments (such that python can pass a `list`), and forwards `std::vector.data()` to the internal C++ method. This is necessary for non-modifiable, obligatory arguments that are arrays."
…initialization

Only implemented the database and handlers, not the actual ctor procedures.
Moved fortran main and cpp main to new directories, and made `rebuild_fortran_prog.sh` up-to-date. Note: `build.sh` is not up to date, and will fail.

Also made some code less SHOUTY AND LOUD.
Supports individually building the fortran library, cpp wrapper and cpp wrapper with pybind bindings
…_test.

Messed around and figured out what the problems with the top level CMakeLists.txt were.

Modified FortWrapOptions.txt for correct wrapping, and regenerated cpp wrapper. pybind11_bindings still needs some manual editing, specifically adding the .data() part to std::vectors that are passed from a lambda to the internal method, and ensuring that the types in the argument list are correct (optional, modifiable arguments are currently std::vector, but should be p_array_f).
@morteham morteham self-requested a review September 11, 2023 18:21
Copy link
Contributor

@morteham morteham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work:-)

@morteham morteham merged commit db737fc into beta_v3/main Sep 11, 2023
@morteham morteham deleted the prototype branch September 11, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants