VMEC 8.52
3D Equilibrium solver with nested flux surfaces.
Loading...
Searching...
No Matches
allocate_nunv.f90
Go to the documentation of this file.
1
3
6SUBROUTINE allocate_nunv
7 USE vmec_main
8 USE vmec_params, ONLY: ntmax
9 USE vacmod, only: allocate_nestor, nuv2
10 IMPLICIT NONE
11
12 INTEGER :: istat1
13
14 CALL free_mem_nunv
15
16 ALLOCATE (bsubu0(nznt), rbsq(nznt), dbsq(nznt), stat=istat1)
17 IF (istat1.ne.0) stop 'allocation error #1 in allocate_nunv'
18
19 ALLOCATE (rmn_bdy(0:ntor,0:mpol1,ntmax), zmn_bdy(0:ntor,0:mpol1,ntmax), stat=istat1)
20 IF (istat1.ne.0) stop 'allocation error #2 in allocate_nunv'
21
22 ! PERSISTENT ARRAYS (DURATION OF PROGRAM) for NESTOR
23 IF (lfreeb) then
25
26 ALLOCATE(bsqsav(nuv2,3))
27 end if
28
29END SUBROUTINE allocate_nunv
subroutine allocate_nunv
allocate arrays depending on the number of Fourier coefficients nunv
subroutine free_mem_nunv
Free arrays depending on the number of Fourier coefficients nunv.
subroutine allocate_nestor
Definition vacmod.f90:165
real(rprec), dimension(:), allocatable dbsq
real(rprec), dimension(:,:,:), allocatable, target zmn_bdy
real(rprec), dimension(:), allocatable rbsq
real(rprec), dimension(:,:), allocatable bsqsav
Definition vmec_main.f90:73
real(rprec), dimension(:,:,:), allocatable, target rmn_bdy
real(rprec), dimension(:), allocatable bsubu0
integer ntmax
number of contributing Fourier basis function (can be 1, 2 or 4); assigned in read_indata()