SPEED
PHI.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
28
29
30 real*8 function phi(ng,csii, csij)
31
32 implicit real*8(a-h,o-z)
33 integer*4 :: ng
34
35 call get_legendre_value_2der(p2der2,p2,p2der,p1,p1der,ng,csii)
36 call get_legendre_value_2der(q2der2,q2,q2der,q1,q1der,ng,csij)
37
38 if(abs(csii - csij).le. 1.e-8) then
39 phi = 1.d0
40 else
41 phi = (1.d0-csij**2.d0)*q2der /(ng*(ng+1.d0)*p2*(csii-csij))
42 if(abs(phi) .lt. 1.e-10) then
43 phi = 0.d0
44 endif
45 endif
46
47 return
48 end function phi
subroutine get_legendre_value_2der(p2der2, p2, p2der, p1, p1der, n, x)
Computes Legendre polynomial and its first and second derivative on a given point x.
real *8 function phi(ng, csii, csij)
Evaluates Lengendre basis function on a specific point.
Definition PHI.f90:31