Skip to content

Commit f3b9b82

Browse files
committed
Mostly formatting
1 parent f45ca55 commit f3b9b82

File tree

8 files changed

+16
-25
lines changed

8 files changed

+16
-25
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,3 @@ src/msphdf5.f90
6060

6161
# vscode files
6262
.vscode/
63-
64-
# conda files
65-
etc/conda/

Utilities/pythontools/requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ h5py
22
matplotlib
33
f90nml
44
numpy
5-
scipy
65
coilpy

src/dforce.f90

+4-6
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,14 @@ subroutine dforce( NGdof, position, force, LComputeDerivatives, LComputeAxis)
9898

9999
use numerical, only : logtolerance
100100

101-
use fileunits, only : ounit
101+
use fileunits, only : ounit, munit
102102

103103
use inputlist, only : Wmacros, Wdforce, Nvol, Ntor, Lrad, Igeometry, &
104104
epsilon, &
105105
Lconstraint, Lcheck, dRZ, &
106106
Lextrap, &
107107
mupftol, &
108-
Lfreebound, LHmatrix, gamma, pscale, adiabatic, rpol, rtor
109-
110-
use fileunits, only : ounit, hunit, munit ! added by Erol
108+
Lfreebound, LHmatrix, gamma, pscale, adiabatic
111109

112110
use cputiming, only : Tdforce
113111

@@ -136,8 +134,8 @@ subroutine dforce( NGdof, position, force, LComputeDerivatives, LComputeAxis)
136134
LocalConstraint, xoffset, &
137135
solution, IPdtdPf, &
138136
IsMyVolume, IsMyVolumeValue, WhichCpuID, &
139-
ext, vvolume, & ! For outputing Lcheck = 6 test
140-
BetaTotal
137+
ext, & ! For outputing Lcheck = 6 test
138+
BetaTotal, vvolume
141139

142140
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
143141

src/global.f90

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module constants
6666
REAL, parameter :: mu0 = 2.0E-07 * pi2 !< \f$4\pi\cdot10^{-7}\f$
6767
REAL, parameter :: goldenmean = 1.618033988749895 !< golden mean = \f$( 1 + \sqrt 5 ) / 2\f$ ;
6868

69-
REAL, parameter :: version = 3.21 !< version of SPEC
69+
REAL, parameter :: version = 3.20 !< version of SPEC
7070

7171
end module constants
7272

@@ -250,13 +250,13 @@ module allglobal
250250

251251
REAL :: ForceErr !< total force-imbalance
252252
REAL :: Energy !< MHD energy
253-
REAL :: BetaTotal=0.0 !< Beta, averaged over entire domain
253+
REAL :: BetaTotal = 0.0 !< Beta, averaged over entire domain
254254

255255
REAL , allocatable :: IPDt(:), IPDtDpf(:,:) !< Toroidal pressure-driven current
256256

257257
INTEGER :: Mvol
258258

259-
REAL :: total_pflux ! total pflux, used in Lconstraint=3, Igeometry=1 -- Edit by Erol
259+
REAL :: total_pflux ! used when Lconstraint=3, Igeometry=1
260260

261261
LOGICAL :: YESstellsym !< internal shorthand copies of Istellsym, which is an integer input;
262262
LOGICAL :: NOTstellsym !< internal shorthand copies of Istellsym, which is an integer input;

src/pp00ab.f90

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ subroutine pp00ab( lvol, sti, Nz, nPpts, poincaredata, fittedtransform, utflag )
3333

3434
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
3535

36-
use constants, only : zero, one, two, pi2, pi
36+
use constants, only : zero, one, two, pi2
3737

3838
use numerical, only : small
3939

@@ -115,13 +115,11 @@ subroutine pp00ab( lvol, sti, Nz, nPpts, poincaredata, fittedtransform, utflag )
115115

116116
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
117117

118-
119-
120118
do kk = 0, Nz-1 ! loop over toroidal Poincare cross sections;
121119

122120
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
123-
stz(1:3) = (/ ppt(2), mod(ppt(1),pi2), zst /) ! toroidal coordinates;
124121

122+
stz(1:3) = (/ ppt(2), mod(ppt(1),pi2), zst /) ! toroidal coordinates;
125123

126124
if( abs(stz(1)).gt.one ) then ; ; utflag = 0 ; exit ! exit do kk loop; 22 Apr 13; ! 28 Feb 17;
127125

src/preset.f90

+3-2
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,14 @@ subroutine preset
508508
SALLOCATE( dtflux, (1:Mvol), zero )
509509
SALLOCATE( dpflux, (1:Mvol), zero )
510510

511+
! with Igeom=1, Lcons=3, need to provide total pflux
511512
if(Lconstraint.eq.3 .and. Igeometry.eq.1) then
512513
total_pflux = pflux(Mvol) * phiedge / pi2
513514
pflux(Mvol) = 0
514515
endif
515516

516517
select case( Igeometry )
517-
case( 1 ) ; dtflux(1) = tflux(1) ; dpflux(1) = pflux(1) ! Edit by Erol -- Cartesian ; this is the "inverse" operation defined in xspech; 09 Mar 17;
518+
case( 1 ) ; dtflux(1) = tflux(1) ; dpflux(1) = pflux(1) ! Cartesian ; this is the "inverse" operation defined in xspech; 09 Mar 17;
518519
case( 2:3 ) ; dtflux(1) = tflux(1) ; dpflux(1) = zero ! cylindrical or toroidal;
519520
end select
520521

@@ -813,7 +814,7 @@ subroutine preset
813814
SALLOCATE( IPDtDpf, (1:Mvol , 1:Mvol ), zero)
814815
else
815816
if(Igeometry.eq.1) then
816-
! add an additional constraint to make the total pflux = 0 -- Edit Erol
817+
! add an additional constraint to make the total pflux = 0
817818
SALLOCATE( IPDtDpf, (1:Mvol, 1:Mvol), zero)
818819
else
819820
SALLOCATE( IPDtDpf, (1:Mvol-1, 1:Mvol-1), zero)

src/volume.f90

+1-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ subroutine volume( lvol, vflag )
120120
if( dBdX%issym.eq.0 ) dvolume = one ! note that the sign factor for the lower interface is included below; 20 Jun 14;
121121
endif
122122

123-
! Erol -- potential fix
123+
! respecting rpol, rtor sizes of slab
124124
vol(innout) = vol(innout) * rpol * rtor
125125

126126
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
@@ -334,8 +334,6 @@ subroutine volume( lvol, vflag )
334334
write(ounit,'("volume : ",f10.2," : myid=",i3," ; Igeometry=",i2," ; vvolume(",i3," ) =",es23.15" ;")') cput-cpus, myid, Igeometry, lvol, vvolume(lvol)
335335
endif
336336

337-
! write(*,*)"lvol ", lvol, "volume", vvolume(lvol)
338-
339337
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
340338

341339
FATAL( volume, vflag.eq.0 .and. vvolume(lvol).lt.small, volume cannot be zero or negative ) ! 15 Jan 13;

src/xspech.f90

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ subroutine xspech
100100

101101
! initialize internal arrays based on data from input file
102102
call preset()
103-
103+
104104
! initialize HDF5 library and open output file ext.h5 for writing during execution
105105
call init_outfile()
106-
106+
107107
! mirror input file contents to output file
108108
call mirror_input_to_outfile()
109-
109+
110110
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
111111

112112
if ( myid .eq. 0 ) then ! save restart file;

0 commit comments

Comments
 (0)