Skip to content

Commit

Permalink
Merge branch 'more-6' of https://github.com/boutproject/zoidberg into…
Browse files Browse the repository at this point in the history
… more-6
  • Loading branch information
dschwoerer committed Nov 8, 2024
2 parents b73592c + c20c2ad commit e328d11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
3 changes: 1 addition & 2 deletions zoidberg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

__version__ = get_version(root="..", relative_to=__file__)

from . import zoidberg
from . import field, fieldtracer, grid, plot
from . import field, fieldtracer, grid, plot, zoidberg
from .zoidberg import make_maps, write_maps

__all__ = [
Expand Down
17 changes: 2 additions & 15 deletions zoidberg/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,8 @@ def Rfunc(self, x, z, phi):


try:
from sympy import (
And,
Piecewise,
Sum,
Symbol,
atan2,
cos,
diff,
factorial,
lambdify,
log,
pi,
sin,
sqrt,
)
from sympy import (And, Piecewise, Sum, Symbol, atan2, cos, diff,
factorial, lambdify, log, pi, sin, sqrt)

class StraightStellarator(MagneticField):
"""A "rotating ellipse" stellarator without curvature
Expand Down
6 changes: 3 additions & 3 deletions zoidberg/poloidal_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ def findIndex(self, R, Z, tol=1e-10, show=False):

# Create a mask for the positions
mask = np.ones(xind.shape)
mask[
np.logical_or((xind < 0.5), (xind > (nx - 1.5)))
] = 0.0 # Set to zero if near the boundary
mask[np.logical_or((xind < 0.5), (xind > (nx - 1.5)))] = (
0.0 # Set to zero if near the boundary
)

if show and plotting_available:
plt.plot(self.R, self.Z, ".")
Expand Down

0 comments on commit e328d11

Please sign in to comment.