Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7c1cfb6
fix(kilca): port drift ddeabm integration
krystophny Jul 3, 2026
b288cde
port(kilca): translate spline.cpp to Fortran (kilca_spline_m)
krystophny Jun 30, 2026
eaef7de
port(kilca): translate hyper1F1.cpp to Fortran (kilca_hyper1f1_m)
krystophny Jun 30, 2026
147e2c7
port(ql-balance): translate vel_integral.cpp to Fortran (vel_integral_m)
krystophny Jun 30, 2026
1f81b93
port(kilca): translate Neville interpolation wrappers to Fortran
krystophny Jun 30, 2026
72803f4
build(sundials): enable Fortran 2003 module interface
krystophny Jun 30, 2026
569cb4d
port(kilca): translate antenna settings class to Fortran
krystophny Jun 30, 2026
deaa4b7
port(kilca): translate output settings class to Fortran
krystophny Jun 30, 2026
3de09bd
port(kilca): translate background settings class to Fortran
krystophny Jun 30, 2026
ecfbc98
port(kilca): translate eigmode settings class to Fortran
krystophny Jun 30, 2026
82cab70
port(kilca): translate maxwell_eqs_data class to Fortran
krystophny Jun 30, 2026
c43843c
port(kilca): translate disp_profiles class to Fortran
krystophny Jun 30, 2026
cec7a3c
port(kilca): translate sysmat_profiles class to Fortran
krystophny Jun 30, 2026
077db1d
port(kilca): translate cond_profiles class to Fortran
krystophny Jun 30, 2026
748740b
port(kilca): translate flre_quants class to Fortran
krystophny Jun 30, 2026
5a4e1c7
port(kilca): translate the ODE solver to Fortran (S3)
krystophny Jun 30, 2026
ce7aee6
fix(kilca): correct elementary charge constant in flre_quants_m
krystophny Jun 30, 2026
1924567
port(kilca): translate background equilibrium physics to Fortran
krystophny Jun 30, 2026
58740fa
port(kilca): translate the zone hierarchy to Fortran (S5)
krystophny Jun 30, 2026
be18ac1
port(kilca): translate mode_data to Fortran (S6)
krystophny Jun 30, 2026
996d9b9
port(kilca): translate settings to Fortran
krystophny Jun 30, 2026
c15137a
port(kilca): translate the live subset of io/inout.cpp to Fortran
krystophny Jun 30, 2026
6a3070b
port(kilca): translate core_data to Fortran, rewire its C++ consumers
krystophny Jun 30, 2026
e6eee5d
port(kilca): translate wave_code_interface.cpp to Fortran
krystophny Jun 30, 2026
ab2328f
chore(kilca): drop dead flre/maxwell_eqs/eval_sysmat.{h,cpp}
krystophny Jun 30, 2026
5922161
port(kilca): translate core/shared.cpp's live subset to Fortran
krystophny Jun 30, 2026
64c3504
port(kilca): translate adaptive grid refinement to Fortran
krystophny Jun 30, 2026
521b838
chore(kilca): drop now-uncompiled adaptive_grid.cpp/adaptive_grid_pol…
krystophny Jun 30, 2026
782e796
port(kilca): translate eigmode root-search to Fortran
krystophny Jun 30, 2026
56a501d
port(kilca): translate remaining inout.cpp to Fortran
krystophny Jul 1, 2026
e38348b
port(kilca): translate executable entry points to Fortran
krystophny Jul 1, 2026
185f4d6
chore(kilca): delete all remaining C++ - the KiLCA tree is Fortran
krystophny Jul 1, 2026
68e72ee
fix(kilca): real bugs found via the first-ever golden-record end-to-e…
krystophny Jul 1, 2026
c299405
fix(kilca): array-bounds bugs in flre_quants + oracle-matching output…
krystophny Jul 1, 2026
ee1fc52
fix(kilca): mirror oracle's split speed-of-light precision
krystophny Jul 1, 2026
63e8c65
docs(kilca): flre_m6n2 golden-record divergence investigation log
krystophny Jul 1, 2026
1caf640
docs(kilca): confirm 1F1 ill-conditioning as EB.dat root cause (cross…
krystophny Jul 1, 2026
0b1518b
docs(kilca): C++ 1F1 kernel tested - 79/3411 ill-cond calls still div…
krystophny Jul 1, 2026
5c8d370
test(golden): scope KiLCA flre_m6n2 bar past the resonance-chaotic 1F…
krystophny Jul 1, 2026
64b01b3
docs(golden): reference follow-up issue #165 for the flre 1F1m stabil…
krystophny Jul 1, 2026
1deda3a
docs(golden): record O(1) divergence (EB 232%, poy 2189%) proving FP-…
krystophny Jul 1, 2026
cc08610
fix(kilca): stable tie-break for the sysmat grid sort (match oracle s…
krystophny Jul 1, 2026
181de25
docs(golden): definitive proof - the C++ oracle disagrees with itself…
krystophny Jul 1, 2026
1d4f4df
fix(kilca): wrap flre_quants_m lines under 132 cols for -Werror=line-…
krystophny Jul 1, 2026
6c57ee0
fix(kilca): pass calc_deriv_product slices without array temporaries
krystophny Jul 2, 2026
1012d44
fix(python): drain KiLCA pipes with communicate() to avoid deadlock
krystophny Jul 2, 2026
4df4f46
fix(kilca): reset background singleton state on re-create
krystophny Jul 2, 2026
41f55d7
fix(kilca): mirror the C++ oracle's electron-mass literal in ported s…
krystophny Jul 2, 2026
fe590d5
fix(kilca): keep scalar libm cos in the ported adaptive-grid unit
krystophny Jul 2, 2026
a5edac0
port(kilca): route the 1F1m hot path through fortnum hyperg_1f1m_a1
krystophny Jul 2, 2026
b70c00d
fix(kilca): start basis reconstruction at the last renorm's stored en…
krystophny Jul 2, 2026
31e7c90
docs(golden): record the real EB.dat root causes, retract the exclusion
krystophny Jul 2, 2026
2b45ded
test(golden): remove stale KiLCA exclusions
krystophny Jul 3, 2026
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
3 changes: 2 additions & 1 deletion KIM/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ add_executable(test_region_roots_vs_muller ${CMAKE_SOURCE_DIR}/KIM/tests/test_re
set_target_properties(test_region_roots_vs_muller PROPERTIES
OUTPUT_NAME test_region_roots_vs_muller.x
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests/")
target_link_libraries(test_region_roots_vs_muller KIM_lib kilca_lib lapack cerf fortnum_amos_compat)
target_link_libraries(test_region_roots_vs_muller KIM_lib kilca_lib lapack cerf fortnum_amos_compat
OpenMP::OpenMP_Fortran)
add_test(NAME test_region_roots_vs_muller
COMMAND ${CMAKE_BINARY_DIR}/tests/test_region_roots_vs_muller.x)

Expand Down
190 changes: 147 additions & 43 deletions KiLCA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ else ()
set (Jac )
endif ()

set (kilca_normal_main progs/main_linear.cpp)
set (kilca_eigparam_main progs/main_eig_param.cpp)
set (kilca_normal_main progs/main_linear.f90)
set (kilca_eigparam_main progs/main_eig_param.f90)

# Dependencies
# Dependencies are provided by the top-level project via cmake/Dependencies.cmake

# include paths:
set (libs_root_path ${CMAKE_BINARY_DIR}/external-install)

set(EXTERNAL_LIBS fortnum_amos_compat lapack blas SUNDIALS::cvode SUNDIALS::nvecserial fortnum)
set(EXTERNAL_LIBS fortnum_amos_compat lapack blas SUNDIALS::cvode SUNDIALS::nvecserial fortnum sundials_fcvode_mod)

# configure a header file to pass some of the CMake settings to the source code
configure_file(
Expand Down Expand Up @@ -148,56 +148,49 @@ include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/spline")

#cpp source files for kilca lib:
set(kilca_lib_cpp_sources
core/shared.cpp
core/core.cpp
core/settings.cpp
core/output_sett.cpp
background/back_sett.cpp
background/background.cpp
background/calc_back.cpp
background/eval_back.cpp
eigmode/eigmode_sett.cpp
eigmode/calc_eigmode.cpp
eigmode/find_eigmodes.cpp
antenna/antenna.cpp
flre/flre_zone.cpp
flre/conductivity/calc_cond.cpp
flre/conductivity/cond_profs${interp}.cpp
flre/conductivity/eval_cond.cpp
flre/dispersion/disp_profs.cpp
flre/maxwell_eqs/eval_sysmat.cpp
flre/maxwell_eqs/maxwell_eqs_data.cpp
flre/maxwell_eqs/sysmat_profs.cpp
flre/quants/calc_flre_quants.cpp
flre/quants/flre_quants.cpp
hom_medium/hmedium_zone.cpp
imhd/compressible_flow.cpp
imhd/imhd_zone.cpp
imhd/incompressible.cpp
interface/wave_code_interface.cpp
interp/interp.cpp
io/inout.cpp
mode/mode.cpp
mode/calc_mode.cpp
mode/zone.cpp
mode/transforms.cpp
solver/solver.cpp
solver/rhs_func.cpp
spline/spline.cpp
math/hyper/hyper1F1.cpp
math/adapt_grid/adaptive_grid.cpp
math/adapt_grid/adaptive_grid_pol.cpp
math/zersol-0.0.0/src/zersolc.cpp
)

#fortran source files for kilca lib:
set(kilca_lib_fortran_sources
core/constants_m${arch}.f90
core/shared_m.f90
core/core_m.f90
core/output_sett_m.f90
core/settings_m.f90
core/core_data_m.f90
io/inout_m.f90
progs/progs_common_m.f90
interface/wave_code_interface_m.f90
spline/spline_m.f90
interp/neville_m.f90
math/hyper/hyper1F1_m.f90
math/adapt_grid/adaptive_grid_m.f90
math/adapt_grid/adaptive_grid_pol_m.f90
antenna/antenna_m.f90
background/background_m.f90
background/background_data_m.f90
eigmode/eigmode_sett_m.f90
flre/flre_sett_m.f90
mode/mode_m.f90
mode/wave_data_m.f90
mode/transforms_m.f90
mode/zone_m.f90
mode/mode_data_m.f90
eigmode/eigmode_solve_m.f90
hom_medium/hmedium_zone_m.f90
imhd/incompressible_m.f90
imhd/compressible_flow_m.f90
imhd/imhd_zone_m.f90
interp/interp_m.f90
flre/maxwell_eqs/maxwell_eqs_m.f90
flre/maxwell_eqs/maxwell_eqs_data_m.f90
flre/maxwell_eqs/sysmat_profs_m.f90
flre/dispersion/disp_profs_m.f90
flre/conductivity/cond_profs_m.f90
flre/quants/flre_quants_m.f90
solver/solver_m.f90
flre/flre_zone_m.f90
background/f0moments${Jac}.f90
background/density_p${Jac}.f90
antenna/antenna_spectrum.f90
Expand Down Expand Up @@ -240,6 +233,13 @@ set(kilca_lib_fortran_sources
math/det/solve_hom_syst.f90
)

# The C++ this file was ported from evaluated cos() through scalar libm
# (C/C++ math-errno semantics block libmvec); gfortran auto-vectorizes the
# Chebyshev-node loop to _ZGVbN2v_cos, whose last bits differ from scalar
# cos and shift the adaptive grid nodes off the golden record.
set_source_files_properties(math/adapt_grid/adaptive_grid_pol_m.f90
PROPERTIES COMPILE_OPTIONS "-fno-tree-loop-vectorize")

add_library (kilca_lib STATIC ${kilca_lib_fortran_sources} ${kilca_lib_cpp_sources})
#add_library (kilca_lib SHARED ${kilca_lib_fortran_sources} ${kilca_lib_cpp_sources})
target_compile_options(kilca_lib PRIVATE -fPIC)
Expand Down Expand Up @@ -293,23 +293,127 @@ add_executable (kilca_normal_exe ${kilca_normal_main})
set_target_properties(kilca_normal_exe PROPERTIES
OUTPUT_NAME ${kilca_normal_exe}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/install/bin/)
target_include_directories (kilca_normal_exe PRIVATE ${PROJECT_BINARY_DIR}/OBJS/kilca/)
add_dependencies(kilca_normal_exe ${EXTERNAL_LIBS})
target_link_libraries (kilca_normal_exe kilca_lib ${EXTERNAL_LIBS})

add_executable (kilca_eigparam_exe ${kilca_eigparam_main})
set_target_properties(kilca_eigparam_exe PROPERTIES
OUTPUT_NAME ${kilca_eigparam_exe}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/install/bin/)
target_include_directories (kilca_eigparam_exe PRIVATE ${PROJECT_BINARY_DIR}/OBJS/kilca/)
add_dependencies(kilca_eigparam_exe ${EXTERNAL_LIBS})
target_link_libraries (kilca_eigparam_exe kilca_lib ${EXTERNAL_LIBS})

add_executable (post_proc post_processing/main_post_proc.cpp post_processing/save_fortran.f90)
add_executable (post_proc post_processing/main_post_proc.f90 post_processing/save_fortran.f90)
set_target_properties(post_proc PROPERTIES
OUTPUT_NAME post_processor_${KiLCA_ARCHITECTURE}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/install/bin/)
target_include_directories (post_proc PRIVATE ${PROJECT_BINARY_DIR}/OBJS/kilca/)
add_dependencies(post_proc ${EXTERNAL_LIBS})
target_link_libraries (post_proc kilca_lib ${EXTERNAL_LIBS})

add_executable (test_spline tests/test_spline.f90)
set_target_properties(test_spline PROPERTIES
OUTPUT_NAME test_spline.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
target_include_directories (test_spline PRIVATE ${PROJECT_BINARY_DIR}/OBJS/kilca/)
add_dependencies(test_spline kilca_lib)
target_link_libraries (test_spline kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_spline COMMAND ${CMAKE_BINARY_DIR}/tests/test_spline.x)

add_executable (test_hyper1f1 tests/test_hyper1f1.f90)
set_target_properties(test_hyper1f1 PROPERTIES
OUTPUT_NAME test_hyper1f1.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
add_dependencies(test_hyper1f1 kilca_lib)
target_link_libraries (test_hyper1f1 kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_hyper1f1 COMMAND ${CMAKE_BINARY_DIR}/tests/test_hyper1f1.x)

add_executable (test_neville tests/test_neville.f90)
set_target_properties(test_neville PROPERTIES
OUTPUT_NAME test_neville.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
target_include_directories (test_neville PRIVATE ${PROJECT_BINARY_DIR}/OBJS/kilca/)
add_dependencies(test_neville kilca_lib)
target_link_libraries (test_neville kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_neville COMMAND ${CMAKE_BINARY_DIR}/tests/test_neville.x)

add_executable (test_antenna_settings tests/test_antenna_settings.f90)
set_target_properties(test_antenna_settings PROPERTIES
OUTPUT_NAME test_antenna_settings.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
add_dependencies(test_antenna_settings kilca_lib)
target_link_libraries (test_antenna_settings kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_antenna_settings COMMAND ${CMAKE_BINARY_DIR}/tests/test_antenna_settings.x)
set_tests_properties(test_antenna_settings PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)

add_executable (test_output_settings tests/test_output_settings.f90)
set_target_properties(test_output_settings PROPERTIES
OUTPUT_NAME test_output_settings.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
add_dependencies(test_output_settings kilca_lib)
target_link_libraries (test_output_settings kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_output_settings COMMAND ${CMAKE_BINARY_DIR}/tests/test_output_settings.x)
set_tests_properties(test_output_settings PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)

add_executable (test_back_sett tests/test_back_sett.f90)
set_target_properties(test_back_sett PROPERTIES
OUTPUT_NAME test_back_sett.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
add_dependencies(test_back_sett kilca_lib)
target_link_libraries (test_back_sett kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_back_sett COMMAND ${CMAKE_BINARY_DIR}/tests/test_back_sett.x)
set_tests_properties(test_back_sett PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)

add_executable (test_eigmode_sett tests/test_eigmode_sett.f90)
set_target_properties(test_eigmode_sett PROPERTIES
OUTPUT_NAME test_eigmode_sett.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)
add_dependencies(test_eigmode_sett kilca_lib)
target_link_libraries (test_eigmode_sett kilca_lib ${EXTERNAL_LIBS})
add_test(NAME test_eigmode_sett COMMAND ${CMAKE_BINARY_DIR}/tests/test_eigmode_sett.x)
set_tests_properties(test_eigmode_sett PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests/)

# Standalone: links maxwell_eqs_data_m.f90 + fakes only, NOT kilca_lib, since
# the fakes intentionally redefine the same C-ABI symbols maxwell_eqs_m.f90
# (inside kilca_lib) provides for real zones.
add_executable (test_maxwell_eqs_data
flre/maxwell_eqs/maxwell_eqs_data_m.f90
tests/test_maxwell_eqs_data_fakes.f90
tests/test_maxwell_eqs_data.f90)
set_target_properties(test_maxwell_eqs_data PROPERTIES
OUTPUT_NAME test_maxwell_eqs_data.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/OBJS/test_maxwell_eqs_data/)
add_test(NAME test_maxwell_eqs_data COMMAND ${CMAKE_BINARY_DIR}/tests/test_maxwell_eqs_data.x)

# Standalone: links disp_profs_m.f90 + fakes only, NOT kilca_lib, since the
# fakes intentionally redefine calc_dispersion/save_cmplx_matrix_to_one_file.
add_executable (test_disp_profiles
flre/dispersion/disp_profs_m.f90
tests/test_disp_profiles_fakes.f90
tests/test_disp_profiles.f90)
set_target_properties(test_disp_profiles PROPERTIES
OUTPUT_NAME test_disp_profiles.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/OBJS/test_disp_profiles/)
add_test(NAME test_disp_profiles COMMAND ${CMAKE_BINARY_DIR}/tests/test_disp_profiles.x)

# Standalone: links sysmat_profs_m.f90 + fakes + fortnum (for argsort) only,
# NOT kilca_lib, since the fakes intentionally redefine calc_diff_sys_matrix_/
# calc_adaptive_1D_grid_4vector_/spline_alloc_/spline_calc_/save_cmplx_matrix.
add_executable (test_sysmat_profiles
flre/maxwell_eqs/sysmat_profs_m.f90
tests/test_sysmat_profiles_fakes.f90
tests/test_sysmat_profiles.f90)
set_target_properties(test_sysmat_profiles PROPERTIES
OUTPUT_NAME test_sysmat_profiles.x
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests/
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/OBJS/test_sysmat_profiles/)
target_link_libraries (test_sysmat_profiles fortnum)
add_test(NAME test_sysmat_profiles COMMAND ${CMAKE_BINARY_DIR}/tests/test_sysmat_profiles.x)

# add a target to generate API documentation with Doxygen
find_package (Doxygen)

Expand Down
130 changes: 0 additions & 130 deletions KiLCA/antenna/antenna.cpp

This file was deleted.

Loading
Loading