Skip to content

Commit

Permalink
Merge branch 'master' into no_abscab_in_belicu
Browse files Browse the repository at this point in the history
  • Loading branch information
jons-pf committed Dec 5, 2023
2 parents be7892c + 0db4432 commit 33ca88b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "src/vac3"]
path = src/vac3
url = [email protected]:jonathanschilling/vac3.git
[submodule "abscab-fortran"]
path = abscab-fortran
url = https://github.com/jonathanschilling/abscab-fortran
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ endif ()
set (vmec_sources "")
add_subdirectory(src)
add_subdirectory(json-fortran)
add_subdirectory(abscab-fortran)

# if you have access to the vac2 and vac3 versions of NESTOR (contact me), they are included here
#add_subdirectory(src/vac2)
Expand Down
1 change: 1 addition & 0 deletions abscab-fortran
Submodule abscab-fortran added at bab717
6 changes: 2 additions & 4 deletions src/NESTOR/belicu.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ SUBROUTINE belicu(torcur, bx, by, bz, cos1, sin1, rp, zp)

USE vacmod, vm_bz => bz

use abscab, only: magneticFieldPolygonFilament

IMPLICIT NONE

REAL(rprec), INTENT(in) :: torcur
Expand All @@ -23,10 +25,6 @@ SUBROUTINE belicu(torcur, bx, by, bz, cos1, sin1, rp, zp)

REAL(rprec) :: current
INTEGER :: i, j, kper, kv
REAL(rprec), DIMENSION(3) :: xpt, bvec, dvec, Ri_vec

! quantities from Hanson & Hirshman, "Compact expressions for the Biot-Savart fields of a filamentary segment" (2002)
REAL(rprec) :: L, Ri, Rf, Ri_p_Rf, Bmag

real(rprec), dimension(3, nuv2) :: eval_pos, magnetic_field

Expand Down
2 changes: 1 addition & 1 deletion src/bcovar.f90
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ SUBROUTINE bcovar (lu, lv)
IF (MOD(iter2-iter1,ns4).eq.0) THEN
! only update preconditioner every ns4==25 iterations (?) (for ns4, see vmec_params)

! write(*,*) "update 1d preconditioner"
! write(*,*) "update 1d preconditioner at iter2=", iter2

phipog(:nrzt) = phipog(:nrzt)*wint(:nrzt) ! remember that actually phipog == 1/sqrt(g)

Expand Down
8 changes: 8 additions & 0 deletions src/funct3d.f90
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ SUBROUTINE funct3d (ier_flag)

if (open_dbg_context("constraint_force", num_eqsolve_retries)) then

call add_real_3d("rcon", ns, nzeta, ntheta3, rcon(:nrzt,0))
call add_real_3d("rcon0", ns, nzeta, ntheta3, rcon0(:nrzt))
call add_real_3d("ru0", ns, nzeta, ntheta3, ru0(:nrzt))

call add_real_3d("zcon", ns, nzeta, ntheta3, zcon(:nrzt,0))
call add_real_3d("zcon0", ns, nzeta, ntheta3, zcon0(:nrzt))
call add_real_3d("zu0", ns, nzeta, ntheta3, zu0(:nrzt))

call add_real_3d("extra1", ns, nzeta, ntheta3, extra1(:,0))
call add_real_3d("gcon", ns, nzeta, ntheta3, gcon )

Expand Down

0 comments on commit 33ca88b

Please sign in to comment.