Explorations of object oriented Fortran with bind(c) derived types for representations generated by F2PY Background Derived types are easily one of the most visible of the modern Fortran (post-F90) features and are central to object oriented programming paradigms in Fortarn. For those new to the language, a rough guide to some terminology: Fortran Closest C/C++ equivalent derived type struct extends type inherited class final destructor not standard conforming undefined behaviour Only the fir...| rgoswami.me
A closer look at the standard Fortran C compatibility layer by exploring objects and linkers Background Derived types and their interoperability have been covered previously in the context of usage from Python. However, much of the focus of the previous approach revolved around the iso_c_binding intrinsic module. A closer inspection of the functionality provided therein is the first step towards extending beyond the standards to support calling type bound procedures.| rgoswami.me
Moving simple Fortran derived types to Python and back via C Background Object oriented programming has been part of Fortran for longer than I have been alive 1. Fortran has derived types now. They’ve been around for around for over three decades. The standards at the same time, have been supporting more and more interoperable operations. Details of these pleasant historical improvements are pretty much the most the Fortran standards committee have managed to date in the 21st century.| rgoswami.me
Exploring meson for interfacing fortran and python via f2py and standard techniques, with benchmarks. Background A recent post gauging community interest in f2py brought to light (among other aspects) the fact that the build systems of f2py are rather opaque to the end user. There are good reasons for this, since many of the tools discussed in this post were not around / in any shape to be used during the active development of f2py1.| rgoswami.me