You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-31Lines changed: 2 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,13 @@ through python this enables many applications beyond simple simulations
20
20
diagnostics. The only downside is of course that all functions are
21
21
unparallelized in python.
22
22
23
-
As a second addition, now also Feltor's geometries extension is available in python.
23
+
As a second addition, Feltor's geometries extension is available in python.
24
24
However, the geometries functions and classes are not re-implemented in python, but
25
25
they are bound to python via the [pybind11](https://github.com/pybind/pybind11)
26
26
library. As such the corresponding C++ binding code must be compiled in order
27
27
to generate the module `dg.geo`.
28
28
## Installation
29
-
### The pyfeltor.dg module
30
-
> You need python3 to install this module
29
+
> The `pyfeltor.dg.geo` part of the module contains python bindings for the underlying C++ [feltor](https://github.com/feltor-dev/feltor) code using [pybind11](https://github.com/pybind/pybind11). During installation the C++ code will be compiled using cmake, which may take a minute or two.
31
30
32
31
The simplest way is to install from the python package index [pypi](https://pypi.org/) via the package manager [pip](https://pip.pypa.io/en/stable/) v23.0
33
32
```bash
@@ -45,34 +44,6 @@ cd tests
45
44
pytest-3 -s .# run all the unittests with output
46
45
```
47
46
48
-
### The pyfeltor.dg.geo module
49
-
Currently, the only way to install this module is via a local, editable install.
50
-
Assuming that the pyfeltor.dg module was succesfully installed this way
51
-
- the first step is to also install [feltor](https://github.com/feltor-dev/feltor)
52
-
following the quick start guide for a base installation.
53
-
- Second, instead of jsoncpp we here use the
54
-
[nlohmann/json](https://github.com/nlohmann/json) parser available either as a
55
-
system package `nlohmann-json3-dev`.
56
-
- Next, we follow the first steps guide on [pybind11](https://github.com/pybind11/pybind11)
57
-
and install it via `python3 -m pip install pybind11`.
58
-
- Further, we install the 'python3-dev', `pybind11-dev` and `pybind11-json-dev` system packages for
59
-
the corresponding C++ header files.
60
-
61
-
Finally, invoke the Makefile in this repository
62
-
```bash
63
-
export FELTOR_PATH=path/to/feltor
64
-
make -j 4
65
-
```
66
-
Replace `path/to/feltor` with the path to the Feltor library relative to the current
67
-
directory. By default `FELTOR_PATH=../feltor`.
68
-
69
-
That's it. With the editable install the `pyfeltor.dg.geo` module is now automatically
70
-
imported together with `pyfeltor.dg`.
71
-
You can test if it works by executing the test
72
-
```bash
73
-
cd tests
74
-
pytest -s test_geometries
75
-
```
76
47
## Usage
77
48
78
49
Generally, pyfeltor is built to mimic the `dg` library in feltor.
0 commit comments