Commit 8d883e8a1a3882fb07ea162471fdc9f2c133bf81
1 parent
f6bacaf83a
Exists in
master
and in
3 other branches
Integration of kind_definition to fvn_common
git-svn-id: https://lxsd.femto-st.fr/svn/fvn@59 b657c933-2333-4658-acf2-d3c7c2708721
Showing 35 changed files with 29 additions and 48 deletions Side-by-side Diff
- fvn_common/fvn_common.f90
- fvn_fnlib/besin.f90
- fvn_fnlib/besjn.f90
- fvn_fnlib/beskn.f90
- fvn_fnlib/besyn.f90
- fvn_fnlib/dbesin.f90
- fvn_fnlib/dbesjn.f90
- fvn_fnlib/dbeskn.f90
- fvn_fnlib/dbesyn.f90
- fvn_fnlib/fvn_fnlib.f90
- fvn_fnlib/ze1.f90
- fvn_interpol/fvn_interpol.f90
- fvn_linear/fvn_linear.f90
- fvn_sparse/fvn_sparse.f90
- fvn_test/test_akima.f90
- fvn_test/test_bsin.f90
- fvn_test/test_bsjn.f90
- fvn_test/test_bskn.f90
- fvn_test/test_bsyn.f90
- fvn_test/test_dbesri.f90
- fvn_test/test_dbesrj.f90
- fvn_test/test_det.f90
- fvn_test/test_integ.f90
- fvn_test/test_inter1d.f90
- fvn_test/test_inter2d.f90
- fvn_test/test_inter3d.f90
- fvn_test/test_lsp.f90
- fvn_test/test_matcon.f90
- fvn_test/test_matev.f90
- fvn_test/test_matinv.f90
- fvn_test/test_muller.f90
- fvn_test/test_operators.f90
- fvn_test/test_sparse.f90
- fvn_test/test_specfunc.f90
- fvn_test/test_ze1.f90
fvn_common/fvn_common.f90
| 1 | 1 | module fvn_common |
| 2 | 2 | ! This module contains routines that are used by more than one fvn submodule |
| 3 | 3 | |
| 4 | -use Kind_Definition | |
| 5 | 4 | implicit none |
| 5 | +! Kind Definition Module integrated into fvn_common | |
| 6 | +integer, parameter :: ip_kind = kind(1) | |
| 7 | +integer, parameter :: sp_kind = kind(1.0E0) | |
| 8 | +integer, parameter :: dp_kind = kind(1.0D0) | |
| 9 | + | |
| 6 | 10 | ! We define pi and i for the module |
| 7 | 11 | real(kind=dp_kind),parameter :: fvn_pi = 3.141592653589793_dp_kind |
| 12 | +real(kind=dp_kind),parameter :: fvn_el = 0.5772156649015328_dp_kind | |
| 8 | 13 | complex(kind=dp_kind),parameter :: fvn_i = (0._dp_kind,1._dp_kind) |
| 9 | 14 | |
| 10 | 15 | ! an integer variable that can be used to store the return status of different fvn subroutines |
fvn_fnlib/besin.f90
fvn_fnlib/besjn.f90
fvn_fnlib/beskn.f90
fvn_fnlib/besyn.f90
fvn_fnlib/dbesin.f90
fvn_fnlib/dbesjn.f90
fvn_fnlib/dbeskn.f90
fvn_fnlib/dbesyn.f90
fvn_fnlib/fvn_fnlib.f90
| ... | ... | @@ -801,22 +801,22 @@ |
| 801 | 801 | ! MISSING BSIES |
| 802 | 802 | !!!!!!!!!!!!!!!!!!!!! |
| 803 | 803 | ! vector b of Bessel J values of x from order 0 to order (n-1) |
| 804 | -interface dbesrj | |
| 804 | +interface besrj | |
| 805 | 805 | subroutine dbesrj(x,n,b) |
| 806 | 806 | real(kind(1.d0)) :: x |
| 807 | 807 | integer :: n |
| 808 | 808 | real(kind(1.d0)) :: b(n) |
| 809 | 809 | end subroutine dbesrj |
| 810 | -end interface dbesrj | |
| 810 | +end interface besrj | |
| 811 | 811 | |
| 812 | 812 | ! vector b of Bessel I values of x from order 0 to order (n-1) |
| 813 | -interface dbesri | |
| 813 | +interface besri | |
| 814 | 814 | subroutine dbesri(x,n,b) |
| 815 | 815 | real(kind(1.d0)) :: x |
| 816 | 816 | integer :: n |
| 817 | 817 | real(kind(1.d0)) :: b(n) |
| 818 | 818 | end subroutine dbesri |
| 819 | -end interface dbesri | |
| 819 | +end interface besri | |
| 820 | 820 | |
| 821 | 821 | ! K nu + k |
| 822 | 822 | interface bsks |
fvn_fnlib/ze1.f90
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | ! |
| 9 | 9 | ! Dรฉclaration des variables en passage de paramรจtre |
| 10 | 10 | ! |
| 11 | -use kind_definition | |
| 11 | +use fvn_common | |
| 12 | 12 | implicit none |
| 13 | 13 | complex(kind=dp_kind), intent(in) :: z |
| 14 | 14 | complex(kind=dp_kind) :: ze1 |
| 15 | 15 | |
| ... | ... | @@ -16,9 +16,9 @@ |
| 16 | 16 | ! Dรฉclaration des variables locales |
| 17 | 17 | ! |
| 18 | 18 | integer(kind=ip_kind) :: k |
| 19 | -real(kind=dp_kind) :: pi,el,x,a0 | |
| 19 | +real(kind=dp_kind) :: x,a0 | |
| 20 | 20 | complex(kind=dp_kind) :: cr,ct0,ct |
| 21 | -parameter(pi=3.141592653589793D0,el=0.5772156649015328D0) | |
| 21 | + | |
| 22 | 22 | ! |
| 23 | 23 | ! traitement en fonction des diffรฉrents cas |
| 24 | 24 | ! - Z nul entraรฎne E1 infini |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | cr = -cr*k*z/(k+1.0D0)**2 |
| 39 | 39 | ze1 = ze1+cr |
| 40 | 40 | end do |
| 41 | - ze1 = -el-log(z)+z*ze1 | |
| 41 | + ze1 = -fvn_el-log(z)+z*ze1 | |
| 42 | 42 | else |
| 43 | 43 | ct0 = cmplx(0.0D0,0.0D0,dp_kind) |
| 44 | 44 | do k=120,1,-1 |
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | end do |
| 47 | 47 | ct = 1.0D0/(z+ct0) |
| 48 | 48 | ze1 = exp(-z)*ct |
| 49 | - if (x <= 0.D0 .AND. aimag(z) == 0.0d0) ze1 = ze1-pi*cmplx(0.D0,1.D0,dp_kind) | |
| 49 | + if (x <= 0.D0 .AND. aimag(z) == 0.0d0) ze1 = ze1-fvn_pi*cmplx(0.D0,1.D0,dp_kind) | |
| 50 | 50 | end if |
| 51 | 51 | ! |
| 52 | 52 | return |
fvn_interpol/fvn_interpol.f90
fvn_linear/fvn_linear.f90
fvn_sparse/fvn_sparse.f90
fvn_test/test_akima.f90
fvn_test/test_bsin.f90
fvn_test/test_bsjn.f90
fvn_test/test_bskn.f90
fvn_test/test_bsyn.f90
fvn_test/test_dbesri.f90
fvn_test/test_dbesrj.f90
fvn_test/test_det.f90
fvn_test/test_integ.f90
| 1 | 1 | program integ |
| 2 | 2 | use fvn_integ |
| 3 | -use Kind_Definition | |
| 4 | 3 | implicit none |
| 5 | 4 | real(kind=dp_kind), external :: f1,f2,g,h |
| 6 | 5 | real(kind=dp_kind) :: a,b,epsabs,epsrel,abserr,res |
| 7 | 6 | |
| 8 | 7 | |
| 9 | 8 | |
| ... | ... | @@ -19,25 +18,25 @@ |
| 19 | 18 | |
| 20 | 19 | end program |
| 21 | 20 | function f1(x) |
| 22 | -use Kind_Definition | |
| 21 | +use fvn_common | |
| 23 | 22 | implicit none |
| 24 | 23 | real(kind=dp_kind) :: x,f1 |
| 25 | 24 | f1=x*x |
| 26 | 25 | end function |
| 27 | 26 | function f2(x,y) |
| 28 | -use Kind_Definition | |
| 27 | +use fvn_common | |
| 29 | 28 | implicit none |
| 30 | 29 | real(kind=dp_kind) :: x,y,f2 |
| 31 | 30 | f2=x*y |
| 32 | 31 | end function |
| 33 | 32 | function g(x) |
| 34 | -use Kind_Definition | |
| 33 | +use fvn_common | |
| 35 | 34 | implicit none |
| 36 | 35 | real(kind=dp_kind) :: x,g |
| 37 | 36 | g=0. |
| 38 | 37 | end function |
| 39 | 38 | function h(x) |
| 40 | -use Kind_Definition | |
| 39 | +use fvn_common | |
| 41 | 40 | implicit none |
| 42 | 41 | real(kind=dp_kind) :: x,h |
| 43 | 42 | h=1. |
fvn_test/test_inter1d.f90
fvn_test/test_inter2d.f90
fvn_test/test_inter3d.f90
fvn_test/test_lsp.f90
| 1 | 1 | program lsp |
| 2 | 2 | use fvn_linear |
| 3 | -use Kind_Definition | |
| 4 | 3 | implicit none |
| 5 | 4 | integer,parameter :: npoints=13,deg=3 |
| 6 | 5 | integer :: status,i |
| ... | ... | @@ -27,7 +26,7 @@ |
| 27 | 26 | 44 FORMAT(4(1X,1PE22.14)) |
| 28 | 27 | contains |
| 29 | 28 | function poly(x,coeff) |
| 30 | -use Kind_Definition | |
| 29 | + use fvn_common | |
| 31 | 30 | implicit none |
| 32 | 31 | real(kind=dp_kind) :: x |
| 33 | 32 | real(kind=dp_kind) :: coeff(deg+1) |
fvn_test/test_matcon.f90
fvn_test/test_matev.f90
fvn_test/test_matinv.f90
fvn_test/test_muller.f90
| 1 | 1 | program muller |
| 2 | 2 | use fvn_misc |
| 3 | -use Kind_Definition | |
| 4 | 3 | implicit none |
| 5 | 4 | integer :: i,info |
| 6 | 5 | complex(kind=dp_kind),dimension(10) :: roots |
| ... | ... | @@ -17,7 +16,7 @@ |
| 17 | 16 | end program |
| 18 | 17 | |
| 19 | 18 | function f(x) |
| 20 | -use Kind_Definition | |
| 19 | +use fvn_common | |
| 21 | 20 | complex(kind=dp_kind) :: x,f |
| 22 | 21 | f=x**10-1 |
| 23 | 22 | end function |
fvn_test/test_operators.f90
fvn_test/test_sparse.f90
fvn_test/test_specfunc.f90