Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
04d8705
JPEC - REFACTOR - Moved main function from to JPEC
logan-nc Dec 30, 2025
a9d8ccb
PERTURBEDEQUILIBRIUM - NEW FEATURE - Add skeleton module for perturbe…
logan-nc Dec 30, 2025
10b93b4
PERTURBEDEQUILIBRIUM - TEST - Add test forcing data for DIIID-like ex…
logan-nc Dec 30, 2025
eed1ddf
PE - NEW FEATURE - Implements GPEC plasma response calculation (resp_…
logan-nc Dec 30, 2025
246b4af
PE - IMPROVEMENT - Implements improved flux matrix and surface induct…
logan-nc Dec 30, 2025
aae973c
JPEC - REORGANIZE - Set up module structure to integrate IPEC calcula…
matt-pharr Dec 30, 2025
eef74a9
JPEC - RENAME - fixed some straggler mentions of "DCON"
matt-pharr Dec 30, 2025
2e24e09
VAC/PE - NEW FEATURE - Computes both Green's functions for proper GPE…
logan-nc Dec 30, 2025
08362ec
MERGE - Merge ipec branch into perturbed_equilibrium
logan-nc Dec 30, 2025
a796f09
FFS - BUG FIX - Fix JPEC.jl to use ForceFreeStates instead of DCON an…
logan-nc Dec 30, 2025
ac094f1
FFS - RENAME - Simplify config section from [ForceFreeStates_CONTROL]…
logan-nc Dec 30, 2025
220cdd8
EQUIL - REORGANIZE - Deprecate equil.toml, move equilibrium config to…
logan-nc Dec 30, 2025
e78b83d
EQUIL - REORGANIZE - Deprecate equil.toml, move equilibrium config to…
logan-nc Dec 30, 2025
4a43ec8
Merge: Resolve conflicts keeping properly formatted jpec.toml files
logan-nc Dec 30, 2025
2501ce3
JPEC - REORGANIZE - Reorder jpec.toml sections: Equilibrium, WALL, Fo…
logan-nc Dec 30, 2025
01105b5
CLEANUP - Remove deprecated files
logan-nc Dec 30, 2025
61bee04
JPEC - RENAME - Change [WALL] to [Wall] for CamelCase consistency
logan-nc Dec 30, 2025
8d15ad3
EQUIL - DEPRECATE - Remove unused equilibrium output flags and spline…
logan-nc Dec 30, 2025
2937fe8
EQUIL - DEPRECATE - Remove all equilibrium output flags and Equilibri…
logan-nc Dec 30, 2025
ee8e1bb
EQUIL - REFACTOR - Merge EquilibriumControl into EquilibriumConfig
logan-nc Dec 30, 2025
1a3332a
EQUIL/FFS - NEW FEATURE - Add force_termination flag for graceful ear…
logan-nc Dec 30, 2025
96374dc
CONFIG - IMPROVEMENT - Add comprehensive parameter annotations to all…
logan-nc Dec 30, 2025
313429d
JPEC - IMPROVEMENT - Add standalone executable script and improve doc…
logan-nc Dec 31, 2025
44da19f
DOCS - IMPROVEMENT - Fix documentation build and add PerturbedEquilib…
logan-nc Dec 31, 2025
375c288
FORCING - REFACTOR - Move forcing data I/O to ForcingTerms module
logan-nc Dec 31, 2025
b3a67ec
CONFIG - REFACTOR - Move forcing data parameters to [ForcingTerms] TO…
logan-nc Dec 31, 2025
c5ae089
GPEC - NEW FEATURE - Implement proper boundary field calculation for …
logan-nc Dec 31, 2025
49f408a
GPEC - NEW FEATURE - Implement proper surface inductance using FFTW a…
logan-nc Dec 31, 2025
f701d45
UTILITIES - NEW FEATURE - Add FourierTransforms utility for efficient…
logan-nc Dec 31, 2025
12b7f4b
VACUUM - REFACTOR - Use FourierTransforms utility for coefficient cal…
logan-nc Dec 31, 2025
32d4787
UTILITIES - REFACTOR - Move Vacuum's fourier_transform! functions to …
logan-nc Dec 31, 2025
8a01e3f
UTILITIES - NEW FEATURE - Add in-place transform functions for perfor…
logan-nc Dec 31, 2025
418dc3e
BENCHMARKS - NEW FEATURE - Add comprehensive Fourier transform compar…
logan-nc Dec 31, 2025
7b64953
VACUUM - REFACTOR - Remove unused fields from PlasmaGeometry and Wall…
logan-nc Dec 31, 2025
ef5e612
GPEC - NEW FEATURE - Implement mode-space field reconstruction matchi…
logan-nc Dec 31, 2025
b4c01bf
PERTURBED EQUILIBRIUM - NEW FEATURE - Implement singular surface coup…
logan-nc Dec 31, 2025
0b68ecf
PERTURBED EQUILIBRIUM - IMPROVEMENT - Implement physics calculations …
logan-nc Dec 31, 2025
c1079a0
PERTURBED EQUILIBRIUM - NEW FEATURE - Implement surface inductance fo…
logan-nc Dec 31, 2025
ee82562
PERTURBED EQUILIBRIUM - NEW FEATURE - Implement Green's functions at …
logan-nc Dec 31, 2025
9da56b8
EQUIL - BUG FIX - Fix EquilibriumConfig field access by removing none…
logan-nc Jan 1, 2026
7c4a111
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Jan 1, 2026
666baa9
EXAMPLES - MINOR - Uses Revise in DIIID-like
logan-nc Jan 1, 2026
cc5d471
EXAMPLES - MINOR - updates JPEC main syntax
logan-nc Jan 1, 2026
fff5e64
DOCS - MINOR - Removes claude feature planning files
logan-nc Jan 1, 2026
e2f75a9
GPEC - BUG FIX - Fix multiple field access and module import errors i…
logan-nc Jan 1, 2026
dca4e32
GPEC - BUG FIX - Fix final PerturbedEquilibrium scoping and field acc…
logan-nc Jan 1, 2026
a533a93
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Jan 1, 2026
ab7b71a
PERTURBED EQUILIBRIUM - IMPROVEMENT - Implement full flux surface int…
logan-nc Jan 1, 2026
2ba7d97
PERTURBED EQUILIBRIUM - IMPROVEMENT - Implement full flux surface int…
logan-nc Jan 1, 2026
f995d56
PERTURBED EQUILIBRIUM - CLEANUP - Remove unused ModeOutput placeholder
logan-nc Jan 1, 2026
d9402e2
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Jan 1, 2026
f1bca5c
REFACTOR - Rename output file from euler.h5 to jpec.h5
logan-nc Jan 1, 2026
d9d5d51
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Jan 1, 2026
c1bee3e
DOCS - IMPROVEMENT - Add reference papers and comprehensive CLAUDE.md…
logan-nc Jan 2, 2026
e9f29d9
Merge branch 'develop' of github.com:OpenFUSIONToolkit/JPEC into pert…
logan-nc Feb 11, 2026
d9e8ecc
VACUUM/FFS - MERGE FIX - Resolve develop→perturbed_equilibrium merge …
logan-nc Feb 11, 2026
9b2c7f4
DOCS - MINOR - Renamed papers to avoid unicode in filenames, which do…
logan-nc Feb 11, 2026
841c71c
CLEANUP - Remove obsolete vac.in legacy configuration files
logan-nc Feb 11, 2026
f1e2b84
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Feb 12, 2026
ef45104
Merge branch 'develop' of github.com:OpenFUSIONToolkit/JPEC into pert…
logan-nc Feb 12, 2026
2b1eee4
SRC - CLEANING - Removes outdated references to DCON
logan-nc Feb 12, 2026
22418dc
API MIGRATION - Complete migration from custom spline API to FastInte…
logan-nc Feb 12, 2026
2e4a3a0
VACUUM - BUGFIX - switching grri with grre in the fourier_inverse_tra…
jhalpern30 Feb 12, 2026
bd0c263
JPEC - Bug Fix - Removes deprecated ode_run from JPEC top level using…
logan-nc Feb 12, 2026
094c0ea
VAC - BUGFIX - Adds fourier_transform! using statement to VacuumFromE…
logan-nc Feb 12, 2026
26561ea
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Feb 12, 2026
f57be08
PERTURBED EQUILIBRIUM - BUG FIX - Fix singular coupling metrics and s…
logan-nc Feb 13, 2026
630abf9
Merge branch 'perturbed_equilibrium' of github.com:OpenFUSIONToolkit/…
logan-nc Feb 13, 2026
fdfdf5c
Merge branch 'develop' of github.com:OpenFUSIONToolkit/JPEC into pert…
logan-nc Feb 13, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.vscode
*.DS_Store
*.pdf
!docs/resources/*.pdf
*.png
*.jld2
.gitattributes
Expand Down
408 changes: 347 additions & 61 deletions CLAUDE.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = ["Matthew Pharr <matthewcpharr@gmail.com>", "Rithik Banerjee <rb3736@c
version = "0.1.0"

[deps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FastInterpolations = "9ea80cae-fc13-4c00-8066-6eaedb12f34b"
Expand All @@ -18,10 +19,12 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
DelimitedFiles = "1.9.1"
DiffEqCallbacks = "4.9.0"
Documenter = "1.14.1"
FastInterpolations = ">=0.2.8"
Expand All @@ -35,5 +38,6 @@ Plots = "1.40.15"
Printf = "1.11.0"
SpecialFunctions = "2.5.1"
StaticArrays = "1.9.15"
Statistics = "1.11.0"
TOML = "1.0.3"
Test = "1.11.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To assist with the process of compiling release notes, please confirm to the com
```
CODE - TAG - Detailed message
```
where CODE is EQUIL, DCON, VAC, etc. and TAGs are short descriptors of the type of commit. Example tags might be WIP (work in progress), MINOR, IMPROVEMENT, BUG FIX, NEW FEATURE, etc. Look through old commits for examples of what tags are commonly used.
where CODE is EQUIL, ForceFreeStates, VAC, etc. and TAGs are short descriptors of the type of commit. Example tags might be WIP (work in progress), MINOR, IMPROVEMENT, BUG FIX, NEW FEATURE, etc. Look through old commits for examples of what tags are commonly used.

Again, this is currently used for the by-hand compilation of release notes. The tags thus need to be human readable but are not strictly inforced to be within some limited set. The objective is to allow a lead developer to skim through commits and pick out only the key new features / bug fixes / improvements to note in the release while not having to read all the work-in-progress or minor changes.

Expand Down
2 changes: 0 additions & 2 deletions benchmarks/DIIID_ideal_example/Project.toml

This file was deleted.

13,741 changes: 0 additions & 13,741 deletions benchmarks/DIIID_ideal_example/TKMKR_D3Dlike_default_Hmode.geqdsk

This file was deleted.

Binary file not shown.
30 changes: 0 additions & 30 deletions benchmarks/DIIID_ideal_example/equil.toml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"## Overview\n",
"In this notebook, we will demonstrate that the outputs of the Julia DCON conversion are equivalent to those in the Fortran version by comparing the eigenmodes of the DIIID ideal example"
"In this notebook, we will demonstrate that the outputs of JPEC are equivalent to those in the Fortran DCON by comparing the eigenmodes of the DIIID ideal example"
]
},
{
Expand Down Expand Up @@ -315,7 +315,7 @@
"metadata": {},
"source": [
"## Load in Julia data\n",
"We will run the main DCON code on the same inputs. We output the `euler.h5` file, which is a Julia version of the `euler.bin` file."
"We will run the main DCON code on the same inputs. We output the `jpec.h5` file, which is a Julia version of the `euler.bin` file."
]
},
{
Expand All @@ -325,10 +325,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Run DCON in Julia\n",
"# Run\n",
"Pkg.activate(\"../..\")\n",
"using JPEC\n",
"JPEC.DCON.Main(\"./\") # \"./\" tells us to obtain inputs and direct outputs to our current folder"
"JPEC.main([\"./\"]) # \"./\" tells us to obtain inputs and direct outputs to our current folder"
]
},
{
Expand All @@ -339,7 +339,7 @@
"outputs": [],
"source": [
"# Read in from julia hdf5 for comparison\n",
"eh5 = h5open(\"euler.h5\", \"r\")\n",
"eh5 = h5open(\"jpec.h5\", \"r\")\n",
"mstepj = read(eh5[\"integration/nstep\"])\n",
"xi_psij = read(eh5[\"integration/xi_psi\"])\n",
"psifacj = read(eh5[\"integration/psi\"])\n",
Expand All @@ -351,7 +351,7 @@
"chi1j = 2π*psioj\n",
"wtf = wt*(chi1*1e-3)\n",
"wtj = wtj*(chi1j*1e-3)\n",
"println(\"Done reading euler.h5\")"
"println(\"Done reading jpec.h5\")"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
[DCON_CONTROL]
[Equilibrium]
eq_type = "efit" # Type of the input 2D equilibrium file
eq_filename = "TKMKR_D3Dlike_default_Hmode.geqdsk" # Path to equilibrium file
jac_type = "hamada" # Coordinate system (hamada, pest, boozer, equal_arc)
power_bp = 0 # Poloidal field power exponent for Jacobian
power_b = 0 # Toroidal field power exponent for Jacobian
power_r = 0 # Major radius power exponent for Jacobian
grid_type = "ldp" # Radial grid packing type
psilow = 1e-4 # Lower limit of normalized flux coordinate
psihigh = 0.993 # Upper limit of normalized flux coordinate
mpsi = 128 # Number of radial grid points
mtheta = 256 # Number of poloidal grid points
newq0 = 0 # Override for on-axis safety factor (0 = use input value)
etol = 1e-7 # Error tolerance for equilibrium solver
force_termination = false # Terminate after equilibrium setup (skip stability calculations)


[ForceFreeStates]
bal_flag = false # Ideal MHD ballooning criterion for short wavelengths
mat_flag = true # Construct coefficient matrices for diagnostic purposes
ode_flag = true # Integrate ODE's for determining stability of internal long-wavelength mode (must be true for GPEC)
Expand Down
13 changes: 7 additions & 6 deletions benchmarks/DIIID_ideal_example/vacuum_accuracy_benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using LinearAlgebra

Pkg.activate("$(@__DIR__)/../.."); using JPEC

# this requires you to have run the DIIID-like_ideal_example first to generate the benchmark inputs
@load "$(@__DIR__)/../../examples/DIIID-like_ideal_example/benchmark_inputs.jld2" benchmark_inputs

(; wv_block, mpert, mtheta_eq, mthvac, complex_flag, kernelsign,
Expand Down Expand Up @@ -44,7 +45,7 @@ if benchmark_n
println("Testing n = $n_test")

# Compute Fortran solution
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
n_test, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -53,7 +54,7 @@ if benchmark_n
complex_flag, kernelsign, wall_flag,
farwall_flag, grri, xzpts)

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Compute Julia solution
vac_inputs_test = deepcopy(vac_inputs)
Expand Down Expand Up @@ -123,15 +124,15 @@ if benchmark_m

# Fortran reference
mpert_ref = mhigh_reference - vac_inputs.mlow
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, mhigh_reference,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, mhigh_reference,
1, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)
wv_block_ref_fortran_m = zeros(ComplexF64, mpert_ref, mpert_ref)
grri_ref = zeros(Float64, 2 * (mthvac + 5), 2 * mpert_ref)
JPEC.Vacuum.mscvac(wv_block_ref_fortran_m, mpert_ref, mtheta_eq, mthvac,
complex_flag, kernelsign, wall_flag,
farwall_flag, grri_ref, xzpts, ahg_file, "$(@__DIR__)/../../examples/DIIID-like_ideal_example")
JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

println("Reference solutions computed.\n")

Expand All @@ -142,7 +143,7 @@ if benchmark_m
mpert_test = mhigh_test - vac_inputs.mlow

# Compute Fortran solution
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, mhigh_test,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, mhigh_test,
1, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -152,7 +153,7 @@ if benchmark_m
complex_flag, kernelsign, wall_flag,
farwall_flag, grri_test, xzpts, ahg_file, "$(@__DIR__)/../../examples/DIIID-like_ideal_example")

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Compute Julia solution
vac_inputs_test_m = deepcopy(vac_inputs)
Expand Down
11 changes: 6 additions & 5 deletions benchmarks/DIIID_ideal_example/vacuum_speed_benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ using Plots
Pkg.activate("../..");
using JPEC

@load "benchmark_inputs.jld2" benchmark_inputs
# this requires you to have run the DIIID-like_ideal_example first to generate the benchmark inputs
@load "$(@__DIR__)/../../examples/DIIID-like_ideal_example/benchmark_inputs.jld2" benchmark_inputs

(; wv_block, mpert, mtheta_eq, mthvac, complex_flag, kernelsign,
wall_flag, farwall_flag, grri, xzpts, ahg_file, dir_path,
Expand Down Expand Up @@ -37,7 +38,7 @@ if benchmark_n
println("Benchmarking n = $n_test")

# Benchmark Fortran version
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
n_test, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -50,7 +51,7 @@ if benchmark_n
push!(fortran_allocs, median(b_fortran).allocs)
push!(fortran_memory, median(b_fortran).memory / 1e6)

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Benchmark Julia version
vac_inputs_test = deepcopy(vac_inputs)
Expand Down Expand Up @@ -107,7 +108,7 @@ if benchmark_m
mpert_test = mhigh_test - vac_inputs.mlow

# Benchmark Fortran version
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, mhigh_test,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, mhigh_test,
1, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -120,7 +121,7 @@ if benchmark_m
push!(fortran_mhigh_allocs, median(b_fortran).allocs)
push!(fortran_mhigh_memory, median(b_fortran).memory / 1e6)

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Benchmark Julia version
vac_inputs_test = deepcopy(vac_inputs)
Expand Down
9 changes: 5 additions & 4 deletions benchmarks/Solovev_ideal_example/vacuum_accuracy_benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ default(markersize=2)

Pkg.activate("$(@__DIR__)/../.."); using JPEC

# this requires you to have run the Solovev_ideal_example first to generate the benchmark inputs
@load "$(@__DIR__)/../../examples/Solovev_ideal_example/vacuum_response_inputs.jld2" benchmark_inputs

(; wv_block, mpert, mtheta_eq, mthvac, complex_flag, kernelsign,
Expand Down Expand Up @@ -48,7 +49,7 @@ if benchmark_n
println("Testing n = $n_test")

# Compute Fortran solution
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
n_test, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -57,7 +58,7 @@ if benchmark_n
complex_flag, kernelsign, wall_flag,
farwall_flag, grri, xzpts)

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Compute Julia solution
vac_inputs_test = deepcopy(vac_inputs)
Expand Down Expand Up @@ -122,7 +123,7 @@ if benchmark_a
println("Testing a = $a_test")

# Compute Fortran solution
JPEC.Vacuum.set_dcon_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
JPEC.Vacuum.set_surface_params(mtheta_eq, vac_inputs.mlow, vac_inputs.mhigh,
vac_inputs.n, vac_inputs.qa, vac_inputs.r,
vac_inputs.z, vac_inputs.delta)

Expand All @@ -136,7 +137,7 @@ if benchmark_a
complex_flag, kernelsign, wall_flag,
farwall_flag, grri, xzpts)

JPEC.Vacuum.unset_dcon_params()
JPEC.Vacuum.unset_surface_params()

# Compute Julia solution
new_wall = JPEC.Vacuum.WallShapeSettings(
Expand Down
Loading
Loading