Skip to content

Conversation

@logan-nc
Copy link
Collaborator

This is the initial effort to convert the fortran Perturbed Equilibrium Nonambipolar TRansport Code (PENTRC) to julia.

The first take will aim at a fairly direct conversion. Some notes to keep in mind,

  • The interface will be different! We don't use global variables in Julia. For clarity, we should be passing in all the necessary info to the torque functions directly within the main code, using memory rather than file io.
    • File io is pobably still necessary to code up though, for benchmarking the code using the fortran gpec displacements (gpec_xclebsch_n1.out)
  • The custom LSODE files do not need to be ported - we should use the native Julia ODE solvers (see use of ODEProblem in DCON converted code).
  • The associated "external" spline calls do not need to be prioritized. These were to prevent parallel threads from overwriting internal spline information and messing with eachother. Our long term vision is to move to native julia splines that are parallel-friendly. In the meantime, we can just use the existing fortran wrappers and not run in parallel.
  • The parallel capabilities are not a priority. If they are easy/obvious to implement in a pure julia way then you can do it... but I doubt this is true since the external splines are needed etc. I think once we get the code to work on one thread, it will be super easy to parallelize in julia.

@logan-nc logan-nc requested a review from mfairborn23 December 22, 2025 20:36
@logan-nc logan-nc self-assigned this Dec 22, 2025
@logan-nc logan-nc added the enhancement New feature or request label Dec 22, 2025
@logan-nc
Copy link
Collaborator Author

@mfairborn23 Please add whatever notes you took in our last meeting to the above summary (you can edit my post)

It is nice to have the PR open so we can al track the files changed and exchange questions / suggestions using the in-line comments. It is clear it is a WIP - so no worries there.

Let's open a separate branch for the kinetic modifications in fourfit.jl that put the kinetic terms into the stability calculation. I don't want this one to depend on that one or that one to have to wait if this one takes some more time. That one can use dummy kinetic matrices for now until we get this one merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants