Skip to content

Commit 558b4c4

Browse files
author
OJ Robertson
committed
NEO-stella with a clean history.
1 parent a148d5c commit 558b4c4

File tree

68 files changed

+8506
-1168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+8506
-1168
lines changed

AUTOMATIC_TESTS/run_local_stella_simulation.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,10 @@ def process_error(variable):
594594
dydalpha_new = float(variables[7])
595595
exb_nonlin_new = float(variables[8])
596596
fluxfac_new = float(variables[9])
597-
oneovernablerho_new = float(variables[10])
598597

599598
# Read arrays in new *.geometry file
600-
data = np.loadtxt(local_geometry_file,skiprows=4,dtype='float').reshape(-1, 12)
599+
if with_btor: data = np.loadtxt(local_geometry_file,skiprows=4,dtype='float').reshape(-1, 15)
600+
if not with_btor: data = np.loadtxt(local_geometry_file,skiprows=4,dtype='float').reshape(-1, 15)
601601
alpha_new = data[:,0]
602602
zed_new = data[:,1]
603603
zeta_new = data[:,2]
@@ -606,10 +606,13 @@ def process_error(variable):
606606
grady_dot_grady_new = data[:,5]
607607
gradx_dot_grady_new = data[:,6]
608608
gradx_dot_gradx_new = data[:,7]
609-
B_times_gradB_dot_grady_new = data[:,8]
610-
B_times_kappa_dot_grady_new = data[:,9]
611-
B_times_gradB_dot_gradx_new = data[:,10]
612-
bmag_psi0_new = data[:,11]
609+
gds23_new = data[:,8]
610+
gds24_new = data[:,9]
611+
B_times_gradB_dot_grady_new = data[:,10]
612+
B_times_kappa_dot_grady_new = data[:,11]
613+
B_times_gradB_dot_gradx_new = data[:,12]
614+
bmag_psi0_new = data[:,13]
615+
if with_btor: btor_new = data[:,14]
613616

614617
# New definitions
615618
gds2_new = grady_dot_grady_new
@@ -656,6 +659,8 @@ def process_error(variable):
656659
if not (np.allclose(cvdrift_old, cvdrift_new, equal_nan=True)): error = process_error('cvdrift')
657660
if not (np.allclose(gbdrift0_old, gbdrift0_new, equal_nan=True)): error = process_error('gbdrift0')
658661
if not (np.allclose(bmag_psi0_old, bmag_psi0_new, equal_nan=True)): error = process_error('bmag_psi0')
662+
if with_btor:
663+
if not (np.allclose(btor_old, btor_new, equal_nan=True)): error = process_error('btor')
659664
assert (not error), f'The geometry data does not match in the *.geometry file.'
660665

661666
# Do not compare gds23 and gds24 it was badly defined in Miller and VMEC

COMPILATION/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ else()
262262
endif()
263263

264264
if (STELLA_ENABLE_NETCDF)
265-
266-
# As the netcdf installed in the Mac GitHub runners itself depends on HDF5
267-
# and HDF5 needs to check for the existence of threads, we need to enable a basic systems language like C/C++
268-
# These lines are only needed for Mac systems on Github since January 2025
269-
# For some reason CMake could not find the hdf5 libraries anymore after a Github update
270-
enable_language(C)
271265
find_package(netCDFFortran REQUIRED)
272266
add_subdirectory(../EXTERNALS/neasyf ${CMAKE_CURRENT_BINARY_DIR}/EXTERNALS/neasyf)
273267
target_link_libraries(libstella PUBLIC netCDF::netcdff neasyf::neasyf)
@@ -313,6 +307,13 @@ target_compile_definitions(libstella PRIVATE
313307
)
314308

315309

310+
# Find hdf5 packages (their CMake file needs the C language)
311+
# These lines are only needed for Mac systems on Github since January 2025
312+
# For some reason CMake could not find the hdf5 libraries anymore after a Github update
313+
ENABLE_LANGUAGE(C)
314+
find_package(HDF5 REQUIRED)
315+
target_link_libraries(libstella PUBLIC ${HDF5_LIBRARIES})
316+
316317
############################################################
317318
# Add some extra flags for Debug configs
318319
############################################################

0 commit comments

Comments
 (0)