changed function names and logical unit numbers to avoid conflicts in JINTRAC
This commit is contained in:
parent
560f3053cd
commit
5484959955
143
Makefile
143
Makefile
@ -1,61 +1,112 @@
|
|||||||
# Executable name
|
# Makefile for JETTO fortran 90 library 'gray'
|
||||||
EXE=gray
|
# Author: Lorenzo Figini (figini@ifp.cnr.it)
|
||||||
LIBFILE=lib$(EXE).a
|
#
|
||||||
|
# Derived from
|
||||||
|
# Makefile for JETTO fortran 77 library 'frantic'
|
||||||
|
# Author: Derek Harting (d.harting@fz-juelich.de)
|
||||||
|
# and
|
||||||
|
# Makefile for ITCequ Fortran 90 library - definitions
|
||||||
|
# P. Strand, elfps@chalmers.se
|
||||||
|
# G. Corrigan, gcor@jet.uk
|
||||||
|
# D. Harting, d.harting@fz-juelich.de
|
||||||
|
|
||||||
|
# Set the environment from the top-level Makefile of JETTO
|
||||||
|
# --------------------------------------------------------
|
||||||
|
include ../include.mk
|
||||||
|
|
||||||
# Objects list
|
# library name
|
||||||
OBJ=gray_main.o gray-externals.o grayl.o reflections.o green_func_p.o \
|
# ------------
|
||||||
const_and_precisions.o itm_constants.o itm_types.o
|
LIBNAME=$(JLIBDIR)/libgray.a
|
||||||
|
|
||||||
# Alternative search paths
|
# List source and object files
|
||||||
vpath %.f90 src
|
# ----------------------------
|
||||||
vpath %.f src
|
FSRC=$(wildcard *.f *.f90)
|
||||||
|
FOBJ0=$(FSRC:.f=.o)
|
||||||
|
FOBJ=$(FOBJ0:.f90=.o)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# Set up compiler specific environment #
|
||||||
|
########################################
|
||||||
|
|
||||||
# Fortran compiler name and flags
|
# set default compiler
|
||||||
FC=gfortran
|
# --------------------
|
||||||
FFLAGS=-O0 -g -fbounds-check -Wall
|
FC=$(F90)
|
||||||
#FFLAGS=-O3
|
|
||||||
|
|
||||||
DIRECTIVES = -DREVISION="'$(shell svnversion)'"
|
# Set compiler debug and optimization flags
|
||||||
|
# -----------------------------------------
|
||||||
|
ifeq ("$(DBG)","")
|
||||||
|
FFLAGS= $(AUTO) -O3
|
||||||
|
else
|
||||||
|
FFLAGS= $(AUTO) -O0 -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Set include directories
|
||||||
|
# -----------------------
|
||||||
|
#INC=-I$(JCOMMON_STD)
|
||||||
|
INC=
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set up RULES specific environment #
|
||||||
|
#####################################
|
||||||
|
|
||||||
all: library
|
# suffixes
|
||||||
|
# --------
|
||||||
|
.SUFFIXES: .f90 .f .o .mod
|
||||||
|
|
||||||
# Build executable from object files
|
# PHONY targets
|
||||||
$(EXE): main.o $(OBJ)
|
# -------------
|
||||||
$(FC) $(FFLAGS) -o $@ $^
|
.PHONY: all clean realclean $(MASTER_RULES) gray
|
||||||
|
|
||||||
|
# default target
|
||||||
|
# --------------
|
||||||
|
all:
|
||||||
|
@($(MAKE) -C ../ all) || exit $$?
|
||||||
|
|
||||||
|
# Set rules passed to top-level Makefile
|
||||||
|
# --------------------------------------
|
||||||
|
$(MASTER_RULES):
|
||||||
|
@($(MAKE) -C ../ $@) || exit $$?
|
||||||
|
|
||||||
|
# rule for libgray.a
|
||||||
|
# --------------------
|
||||||
|
$(LIBNAME): $(FOBJ)
|
||||||
|
ar vr $(LIBNAME) $?
|
||||||
|
|
||||||
|
# synonym for libgray.a
|
||||||
|
# -----------------------
|
||||||
|
gray: $(LIBNAME)
|
||||||
|
|
||||||
|
# create rule for compiling f90 files
|
||||||
|
# -----------------------------------
|
||||||
|
%.o: %.f90
|
||||||
|
$(FC) -c $(FFLAGS) $(INC) $<
|
||||||
|
|
||||||
|
# create rule for compiling f files
|
||||||
|
# ---------------------------------
|
||||||
|
%.o: %.f
|
||||||
|
$(FC) -c $(FFLAGS) $(INC) $<
|
||||||
|
|
||||||
|
# make 'realclean' option
|
||||||
|
# -----------------------
|
||||||
|
realclean:
|
||||||
|
rm -f *.o *.mod $(LIBNAME)
|
||||||
|
|
||||||
|
# make 'clean' option
|
||||||
|
# -------------------
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
||||||
|
|
||||||
$(LIBFILE): $(OBJ)
|
# Dependencies
|
||||||
rm -f $@
|
# ------------
|
||||||
ar -rv $@ $^
|
|
||||||
|
|
||||||
# Dependencies on modules
|
|
||||||
main.o: gray_main.o
|
|
||||||
gray_main.o: gray-externals.o itm_types.o
|
gray_main.o: gray-externals.o itm_types.o
|
||||||
gray-externals.o: green_func_p.o reflections.o
|
gray-externals.o: green_func_p.o reflections.o
|
||||||
green_func_p.o: const_and_precisions.o
|
green_func_p.o: const_and_precisions.o
|
||||||
const_and_precisions.o: itm_types.o itm_constants.o
|
const_and_precisions.o: itm_types.o itm_constants.o
|
||||||
itm_constants.o: itm_types.o
|
itm_constants.o: itm_types.o
|
||||||
|
|
||||||
# General object compilation command
|
# Special rule to preprocess source file and include svn revision
|
||||||
%.o: %.f90
|
# ---------------------------------------------------------------
|
||||||
$(FC) $(FFLAGS) -c $<
|
DIRECTIVES = -DREVISION="'$(shell svnversion)'"
|
||||||
|
|
||||||
gray-externals.o:gray-externals.f
|
gray-externals.o:gray-externals.f
|
||||||
$(FC) -cpp $(DIRECTIVES) $(FFLAGS) -c $<
|
$(FC) -c -Mpreprocess $(DIRECTIVES) $(FFLAGS) $(INC) $<
|
||||||
|
|
||||||
grayl.o:grayl.f
|
|
||||||
$(FC) $(FFLAGS) -c $<
|
|
||||||
|
|
||||||
.PHONY: library clean install
|
|
||||||
|
|
||||||
library: $(LIBFILE)
|
|
||||||
|
|
||||||
# Remove output files
|
|
||||||
clean:
|
|
||||||
rm -rf *.o *.mod $(EXE)
|
|
||||||
|
|
||||||
install:
|
|
||||||
@if [ -f $(EXE) ]; then \
|
|
||||||
cp $(EXE) ~/bin/; \
|
|
||||||
else \
|
|
||||||
echo File $(EXE) does not exist. Run \'make\' first; \
|
|
||||||
fi
|
|
||||||
|
61
Makefile.standalone
Normal file
61
Makefile.standalone
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Executable name
|
||||||
|
EXE=gray
|
||||||
|
LIBFILE=lib$(EXE).a
|
||||||
|
|
||||||
|
# Objects list
|
||||||
|
OBJ=gray_main.o gray-externals.o grayl.o reflections.o green_func_p.o \
|
||||||
|
const_and_precisions.o itm_constants.o itm_types.o
|
||||||
|
|
||||||
|
# Alternative search paths
|
||||||
|
vpath %.f90 src
|
||||||
|
vpath %.f src
|
||||||
|
|
||||||
|
# Fortran compiler name and flags
|
||||||
|
FC=gfortran
|
||||||
|
FFLAGS=-O0 -g -fbounds-check -Wall
|
||||||
|
#FFLAGS=-O3
|
||||||
|
|
||||||
|
DIRECTIVES = -DREVISION="'$(shell svnversion)'"
|
||||||
|
|
||||||
|
all: library
|
||||||
|
|
||||||
|
# Build executable from object files
|
||||||
|
$(EXE): main.o $(OBJ)
|
||||||
|
$(FC) $(FFLAGS) -o $@ $^
|
||||||
|
|
||||||
|
$(LIBFILE): $(OBJ)
|
||||||
|
rm -f $@
|
||||||
|
ar -rv $@ $^
|
||||||
|
|
||||||
|
# Dependencies on modules
|
||||||
|
main.o: gray_main.o
|
||||||
|
gray_main.o: gray-externals.o itm_types.o
|
||||||
|
gray-externals.o: green_func_p.o reflections.o
|
||||||
|
green_func_p.o: const_and_precisions.o
|
||||||
|
const_and_precisions.o: itm_types.o itm_constants.o
|
||||||
|
itm_constants.o: itm_types.o
|
||||||
|
|
||||||
|
# General object compilation command
|
||||||
|
%.o: %.f90
|
||||||
|
$(FC) $(FFLAGS) -c $<
|
||||||
|
|
||||||
|
gray-externals.o:gray-externals.f
|
||||||
|
$(FC) -cpp $(DIRECTIVES) $(FFLAGS) -c $<
|
||||||
|
|
||||||
|
grayl.o:grayl.f
|
||||||
|
$(FC) $(FFLAGS) -c $<
|
||||||
|
|
||||||
|
.PHONY: library clean install
|
||||||
|
|
||||||
|
library: $(LIBFILE)
|
||||||
|
|
||||||
|
# Remove output files
|
||||||
|
clean:
|
||||||
|
rm -rf *.o *.mod $(EXE)
|
||||||
|
|
||||||
|
install:
|
||||||
|
@if [ -f $(EXE) ]; then \
|
||||||
|
cp $(EXE) ~/bin/; \
|
||||||
|
else \
|
||||||
|
echo File $(EXE) does not exist. Run \'make\' first; \
|
||||||
|
fi
|
File diff suppressed because it is too large
Load Diff
30
src/grayl.f
30
src/grayl.f
@ -1,4 +1,4 @@
|
|||||||
subroutine locate(xx,n,x,j)
|
subroutine vlocate(xx,n,x,j)
|
||||||
implicit real*8(a-h,o-z)
|
implicit real*8(a-h,o-z)
|
||||||
dimension xx(n)
|
dimension xx(n)
|
||||||
c
|
c
|
||||||
@ -260,25 +260,25 @@ c
|
|||||||
c spline routines: begin
|
c spline routines: begin
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
function spli(cspli,n,k,dx)
|
function fspli(cspli,n,k,dx)
|
||||||
implicit real*8(a-h,o-z)
|
implicit real*8(a-h,o-z)
|
||||||
dimension cspli(n,4)
|
dimension cspli(n,4)
|
||||||
spli=cspli(k,1)+dx*(cspli(k,2)+dx*(cspli(k,3)+dx*cspli(k,4)))
|
fspli=cspli(k,1)+dx*(cspli(k,2)+dx*(cspli(k,3)+dx*cspli(k,4)))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
function splid(cspli,n,k,dx)
|
function fsplid(cspli,n,k,dx)
|
||||||
implicit real*8(a-h,o-z)
|
implicit real*8(a-h,o-z)
|
||||||
dimension cspli(n,4)
|
dimension cspli(n,4)
|
||||||
splid=cspli(k,2)+dx*(2.0d0*cspli(k,3)+3.0d0*dx*cspli(k,4))
|
fsplid=cspli(k,2)+dx*(2.0d0*cspli(k,3)+3.0d0*dx*cspli(k,4))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
subroutine difcs(x,y,n,iopt,c,ier)
|
subroutine difcsg(x,y,n,iopt,c,ier)
|
||||||
implicit real*8(a-h,o-z)
|
implicit real*8(a-h,o-z)
|
||||||
dimension x(n),y(n),c(n*4)
|
dimension x(n),y(n),c(n*4)
|
||||||
jmp =1
|
jmp =1
|
||||||
@ -383,7 +383,7 @@ c
|
|||||||
c
|
c
|
||||||
subroutine difcsn(xx,yy,nmx,n,iopt,cc,ier)
|
subroutine difcsn(xx,yy,nmx,n,iopt,cc,ier)
|
||||||
c
|
c
|
||||||
c same as difcs but with dimension(xx,yy) = nmx > n
|
c same as difcsg but with dimension(xx,yy) = nmx > n
|
||||||
c
|
c
|
||||||
implicit real*8(a-h,o-z)
|
implicit real*8(a-h,o-z)
|
||||||
c
|
c
|
||||||
@ -689,7 +689,7 @@ c
|
|||||||
t(1)=acos(x)
|
t(1)=acos(x)
|
||||||
h(1)=tau*t(1)
|
h(1)=tau*t(1)
|
||||||
b0=besi0(h(1))
|
b0=besi0(h(1))
|
||||||
b1=besi1(h(1))
|
b1=besi1g(h(1))
|
||||||
z=-1.0d0
|
z=-1.0d0
|
||||||
go to 3
|
go to 3
|
||||||
c
|
c
|
||||||
@ -1220,7 +1220,7 @@ c
|
|||||||
e=.true.
|
e=.true.
|
||||||
go to 2
|
go to 2
|
||||||
c
|
c
|
||||||
entry besi1(x)
|
entry besi1g(x)
|
||||||
c
|
c
|
||||||
e=.false.
|
e=.false.
|
||||||
2 l=.true.
|
2 l=.true.
|
||||||
@ -8485,13 +8485,13 @@ c error codes and messages.
|
|||||||
c
|
c
|
||||||
c
|
c
|
||||||
c
|
c
|
||||||
subroutine splder(t,n,c,k,nu,x,y,m,wrk,ier)
|
subroutine gsplder(t,n,c,k,nu,x,y,m,wrk,ier)
|
||||||
c subroutine splder evaluates in a number of points x(i),i=1,2,...,m
|
c subroutine gsplder evaluates in a number of points x(i),i=1,2,...,m
|
||||||
c the derivative of order nu of a spline s(x) of degree k,given in
|
c the derivative of order nu of a spline s(x) of degree k,given in
|
||||||
c its b-spline representation.
|
c its b-spline representation.
|
||||||
c
|
c
|
||||||
c calling sequence:
|
c calling sequence:
|
||||||
c call splder(t,n,c,k,nu,x,y,m,wrk,ier)
|
c call gsplder(t,n,c,k,nu,x,y,m,wrk,ier)
|
||||||
c
|
c
|
||||||
c input parameters:
|
c input parameters:
|
||||||
c t : array,length n, which contains the position of the knots.
|
c t : array,length n, which contains the position of the knots.
|
||||||
@ -8907,15 +8907,15 @@ c the zeros of s(x) are arranged in increasing order.
|
|||||||
end
|
end
|
||||||
|
|
||||||
c
|
c
|
||||||
subroutine profil(iopt,tx,nx,ty,ny,c,kx,ky,u,nu,cu,ier)
|
subroutine sprofil(iopt,tx,nx,ty,ny,c,kx,ky,u,nu,cu,ier)
|
||||||
c if iopt=0 subroutine profil calculates the b-spline coefficients of
|
c if iopt=0 subroutine sprofil calculates the b-spline coefficients of
|
||||||
c the univariate spline f(y) = s(u,y) with s(x,y) a bivariate spline of
|
c the univariate spline f(y) = s(u,y) with s(x,y) a bivariate spline of
|
||||||
c degrees kx and ky, given in the b-spline representation.
|
c degrees kx and ky, given in the b-spline representation.
|
||||||
c if iopt = 1 it calculates the b-spline coefficients of the univariate
|
c if iopt = 1 it calculates the b-spline coefficients of the univariate
|
||||||
c spline g(x) = s(x,u)
|
c spline g(x) = s(x,u)
|
||||||
c
|
c
|
||||||
c calling sequence:
|
c calling sequence:
|
||||||
c call profil(iopt,tx,nx,ty,ny,c,kx,ky,u,nu,cu,ier)
|
c call sprofil(iopt,tx,nx,ty,ny,c,kx,ky,u,nu,cu,ier)
|
||||||
c
|
c
|
||||||
c input parameters:
|
c input parameters:
|
||||||
c iopt : integer flag, specifying whether the profile f(y) (iopt=0)
|
c iopt : integer flag, specifying whether the profile f(y) (iopt=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user