fixed compilation for JETTO

This commit is contained in:
Lorenzo Figini 2015-11-25 15:53:22 +00:00
parent 59617c7a06
commit 1cd0503476
4 changed files with 21 additions and 19 deletions

View File

@ -11,14 +11,12 @@
# D. Harting, d.harting@fz-juelich.de
# Set the environment from the top-level Makefile of JETTO
# --------------------------------------------------------
#include ../include.mk
include ../include.mk
# Alternative search paths
vpath %.f90 src
JLIBDIR = ./
F90 = gfortran
DIRECTIVES = -DREVISION="'$(shell svnversion src)'"
DIRECTIVES = -DEXTBES -DREVISION="rev.155 JETTO" #'$(shell svnversion src)'"
# library name
# ------------
@ -40,11 +38,11 @@ FC=$(F90)
# Set compiler debug and optimization flags
# -----------------------------------------
ifeq ("$(DBG)","")
# FFLAGS= $(AUTO) -O3 -Mpreprocess
FFLAGS=-O3 -cpp
FFLAGS= $(AUTO) -O3 -Mpreprocess
# FFLAGS=-O3 -cpp
else
# FFLAGS= $(AUTO) -O0 -Mpreprocess -g -Minform=inform -Mbounds -Mchkptr
FFLAGS=-Wall -g -finit-real=nan -ffpe-trap=invalid -fcheck=all -fbounds-check
FFLAGS= $(AUTO) -O0 -Mpreprocess -g -Minform=inform -Mbounds -Mchkptr
# FFLAGS=-Wall -g -finit-real=nan -ffpe-trap=invalid -fcheck=all -fbounds-check
endif
# Set include directories
@ -100,10 +98,8 @@ clean:
# Dependencies
# ------------
main.o: const_and_precisions.o beams.o coreprofiles.o equilibrium.o \
graycore.o gray_params.o reflections.o
gray_jetto1beam.o: const_and_precisions.o beams.o graycore.o gray_params.o \
units.o
reflections.o units.o
graycore.o: const_and_precisions.o beamdata.o beams.o coreprofiles.o \
dispersion.o eccd.o equilibrium.o errcodes.o gray_params.o \

View File

@ -350,6 +350,9 @@ contains
! ajbnm,ajbnp,ajbn
real(wp_), dimension(3) :: ajb
complex(wp_) :: ex,ey,ez,emxy,epxy
#ifdef EXTBES
real(wp_), external :: dbesjn
#endif
yg=extrapar(1)
anpl=extrapar(2)
@ -382,13 +385,13 @@ contains
thn2u=upr2*thn2
else
! Full polarization term
! nm=nhn-1
! np=nhn+1
! ajbnm=dbesjn(nm, bb)
! ajbnp=dbesjn(np, bb)
! ajbn=dbesjn(nhn, bb)
! thn2u=(abs(ez*ajbn*upl+upr*(ajbnp*epxy+ajbnm*emxy)/2.0_wp_))**2
#ifdef EXTBES
ajb(1)=dbesjn(nhn-1,bb)
ajb(2)=dbesjn(nhn ,bb)
ajb(3)=dbesjn(nhn+1,bb)
#else
ajb=bessel_jn(nhn-1, nhn+1, bb)
#endif
thn2u=(abs(ez*ajb(2)*upl+upr*(ajb(3)*epxy+ajb(1)*emxy)/2.0_wp_))**2
end if
end if

View File

@ -8,6 +8,7 @@ subroutine gray_jetto1beam(ijetto, mr, mz, r, z, psin, psia, rax, zax, &
eqparam_type,prfparam_type,outparam_type
use beams, only : read_beam2
use graycore, only : gray_main
use reflections, only : range2rect
implicit none
! arguments
integer, intent(in) :: ijetto, mr, mz, nbnd, nrho, ibeam

View File

@ -4,7 +4,7 @@
. qsf, nbeam, powin, alphin, betain, dpdv, jcd, pec, icd, ierr)
implicit none
! input arguments
integer ijetto, mr, mz, nbnd, nrho, nbeam
integer ijetto, mr, mz, mrd, nbnd, nrho, nbeam
real*8 r(mr), z(mz), psin(mrd,mz)
real*8 psiax, psibnd, rax, zax
real*8 rbnd(nbnd), zbnd(nbnd)
@ -16,6 +16,8 @@
! gray_main output arguments
real*8 dpdvloop(nrho), jcdloop(nrho), pecloop, icdloop
integer ierr
! local variables
integer i,j
! === input arguments ==================================================
!
@ -93,7 +95,7 @@
! and adjust alpha/beta if out of the allowed range
! call main subroutine for the j-th beam
subroutine gray_jetto1beam(ijetto, mr, mz, r, z, psin(1:mr,:),
call gray_jetto1beam(ijetto, mr, mz, r, z, psin(1:mr,:),
. psibnd-psiax, rax, zax, nbnd, rbnd, zbnd, nrho, psijet, -f,
. te, dne, zeff, -qsf, j, powin(j), alphin(j), betain(j),
. dpdvloop, jcdloop, pecloop, icdloop, ierr)