VMEC 8.52
3D Equilibrium solver with nested flux surfaces.
Loading...
Searching...
No Matches
nestor_main.f90
Go to the documentation of this file.
1
3
5program nestor
6 use stel_kinds, only: dp
9 use nestor_io
10
11 implicit none
12
13 character(len=255) :: command_arg, vac_file, vacout_file
14 INTEGER :: numargs, istat1
15
16 !print *, "Hello from NESTOR"
17
18 numargs = iargc()
19 if (numargs.ne.1) then
20 stop "usage: xnestor vacin.nc"
21 end if
22 call getarg(1, command_arg)
23
24 vac_file = trim(command_arg)
25
26 !print *, " input filename: '",trim(vac_file),"'"
27
28 call read_nestor_inputs(trim(vac_file))
29
30 !print *, "set nestor sizes: ", nfp, ntor, mpol, nzeta, ntheta, lasym
32
34
35 ! copy over from input file, not though vacuum call
39
40 CALL vacuum (rmnc, rmns, zmns, zmnc, xm, xn, &
43
44 ! contruct filename into which to write output of stand-alone NESTOR
45 write(vac_file, "(A,I6.6,A)") "vac/vacout_"//trim(input_extension)//"_", &
46 vacuum_calls, ".nc"
47 !print *, "write NESTOR output to '"//trim(vac_file)//"'"
48 call write_nestor_outputs(trim(vac_file), lasym, ivac, ier_flag)
49
51
52end program
Input and Output for stand-alone NESTOR.
Definition nestor_io.f90:5
real(dp), dimension(:), allocatable rmnc
Definition nestor_io.f90:16
integer mnmax
Definition nestor_io.f90:31
real(dp) rbtor
Definition nestor_io.f90:37
integer ivac
Definition nestor_io.f90:29
integer nzeta
Definition nestor_io.f90:26
subroutine write_nestor_outputs(vac_file, lasym, ivac, ier_flag)
real(dp), dimension(:), allocatable rmns
Definition nestor_io.f90:18
integer ntor
Definition nestor_io.f90:23
real(dp) ctor
Definition nestor_io.f90:36
character(len=255) input_extension
Definition nestor_io.f90:9
real(dp), dimension(:), allocatable wint
Definition nestor_io.f90:20
integer mpol
Definition nestor_io.f90:24
real(dp), dimension(:), allocatable zaxis
Definition nestor_io.f90:13
real(dp), dimension(:), allocatable zmns
Definition nestor_io.f90:17
integer ntheta
Definition nestor_io.f90:25
integer vacuum_calls
Definition nestor_io.f90:32
integer ivacskip
Definition nestor_io.f90:30
subroutine read_nestor_inputs(vac_file)
real(dp), dimension(:), allocatable raxis
Definition nestor_io.f90:12
logical lasym
Definition nestor_io.f90:34
integer nfp
Definition nestor_io.f90:22
real(dp) signgs
Definition nestor_io.f90:38
real(dp) bsubvvac_nestor
Definition nestor_io.f90:43
real(dp), dimension(:), allocatable zmnc
Definition nestor_io.f90:19
real(dp), dimension(:), allocatable xn
Definition nestor_io.f90:15
integer ier_flag
Definition nestor_io.f90:28
real(dp), dimension(:), allocatable xm
Definition nestor_io.f90:14
real(dp), dimension(:), allocatable bvecsav_nestor
Definition nestor_io.f90:42
real(dp), dimension(:), allocatable amatsav_nestor
Definition nestor_io.f90:41
integer, parameter dp
subroutine set_nestor_sizes(nfp, ntor, mpol, nzeta, ntheta, lasym)
Definition vacmod0.f90:28
real(rprec), dimension(:), allocatable bvecsav
Definition vacmod.f90:34
subroutine allocate_nestor
Definition vacmod.f90:165
real(rprec), dimension(:), allocatable amatsav
Definition vacmod.f90:35
real(rprec) bsubvvac
Definition vacmod.f90:16
subroutine free_mem_nestor
Definition vacmod.f90:287
program nestor
Main program of stand-alone version of NESTOR.
subroutine vacuum(rmnc, rmns, zmns, zmnc, xm, xn, plascur, rbtor, wint, ivac_skip, ivac, mnmax, ier_flag, lasym, signgs, raxis, zaxis)
Compute the vacuum contribution to the free-boundary energy functional.
Definition vacuum.f90:27