Commit b3705d3a authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

add readme

parent 11dba4e6
cmake_minimum_required(VERSION 3.12.0)
find_package(PythonExtensions REQUIRED)
find_package(NumPy REQUIRED)
find_package(F2PY REQUIRED)
# skbuild_fortran_test
A sample project build with [scikit-build](
We provide a fortran wrapper file, that is linked against an external
[fortran library]( that provides
global variables and interfaces to manipulated them.
In addition, the external library is also linking against [FORCES](
This fortran library will eventually be [mHM]( in the context of FINAM.
The wrapper (`wrap_lib/wrapper.f90`) is just a small layer on top of these
interfaces to be compatible with [f2py](
To compile everything locally
([editable install](,
you can use pip:
pip install -e . --user
Afterwards you can call the wrapper routines from (I)Python:
In [1]: import wrap_lib as wl
In [2]: wl.set_globals(1, 2., [3,4])
In [3]: wl.set_container(10, 20., [30,40])
In [4]: wl.print_vars()
global int: 1
global real: 2.0000000000000000
global array: 3.0000000000000000 4.0000000000000000
container int: 10
container real: 20.000000000000000
container array: 30.000000000000000 40.000000000000000
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment