diff --git a/fvn_common/fvn_common.f90 b/fvn_common/fvn_common.f90 index 66424bb..899e29d 100644 --- a/fvn_common/fvn_common.f90 +++ b/fvn_common/fvn_common.f90 @@ -1,10 +1,15 @@ module fvn_common ! This module contains routines that are used by more than one fvn submodule -use Kind_Definition implicit none +! Kind Definition Module integrated into fvn_common +integer, parameter :: ip_kind = kind(1) +integer, parameter :: sp_kind = kind(1.0E0) +integer, parameter :: dp_kind = kind(1.0D0) + ! We define pi and i for the module real(kind=dp_kind),parameter :: fvn_pi = 3.141592653589793_dp_kind +real(kind=dp_kind),parameter :: fvn_el = 0.5772156649015328_dp_kind complex(kind=dp_kind),parameter :: fvn_i = (0._dp_kind,1._dp_kind) ! an integer variable that can be used to store the return status of different fvn subroutines diff --git a/fvn_fnlib/besin.f90 b/fvn_fnlib/besin.f90 index 8803963..855c103 100644 --- a/fvn_fnlib/besin.f90 +++ b/fvn_fnlib/besin.f90 @@ -1,5 +1,5 @@ function besin(n,x,factor,big) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel J function ! using recurrence relation : diff --git a/fvn_fnlib/besjn.f90 b/fvn_fnlib/besjn.f90 index 2991fe0..7d27343 100644 --- a/fvn_fnlib/besjn.f90 +++ b/fvn_fnlib/besjn.f90 @@ -1,5 +1,5 @@ function besjn(n,x,factor,big) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel J function ! using recurrence relation : diff --git a/fvn_fnlib/beskn.f90 b/fvn_fnlib/beskn.f90 index 2217f6a..6afabca 100644 --- a/fvn_fnlib/beskn.f90 +++ b/fvn_fnlib/beskn.f90 @@ -1,5 +1,5 @@ function beskn(n,x) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel Y function ! using recurrence relation : diff --git a/fvn_fnlib/besyn.f90 b/fvn_fnlib/besyn.f90 index c16398b..e1ee3a4 100644 --- a/fvn_fnlib/besyn.f90 +++ b/fvn_fnlib/besyn.f90 @@ -1,5 +1,5 @@ function besyn(n,x) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel Y function ! using recurrence relation : diff --git a/fvn_fnlib/dbesin.f90 b/fvn_fnlib/dbesin.f90 index 7291ee1..9926b4e 100644 --- a/fvn_fnlib/dbesin.f90 +++ b/fvn_fnlib/dbesin.f90 @@ -1,5 +1,5 @@ function dbesin(n,x,factor,big) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel J function ! using recurrence relation : diff --git a/fvn_fnlib/dbesjn.f90 b/fvn_fnlib/dbesjn.f90 index e680897..e092866 100644 --- a/fvn_fnlib/dbesjn.f90 +++ b/fvn_fnlib/dbesjn.f90 @@ -1,5 +1,5 @@ function dbesjn(n,x,factor,big) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel J function ! using recurrence relation : diff --git a/fvn_fnlib/dbeskn.f90 b/fvn_fnlib/dbeskn.f90 index 800a414..9b44f3f 100644 --- a/fvn_fnlib/dbeskn.f90 +++ b/fvn_fnlib/dbeskn.f90 @@ -1,5 +1,5 @@ function dbeskn(n,x) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel Y function ! using recurrence relation : diff --git a/fvn_fnlib/dbesyn.f90 b/fvn_fnlib/dbesyn.f90 index 7486874..cffa9f4 100644 --- a/fvn_fnlib/dbesyn.f90 +++ b/fvn_fnlib/dbesyn.f90 @@ -1,5 +1,5 @@ function dbesyn(n,x) - use Kind_Definition + use fvn_common implicit none ! This function compute the rank n Bessel Y function ! using recurrence relation : diff --git a/fvn_fnlib/fvn_fnlib.f90 b/fvn_fnlib/fvn_fnlib.f90 index a591da3..fb06c80 100644 --- a/fvn_fnlib/fvn_fnlib.f90 +++ b/fvn_fnlib/fvn_fnlib.f90 @@ -801,22 +801,22 @@ end interface bskn ! MISSING BSIES !!!!!!!!!!!!!!!!!!!!! ! vector b of Bessel J values of x from order 0 to order (n-1) -interface dbesrj +interface besrj subroutine dbesrj(x,n,b) real(kind(1.d0)) :: x integer :: n real(kind(1.d0)) :: b(n) end subroutine dbesrj -end interface dbesrj +end interface besrj ! vector b of Bessel I values of x from order 0 to order (n-1) -interface dbesri +interface besri subroutine dbesri(x,n,b) real(kind(1.d0)) :: x integer :: n real(kind(1.d0)) :: b(n) end subroutine dbesri -end interface dbesri +end interface besri ! K nu + k interface bsks diff --git a/fvn_fnlib/ze1.f90 b/fvn_fnlib/ze1.f90 index 7d9e006..f6b7f80 100644 --- a/fvn_fnlib/ze1.f90 +++ b/fvn_fnlib/ze1.f90 @@ -8,7 +8,7 @@ function ze1(z) ! ! Déclaration des variables en passage de paramètre ! -use kind_definition +use fvn_common implicit none complex(kind=dp_kind), intent(in) :: z complex(kind=dp_kind) :: ze1 @@ -16,9 +16,9 @@ complex(kind=dp_kind) :: ze1 ! Déclaration des variables locales ! integer(kind=ip_kind) :: k -real(kind=dp_kind) :: pi,el,x,a0 +real(kind=dp_kind) :: x,a0 complex(kind=dp_kind) :: cr,ct0,ct -parameter(pi=3.141592653589793D0,el=0.5772156649015328D0) + ! ! traitement en fonction des différents cas ! - Z nul entraîne E1 infini @@ -38,7 +38,7 @@ parameter(pi=3.141592653589793D0,el=0.5772156649015328D0) cr = -cr*k*z/(k+1.0D0)**2 ze1 = ze1+cr end do - ze1 = -el-log(z)+z*ze1 + ze1 = -fvn_el-log(z)+z*ze1 else ct0 = cmplx(0.0D0,0.0D0,dp_kind) do k=120,1,-1 @@ -46,7 +46,7 @@ parameter(pi=3.141592653589793D0,el=0.5772156649015328D0) end do ct = 1.0D0/(z+ct0) ze1 = exp(-z)*ct - if (x <= 0.D0 .AND. aimag(z) == 0.0d0) ze1 = ze1-pi*cmplx(0.D0,1.D0,dp_kind) + if (x <= 0.D0 .AND. aimag(z) == 0.0d0) ze1 = ze1-fvn_pi*cmplx(0.D0,1.D0,dp_kind) end if ! return diff --git a/fvn_interpol/fvn_interpol.f90 b/fvn_interpol/fvn_interpol.f90 index fe4c532..1098c66 100644 --- a/fvn_interpol/fvn_interpol.f90 +++ b/fvn_interpol/fvn_interpol.f90 @@ -1,5 +1,4 @@ module fvn_interpol -use kind_definition use fvn_common implicit none diff --git a/fvn_linear/fvn_linear.f90 b/fvn_linear/fvn_linear.f90 index 965e28a..52a8acf 100644 --- a/fvn_linear/fvn_linear.f90 +++ b/fvn_linear/fvn_linear.f90 @@ -1,5 +1,4 @@ module fvn_linear -use kind_definition use fvn_common implicit none diff --git a/fvn_sparse/fvn_sparse.f90 b/fvn_sparse/fvn_sparse.f90 index bb63c6f..7fdb5ef 100644 --- a/fvn_sparse/fvn_sparse.f90 +++ b/fvn_sparse/fvn_sparse.f90 @@ -1,5 +1,4 @@ module fvn_sparse -use kind_definition use fvn_common implicit none diff --git a/fvn_test/test_akima.f90 b/fvn_test/test_akima.f90 index 8105f44..44e9117 100644 --- a/fvn_test/test_akima.f90 +++ b/fvn_test/test_akima.f90 @@ -1,6 +1,5 @@ program akima use fvn_interpol -use Kind_Definition implicit none integer :: nbpoints,nppoints,i real(kind=dp_kind),dimension(:),allocatable :: x_d,y_d,breakpoints_d diff --git a/fvn_test/test_bsin.f90 b/fvn_test/test_bsin.f90 index 5f9a845..85c95ad 100644 --- a/fvn_test/test_bsin.f90 +++ b/fvn_test/test_bsin.f90 @@ -1,6 +1,5 @@ program test_bsin use fvn_fnlib -use Kind_Definition implicit none integer :: n,npoints,i real(kind=sp_kind) :: xmin,xmax,xstep,x,y diff --git a/fvn_test/test_bsjn.f90 b/fvn_test/test_bsjn.f90 index 9f5f482..fa2d257 100644 --- a/fvn_test/test_bsjn.f90 +++ b/fvn_test/test_bsjn.f90 @@ -1,6 +1,5 @@ program test_bsjn use fvn_fnlib -use Kind_Definition implicit none integer :: n,npoints,i real(kind=sp_kind) :: xmin,xmax,xstep,x,y diff --git a/fvn_test/test_bskn.f90 b/fvn_test/test_bskn.f90 index 22bfc07..25b9761 100644 --- a/fvn_test/test_bskn.f90 +++ b/fvn_test/test_bskn.f90 @@ -1,6 +1,5 @@ program test_bskn use fvn_fnlib -use Kind_Definition implicit none integer :: n,npoints,i real(kind=sp_kind) :: xmin,xmax,xstep,x,y diff --git a/fvn_test/test_bsyn.f90 b/fvn_test/test_bsyn.f90 index 8232f08..7a8b116 100644 --- a/fvn_test/test_bsyn.f90 +++ b/fvn_test/test_bsyn.f90 @@ -1,6 +1,5 @@ program test_bsyn use fvn_fnlib -use Kind_Definition implicit none integer :: n,npoints,i real(kind=sp_kind) :: xmin,xmax,xstep,x,y diff --git a/fvn_test/test_dbesri.f90 b/fvn_test/test_dbesri.f90 index 7f3f53a..d0fae93 100644 --- a/fvn_test/test_dbesri.f90 +++ b/fvn_test/test_dbesri.f90 @@ -1,6 +1,5 @@ program test_dbesri use fvn_fnlib -use Kind_Definition implicit none ! Variables locales ----------------------------- integer :: i,n,nstep,norder diff --git a/fvn_test/test_dbesrj.f90 b/fvn_test/test_dbesrj.f90 index 025986f..db2e14a 100644 --- a/fvn_test/test_dbesrj.f90 +++ b/fvn_test/test_dbesrj.f90 @@ -1,6 +1,5 @@ program test_dbesrj use fvn_fnlib -use Kind_Definition implicit none ! Variables locales ----------------------------- integer :: i,n,nstep,norder diff --git a/fvn_test/test_det.f90 b/fvn_test/test_det.f90 index 84d0598..a3db65d 100644 --- a/fvn_test/test_det.f90 +++ b/fvn_test/test_det.f90 @@ -1,6 +1,5 @@ program test_det use fvn_linear -use Kind_Definition implicit none real(kind=dp_kind),dimension(3,3) :: a real(kind=dp_kind) :: deta diff --git a/fvn_test/test_integ.f90 b/fvn_test/test_integ.f90 index 531e5a3..2fbd9a8 100644 --- a/fvn_test/test_integ.f90 +++ b/fvn_test/test_integ.f90 @@ -1,6 +1,5 @@ program integ use fvn_integ -use Kind_Definition implicit none real(kind=dp_kind), external :: f1,f2,g,h real(kind=dp_kind) :: a,b,epsabs,epsrel,abserr,res @@ -19,25 +18,25 @@ use Kind_Definition end program function f1(x) -use Kind_Definition +use fvn_common implicit none real(kind=dp_kind) :: x,f1 f1=x*x end function function f2(x,y) -use Kind_Definition +use fvn_common implicit none real(kind=dp_kind) :: x,y,f2 f2=x*y end function function g(x) -use Kind_Definition +use fvn_common implicit none real(kind=dp_kind) :: x,g g=0. end function function h(x) -use Kind_Definition +use fvn_common implicit none real(kind=dp_kind) :: x,h h=1. diff --git a/fvn_test/test_inter1d.f90 b/fvn_test/test_inter1d.f90 index cbb2ccd..6a24b96 100644 --- a/fvn_test/test_inter1d.f90 +++ b/fvn_test/test_inter1d.f90 @@ -1,6 +1,5 @@ program inter1d use fvn_interpol -use Kind_Definition implicit none integer(kind=ip_kind),parameter :: ndata=33 integer(kind=ip_kind) :: i,nout diff --git a/fvn_test/test_inter2d.f90 b/fvn_test/test_inter2d.f90 index 388e27a..ca026c0 100644 --- a/fvn_test/test_inter2d.f90 +++ b/fvn_test/test_inter2d.f90 @@ -1,6 +1,5 @@ program inter2d use fvn_interpol -use Kind_Definition implicit none integer(kind=ip_kind),parameter :: nx=21,ny=42 integer(kind=ip_kind) :: i,j diff --git a/fvn_test/test_inter3d.f90 b/fvn_test/test_inter3d.f90 index a495e49..83095a6 100644 --- a/fvn_test/test_inter3d.f90 +++ b/fvn_test/test_inter3d.f90 @@ -1,6 +1,5 @@ program test_inter3d use fvn_interpol -use Kind_Definition implicit none integer(kind=ip_kind),parameter :: nx=21,ny=42,nz=18 integer(kind=ip_kind) :: i,j,k diff --git a/fvn_test/test_lsp.f90 b/fvn_test/test_lsp.f90 index ce96363..6cc5619 100644 --- a/fvn_test/test_lsp.f90 +++ b/fvn_test/test_lsp.f90 @@ -1,6 +1,5 @@ program lsp use fvn_linear -use Kind_Definition implicit none integer,parameter :: npoints=13,deg=3 integer :: status,i @@ -27,7 +26,7 @@ write(*,*) "pl 'fvn_lsp_double_mesure.dat' u 1:2 w p,'fvn_lsp_double_poly.dat' u 44 FORMAT(4(1X,1PE22.14)) contains function poly(x,coeff) -use Kind_Definition + use fvn_common implicit none real(kind=dp_kind) :: x real(kind=dp_kind) :: coeff(deg+1) diff --git a/fvn_test/test_matcon.f90 b/fvn_test/test_matcon.f90 index e461af0..be09f16 100644 --- a/fvn_test/test_matcon.f90 +++ b/fvn_test/test_matcon.f90 @@ -1,6 +1,5 @@ program test_matcon use fvn_linear -use Kind_Definition implicit none real(kind=dp_kind),dimension(3,3) :: a real(kind=dp_kind) :: rcond diff --git a/fvn_test/test_matev.f90 b/fvn_test/test_matev.f90 index 4bb8508..28cd173 100644 --- a/fvn_test/test_matev.f90 +++ b/fvn_test/test_matev.f90 @@ -1,6 +1,5 @@ program test_matev use fvn_linear -use Kind_Definition implicit none complex(kind=dp_kind),dimension(3,3) :: a real(kind=dp_kind),dimension(3,3) :: ra,ia diff --git a/fvn_test/test_matinv.f90 b/fvn_test/test_matinv.f90 index a472467..c362197 100644 --- a/fvn_test/test_matinv.f90 +++ b/fvn_test/test_matinv.f90 @@ -1,6 +1,5 @@ program test_matinv use fvn_linear -use Kind_Definition implicit none integer(kind=ip_kind), parameter :: n=3 integer(kind=ip_kind) :: status,i diff --git a/fvn_test/test_muller.f90 b/fvn_test/test_muller.f90 index 16a10ec..51ab88e 100644 --- a/fvn_test/test_muller.f90 +++ b/fvn_test/test_muller.f90 @@ -1,6 +1,5 @@ program muller use fvn_misc -use Kind_Definition implicit none integer :: i,info complex(kind=dp_kind),dimension(10) :: roots @@ -17,7 +16,7 @@ enddo end program function f(x) -use Kind_Definition +use fvn_common complex(kind=dp_kind) :: x,f f=x**10-1 end function diff --git a/fvn_test/test_operators.f90 b/fvn_test/test_operators.f90 index c0501fc..60b3fbe 100644 --- a/fvn_test/test_operators.f90 +++ b/fvn_test/test_operators.f90 @@ -1,6 +1,5 @@ program test_matinv use fvn_linear -use Kind_Definition implicit none integer, parameter :: n=3 diff --git a/fvn_test/test_sparse.f90 b/fvn_test/test_sparse.f90 index 42e6e34..09014d8 100644 --- a/fvn_test/test_sparse.f90 +++ b/fvn_test/test_sparse.f90 @@ -1,6 +1,5 @@ program test_sparse use fvn_sparse -use Kind_Definition implicit none integer(kind=ip_kind), parameter :: nz=12 integer(kind=ip_kind), parameter :: n=5 diff --git a/fvn_test/test_specfunc.f90 b/fvn_test/test_specfunc.f90 index 180e68c..c87f77b 100644 --- a/fvn_test/test_specfunc.f90 +++ b/fvn_test/test_specfunc.f90 @@ -1,6 +1,5 @@ program test_specfunc use fvn_fnlib -use Kind_Definition implicit none integer,parameter :: npoints=200 integer :: i diff --git a/fvn_test/test_ze1.f90 b/fvn_test/test_ze1.f90 index 6474189..e853a8c 100644 --- a/fvn_test/test_ze1.f90 +++ b/fvn_test/test_ze1.f90 @@ -1,6 +1,5 @@ program test_ze1 use fvn_fnlib -use Kind_Definition implicit none complex(kind=dp_kind) :: z,resz