Skip to content
Snippets Groups Projects
Commit 68bac379 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

Correction of typos and bad variables types

parent 20ed4685
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,7 @@ CONTAINS ...@@ -95,6 +95,7 @@ CONTAINS
IF( my_id .eq. 0 ) WRITE(*,*) 'Z-pinch geometry' IF( my_id .eq. 0 ) WRITE(*,*) 'Z-pinch geometry'
call eval_zpinch_geometry call eval_zpinch_geometry
SHEARED = .FALSE. SHEARED = .FALSE.
shear = 0._dp
CASE('miller') CASE('miller')
IF( my_id .eq. 0 ) WRITE(*,*) 'Miller geometry' IF( my_id .eq. 0 ) WRITE(*,*) 'Miller geometry'
call set_miller_parameters(kappa,s_kappa,delta,s_delta,zeta,s_zeta) call set_miller_parameters(kappa,s_kappa,delta,s_delta,zeta,s_zeta)
......
...@@ -20,7 +20,7 @@ MODULE grid ...@@ -20,7 +20,7 @@ MODULE grid
INTEGER, PUBLIC, PROTECTED :: Ny = 16 ! Number of total internal grid points in y INTEGER, PUBLIC, PROTECTED :: Ny = 16 ! Number of total internal grid points in y
REAL(dp), PUBLIC, PROTECTED :: Ly = 1._dp ! vertical length of the spatial box REAL(dp), PUBLIC, PROTECTED :: Ly = 1._dp ! vertical length of the spatial box
INTEGER, PUBLIC, PROTECTED :: Nz = 1 ! Number of total perpendicular planes INTEGER, PUBLIC, PROTECTED :: Nz = 1 ! Number of total perpendicular planes
REAL(dp), PUBLIC, PROTECTED :: Npol = 1._dp ! number of poloidal turns INTEGER, PUBLIC, PROTECTED :: Npol = 1 ! number of poloidal turns
INTEGER, PUBLIC, PROTECTED :: Odz = 4 ! order of z interp and derivative schemes INTEGER, PUBLIC, PROTECTED :: Odz = 4 ! order of z interp and derivative schemes
INTEGER, PUBLIC, PROTECTED :: Nkx = 8 ! Number of total internal grid points in kx INTEGER, PUBLIC, PROTECTED :: Nkx = 8 ! Number of total internal grid points in kx
REAL(dp), PUBLIC, PROTECTED :: Lkx = 1._dp ! horizontal length of the fourier box REAL(dp), PUBLIC, PROTECTED :: Lkx = 1._dp ! horizontal length of the fourier box
...@@ -370,7 +370,7 @@ CONTAINS ...@@ -370,7 +370,7 @@ CONTAINS
REAL(dp), INTENT(IN) :: shear REAL(dp), INTENT(IN) :: shear
REAL :: Lx_adapted REAL :: Lx_adapted
INTEGER :: i_, counter INTEGER :: i_, counter
IF(shear .GT. 0._dp) THEN IF(shear .GT. 0) THEN
IF(my_id.EQ.0) write(*,*) 'Magnetic shear detected: set up sheared kx grid..' IF(my_id.EQ.0) write(*,*) 'Magnetic shear detected: set up sheared kx grid..'
! mininal size of box in x to respect dkx = 2pi shear dky ! mininal size of box in x to respect dkx = 2pi shear dky
Lx_adapted = Ly/(2._dp*pi*shear*Npol) Lx_adapted = Ly/(2._dp*pi*shear*Npol)
......
...@@ -607,8 +607,8 @@ CONTAINS ...@@ -607,8 +607,8 @@ CONTAINS
!> Generate an equidistant array from min to max with n points !> Generate an equidistant array from min to max with n points
function linspace(min,max,n) result(out) function linspace(min,max,n) result(out)
real(dp):: min, max real(dp), INTENT(IN):: min, max
integer:: n integer, INTENT(IN):: n
real(dp), dimension(n):: out real(dp), dimension(n):: out
do i=1,n do i=1,n
...@@ -618,20 +618,20 @@ CONTAINS ...@@ -618,20 +618,20 @@ CONTAINS
!> Weighted average !> Weighted average
real(dp) function average(var,weight) real(dp) function average(var,weight)
real(dp), dimension(np):: var, weight real(dp), dimension(np), INTENT(IN):: var, weight
average=sum(var*weight)/sum(weight) average=sum(var*weight)/sum(weight)
end function average end function average
!> full theta integral with weight function dlp !> full theta integral with weight function dlp
real(dp) function dlp_int(var,dlp) real(dp) function dlp_int(var,dlp)
real(dp), dimension(np):: var, dlp real(dp), dimension(np), INTENT(IN):: var, dlp
dlp_int=sum(var*dlp)*2*pi*Npol_ext/np dlp_int=sum(var*dlp)*2*pi*Npol_ext/np
end function dlp_int end function dlp_int
!> theta integral with weight function dlp, up to index 'ind' !> theta integral with weight function dlp, up to index 'ind'
real(dp) function dlp_int_ind(var,dlp,ind) real(dp) function dlp_int_ind(var,dlp,ind)
real(dp), dimension(np):: var, dlp real(dp), dimension(np), INTENT(IN):: var, dlp
integer:: ind integer, INTENT(IN):: ind
dlp_int_ind=0. dlp_int_ind=0.
if (ind.gt.1) then if (ind.gt.1) then
...@@ -643,8 +643,9 @@ CONTAINS ...@@ -643,8 +643,9 @@ CONTAINS
!> 1st derivative with 2nd order finite differences !> 1st derivative with 2nd order finite differences
function deriv_fd(y,x,n) result(out) function deriv_fd(y,x,n) result(out)
integer, intent(in) :: n integer, INTENT(IN) :: n
real(dp), dimension(n):: x,y,out,dx real(dp), dimension(n), INTENT(IN):: x,y
real(dp), dimension(n) :: out,dx
!call lag3deriv(y,x,n,out,x,n) !call lag3deriv(y,x,n,out,x,n)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment