Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions freegs4e/equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,13 +1122,15 @@ def magneticAxis(self):
# find critical points
opts, xpts = critical.find_critical(self.R, self.Z, self.psi())

# find closest O-point to the geometric axis
geom_axis = self.geometricAxis()[0:2]
o_point_ind = np.argmin(
np.sum((opts[:, 0:2] - geom_axis) ** 2, axis=1)
)
return opts[0, :]

# # find closest O-point to the geometric axis
# geom_axis = self.geometricAxis()[0:2]
# o_point_ind = np.argmin(
# np.sum((opts[:, 0:2] - geom_axis) ** 2, axis=1)
# )

return opts[o_point_ind, :]
# return opts[o_point_ind, :]

def Rcurrent(self):
"""
Expand Down