specialfunctions.f90
Go to the documentation of this file.
1!#############################################################################
2!# #
3!# fosite - 3D hydrodynamical simulation program #
4!# module: specialfunctions.f90 #
5!# #
6!# Copyright (C) 2015 #
7!# Manuel Jung <mjung@astrophysik.uni-kiel.de> #
8!# #
9!# This program is free software; you can redistribute it and/or modify #
10!# it under the terms of the GNU General Public License as published by #
11!# the Free Software Foundation; either version 2 of the License, or (at #
12!# your option) any later version. #
13!# #
14!# This program is distributed in the hope that it will be useful, but #
15!# WITHOUT ANY WARRANTY; without even the implied warranty of #
16!# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or #
17!# NON INFRINGEMENT. See the GNU General Public License for more #
18!# details. #
19!# #
20!# You should have received a copy of the GNU General Public License #
21!# along with this program; if not, write to the Free Software #
22!# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
23!# #
24!#############################################################################
25
26!----------------------------------------------------------------------------!
31!----------------------------------------------------------------------------!
33 USE functions
34#include "tap.h"
35 IMPLICIT NONE
36 !--------------------------------------------------------------------------!
37 REAL, PARAMETER :: eps = 1.e-4
38 REAL :: val
39 !--------------------------------------------------------------------------!
40
41 tap_plan(10)
42
43 ! scipy.special.iv(0,1.)
44 val = bessel_i0(1.)
45 tap_check_close(val,1.2660658777520084,eps,"Bessel_I0(1.)")
46
47 ! scipy.special.iv(0,10.)
48 val = bessel_i0(10.)
49 tap_check_close(val,2815.7166284662544,eps,"Bessel_I0(10.)")
50
51 ! scipy.special.iv(1,1.)
52 val = bessel_i1(1.)
53 tap_check_close(val,0.56515910399248503,eps,"Bessel_I1(1.)")
54
55 ! scipy.special.iv(1,10.)
56 val = bessel_i1(10.)
57 tap_check_close(val,2670.9883037012542,eps,"Bessel_I1(10.)")
58
59 ! scipy.special.kv(0,1.)
60 val = bessel_k0(1.)
61 tap_check_close(val,0.42102443824070834,eps,"Bessel_K0(1.)")
62
63 ! scipy.special.kv(0,10.)
64 val = bessel_k0(10.)
65 tap_check_close(val,1.778006231616765e-05,eps,"Bessel_K0(10.)")
66
67 ! scipy.special.kv(1,1.)
68 val = bessel_k1(1.)
69 tap_check_close(val,0.60190723019723458,eps,"Bessel_K1(1.)")
70
71 ! scipy.special.kv(1,10.)
72 val = bessel_k1(10.)
73 tap_check_close(val,1.8648773453825585e-05,eps,"Bessel_K1(10.)")
74
75 ! scipy.special.kve(0,1.)
76 val = bessel_k0e(1.)
77 tap_check_close(val,1.1444630798068949,eps,"Bessel_K0e(1.)")
78
79 ! scipy.special.kve(0,10.)
80 val = bessel_k0e(10.)
81 tap_check_close(val,0.39163193443659866,eps,"Bessel_K0e(10.)")
82
83 tap_done
84
85END PROGRAM specialfunctions
Mathematical functions.
Definition: functions.f90:48
elemental real function, public bessel_k0e(x)
Compute the exponential scaled modified Bessel function of the second kind e.g. K0e = EXP(x) * K0(x) ...
Definition: functions.f90:692
elemental real function, public bessel_i1(x)
Compute the modified Bessel function of the first kind as polynomial expansion, which has been propos...
Definition: functions.f90:615
elemental real function, public bessel_k1(x)
Compute the modified Bessel function of the second kind as polynomial expansion, which has been propo...
Definition: functions.f90:721
elemental real function, public bessel_k0(x)
Compute the modified Bessel function of the second kind as polynomial expansion, which has been propo...
Definition: functions.f90:657
elemental real function, public bessel_i0(x)
Compute the modified Bessel function of the first kind as polynomial expansion, which has been propos...
Definition: functions.f90:577
program specialfunctions