Skip to content

Commit

Permalink
Switch to freeqdsk for reading/writing geqdsk files
Browse files Browse the repository at this point in the history
Closes #179
  • Loading branch information
ZedThree committed Sep 20, 2024
1 parent d8e6be6 commit 53c48f4
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 511 deletions.
2 changes: 1 addition & 1 deletion hypnotoad/cases/tokamak.py
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ def read_geqdsk(
if settings is None:
settings = {}

from ..geqdsk._geqdsk import read as geq_read
from freeqdsk.geqdsk import read as geq_read

data = geq_read(filehandle)

Expand Down
4 changes: 2 additions & 2 deletions hypnotoad/cases/torpex.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from collections import OrderedDict
import warnings

from freeqdsk.geqdsk import read as geq_read
import numpy
from optionsfactory import WithMeta
from optionsfactory.checks import is_positive
Expand All @@ -31,7 +32,6 @@
EquilibriumRegion,
SolutionError,
)
from ..geqdsk._geqdsk import read as geq_read
from ..utils.utils import with_default

# type for manipulating information about magnetic field coils
Expand Down Expand Up @@ -688,7 +688,7 @@ def createMesh(filename):


def createEqdsk(equilib, *, nR, Rmin, Rmax, nZ, Zmin, Zmax, filename="torpex_test.g"):
from ..geqdsk._geqdsk import write as geq_write
from freeqdsk.geqdsk import write as geq_write

R = numpy.linspace(Rmin, Rmax, nR)[numpy.newaxis, :]
Z = numpy.linspace(Zmin, Zmax, nZ)[:, numpy.newaxis]
Expand Down
Empty file removed hypnotoad/geqdsk/__init__.py
Empty file.
126 changes: 0 additions & 126 deletions hypnotoad/geqdsk/_fileutils.py

This file was deleted.

Loading

0 comments on commit 53c48f4

Please sign in to comment.