Skip to content

Commit c6b546e

Browse files
committed
Fix flux.cpp py import so it works on Windows
Also fix test_geometries so it passes on Windows
1 parent f8bdb94 commit c6b546e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ pyfeltor/dg/geo/__pycache__
99
.eggs
1010
dist
1111
pyfeltor/_version.py
12+
13+
uv.lock
14+
15+
# ignore visual studio .vs table
16+
/.vs
17+
18+
# CMake output
19+
build
20+
out

pyfeltor/dg/geo/flux.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
namespace py = pybind11;
1212

13-
// import part of itself!? Does this always work?? Wow
14-
py::object grid = py::module_::import( "pyfeltor.dg").attr("Grid");
1513

1614
PYBIND11_MODULE(flux, m) {
1715
m.def( "createSolovevField", &dg::geo::createSolovevField);

tests/test_geometries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def test_sheath(datadir):
8686

8787
point,RO,ZO = dg.geo.findOpoint( mag.get_psip(), R0, 0)
8888
assert( point == 1)
89-
assert( RO == 0.9022324795511738)
90-
assert( ZO == -0.005684720497897021)
89+
assert( abs(RO - 0.9022324795511738) < 1e-10)
90+
assert( abs(ZO - (-0.005684720497897021)) < 1e-10)
9191

9292
closed = dg.geo.mod.ClosedFieldlineRegion( mag);
9393
assert( closed( 0, R0))

0 commit comments

Comments
 (0)