Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
89c80fa
DCON - NEW FEATURE - Adds kinetic damping matrix infrastructure
logan-nc Dec 22, 2025
f9ecd79
DCON - NEW FEATURE - working on adding in the kinetic DCON. Added fun…
mfairborn23 Jan 15, 2026
fc9014a
DCON - MINOR - Merge remote-tracking branch 'origin/develop' into kin…
mfairborn23 Jan 15, 2026
0b9c626
DCON - IMPROVEMENT - Added ksing_find and unit tests for it
mfairborn23 Jan 15, 2026
471d262
DCON - IMPROVEMENT - Converted sing_get_f_det and it is somewhat unit…
mfairborn23 Jan 15, 2026
289f12b
DCON - IMPROVEMENT - Most of sing kinetic functions converted. Now ju…
mfairborn23 Jan 15, 2026
3677a48
DCON - IMPROVEMENT? - Began working on converting sing_der. It is not…
mfairborn23 Jan 16, 2026
3a7a46c
DCON - IMPROVEMENT - Working on converting ode.jl. Converted kin_cros…
mfairborn23 Jan 18, 2026
c6d7787
DCON - IMPROVEMENT - Converted ode.jl files to include kin_flag. All …
mfairborn23 Jan 20, 2026
c32c30b
DCON - IMPROVEMENT - Adding kinetic matrices to fourfit stuff
mfairborn23 Jan 20, 2026
767dbbf
DCON - IMPROVEMENT - I believe fourfit is converted to include kineti…
mfairborn23 Jan 20, 2026
19dd300
DCON - MINOR - Forgot to uncomment most of the tests so they'll all run
mfairborn23 Jan 20, 2026
9d0ad32
DCON - MINOR - Added a fourfit.f file to ask Copilot to compare its f…
mfairborn23 Jan 21, 2026
8e30b6e
DCON - IMPROVEMENT - Moved the det(F) vs psi plotting results into an…
mfairborn23 Jan 22, 2026
feb92ae
DCON - IMPROVEMENT - Fixed the det(F) vs psi graphing and made it mor…
mfairborn23 Jan 26, 2026
5b07d01
DCON - IMPROVEMENT - a primarily working preliminary implementation o…
mfairborn23 Feb 4, 2026
c1639ce
DCON - WIP - I think that the kinetic code is now working and you sho…
mfairborn23 Feb 5, 2026
d4b5509
DCON - WIP - I got some basic stuff coded in for the dummy matrices a…
mfairborn23 Feb 6, 2026
96d5d07
DCON - WIP - Need to figure out plotting issue but first going to att…
mfairborn23 Feb 9, 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
2 changes: 1 addition & 1 deletion .JuliaFormatter.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ remove_extra_newlines = false
trailing_comma = false
join_lines_based_on_source = true
separate_kwargs_with_semicolon = true
whitespace_ops_in_indices = false
whitespace_ops_in_indices = false
1 change: 0 additions & 1 deletion .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ jobs:
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

1 change: 0 additions & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ jobs:
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'

20 changes: 10 additions & 10 deletions .github/workflows/copilot-setup-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@ name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation,
# and allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
workflow_dispatch:
push:
paths:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- . github/workflows/copilot-setup-steps.yml

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot
copilot-setup-steps:
copilot-setup-steps:
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.11'

- name: Cache Julia packages
uses: julia-actions/cache@v2
with:
cache-name: julia-cache
cache-packages: true
cache-artifacts: true
cache-registries: true

- name: Install Fortran compiler (for Fortran dependencies)
run: |
sudo apt-get update
sudo apt-get install -y gfortran libopenblas-dev

- name: Build Julia project
run: julia --project="." -e "using Pkg; Pkg.build()"

- name: Instantiate Julia environment
run: julia --project="." -e "using Pkg; Pkg.instantiate()"
2 changes: 1 addition & 1 deletion .github/workflows/make_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
- name: Build and deploy documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs docs/make.jl
run: julia --project=docs docs/make.jl
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ repos:
metadata.kernelspec metadata.language_info.version
cell.metadata.executionInfo cell.metadata.colab
cell.metadata.id cell.metadata.scrolled

# General file cleanup
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down
42 changes: 42 additions & 0 deletions PENTRCconverstionTODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# JPEC – Kinetic Version Porting Plan

## Porting Map (GPEC → JPEC)
| Module | GPEC (Fortran) Dir | Function / Routine | JPEC Dir | Function | Notes | Status |
| --- | --- | --- | --- | --- | --- | --- |
| DCON | `dcon/forfit.F` | `fourfit_action_matrix()` | `src/DCON/Fourfit.jl` | `make_metric` | `fourfit_action_matrix()` Renamed `action_matrices()`. Isn't this different than `make_metric` | In progress |
| | | `fourfit_kinetic_matrix()` | | `make_kinetic_matrix` | conneted with pentrc | In progress - mostly coded by Claude so far |
| PENTRC | `pentrc/torque.F90` |`tpsi()` | src/ | | | TODO |
| PENTRC | `pentrc/torque.F90` |`tintgrl_grid` | src/ | | | TODO |
| PENTRC | `pentrc/torque.F90` |`tintgrl_lsode` | src/ | | | TODO |
| DCON | `dcon/sing.f` | `ksing_find()` | `src/DCON/Sing.jl` | Option 1) `sing_find!`<br>Option 2) `sing_king_fing!` | | first pass done and kinda tested|
| | | `sing_get_f_det()` | `src/DCON/Sing.jl` | `sing_get_f_det()` | Maybe include inside `ksing_find()` | first pass done and kinda tested |
| | | `sing_der()` | `src/DCON/Sing.jl` | `sing_der!` | | TODO |
| DCON | `dcon/ode.f` | `ode_kin_cross()` | `src/DCON/Ode.jl` | `ode_kin_cross()` | for `ode_run()` | TODO |
| | | `ode_axis_init()` | | `ode_axis_init()` | | TODO |
| | | `ode_step()` | | `compute_tols()` | Kinetic part needed only in `ode_step` | TODO |
| PENTRC | `pentrc/pentrc_interface.f90` | `initialize_pentrc()` | | | | TODO |
| PENTRC | `pentrc/dcon_interface.f` | `set_eq()` | | | | TODO |
| | | `set_geom()` | | | used in `set_eq()` | TODO |
| PENTRC | `pentrc/inputs.f90` | `read_kin()` | | | | TODO |
| | | `read_equil()` | | | | TODO |
| | | `set_peq()` | | | | TODO |
| PENTRC | `pentrc/utilities` | `*` | | | | TODO |
| PENTRC | `pentrc/*` | some more things | | | esp parmas.f90/ㅣlsode.f90 | TODO |

More things to change :
- use pitch_integration, only : lambdaintgrl_lsode,kappaintgrl,kappadjsum
- use energy_integration, only : xintgrl_lsode,qt
- use special, only : ellipk,ellipe
- use grid_mod, only : powspace_sub,linspace_sub
- I added `fourfit.F` to this repo in `src/dcon/fortran` right now. We will need to remove this later, but I wanted GitHub Copilot to have access to it.

---

## Additional TODOs

* [ ] Replace `OMP_SET_NUM_THREADS(dcon_kin_threads)`
→ Julia multithreading
→ [https://docs.julialang.org/en/v1/manual/multi-threading/](https://docs.julialang.org/en/v1/manual/multi-threading/)

* [ ] Remove unused or duplicated Julia files
(e.g., `idcon_read`, `idcon_build`, …)
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand All @@ -28,6 +29,7 @@ FFTW = "1.9.0"
HDF5 = "0.17.2"
Interpolations = "0.16.1"
JLD2 = "0.6.3"
LaTeXStrings = "1.4.0"
LinearAlgebra = "1.11.0"
OrdinaryDiffEq = "6.102.0"
Pkg = "1.11.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Code
julia> ]
pkg> add Revise

Now, in the top of each Jupyter notebook, you can call `using Revise` at the top of any Jupyter notebook to speed up compile times as you develop and test. Better yet, set up your environement to [use Revise by default](https://timholy.github.io/Revise.jl/stable/config/#Using-Revise-by-default)
Now, in the top of each Jupyter notebook, you can call `using Revise` at the top of any Jupyter notebook to speed up compile times as you develop and test. Better yet, set up your environement to [use Revise by default](https://timholy.github.io/Revise.jl/stable/config/#Using-Revise-by-default)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion benchmarks/DIIID_ideal_example/dcon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ equal_arc_wall = 0
a = 0.2415

[DEBUG]
output_benchmark_data = true # Output benchmark data for comparison between codes
output_benchmark_data = true # Output benchmark data for comparison between codes
make_plots = true # Makes another hdf5 file that can be used for plotting things like |F| vs psi
42 changes: 18 additions & 24 deletions benchmarks/DIIID_ideal_example/euler_fortran_julia_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "2cc3c9a9",
"id": "0",
"metadata": {},
"source": [
"## Overview\n",
Expand All @@ -12,7 +12,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "db314816",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -27,7 +27,7 @@
},
{
"cell_type": "markdown",
"id": "2b21eeae",
"id": "2",
"metadata": {},
"source": [
"## Load in Fortran data\n",
Expand All @@ -38,7 +38,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7fec1fab",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -137,7 +137,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "59f1ad09",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -311,7 +311,7 @@
},
{
"cell_type": "markdown",
"id": "74226ac8",
"id": "5",
"metadata": {},
"source": [
"## Load in Julia data\n",
Expand All @@ -321,7 +321,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c76aa60a",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -334,7 +334,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ac491233",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -356,7 +356,7 @@
},
{
"cell_type": "markdown",
"id": "bcf321ba",
"id": "8",
"metadata": {},
"source": [
"# Compare Outputs\n",
Expand All @@ -366,7 +366,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d2ee9066",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -389,15 +389,15 @@
},
{
"cell_type": "markdown",
"id": "b3e56821",
"id": "10",
"metadata": {},
"source": [
"## Plots"
]
},
{
"cell_type": "markdown",
"id": "1834dfce",
"id": "11",
"metadata": {},
"source": [
"### Plot comparison of xi_psi for a few poloidal mode numbers"
Expand All @@ -406,7 +406,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "54b41c30",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -424,7 +424,7 @@
},
{
"cell_type": "markdown",
"id": "b641e050",
"id": "13",
"metadata": {},
"source": [
"### Plot comparison of psifac integration\n",
Expand All @@ -434,7 +434,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b778938c",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -451,7 +451,7 @@
},
{
"cell_type": "markdown",
"id": "bf6483a8",
"id": "15",
"metadata": {},
"source": [
"### Compare the eigenvectors of each DCON energy matrix eigenmode"
Expand All @@ -460,7 +460,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "89839f1e",
"id": "16",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -520,16 +520,10 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.11.6",
"language": "julia",
"name": "julia-1.11"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.11.6"
"name": "julia"
}
},
"nbformat": 4,
Expand Down
Loading