-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGauss.f90
executable file
·85 lines (79 loc) · 3.18 KB
/
Gauss.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
MODULE Gauss
USE PrecTypes
IMPLICIT NONE
! -------------------------------------------------------------------------
! Name: Gauss
! Parent: General
! Status: Current
! Owner: Toshiro Matsumoto
! Text: Coordinates and weights of Gaussian quadrature formula.
! Revision Date: 16-Jul-2009
! -------------------------------------------------------------------------
! Offset numbers used in the arrays zt() and wt()
INTEGER(I4B) :: ngs(6) =(/ 0, 0, 2, 5, 9, 14 /)
! Coordinates of the integration points
REAL(DP) :: zt(20) = (/ &
!
! 2-point formula
-0.577350269189626E0_DP, & ! = zt( 1 + ngs(2) )
0.577350269189626E0_DP, & ! = zt( 2 + ngs(2) )
!
! 3-point formula
-0.774596669241483E0_DP, & ! = zt( 1 + ngs(3) )
0.000000000000000E0_DP, & ! = zt( 2 + ngs(3) )
0.774596669241483E0_DP, & ! = zt( 3 + ngs(3) )
!
! 4-point formula
-0.861136311594053E0_DP, & ! = zt( 1 + ngs(4) )
-0.339981043584856E0_DP, & ! = zt( 2 + ngs(4) )
0.339981043584856E0_DP, & ! = zt( 3 + ngs(4) )
0.861136311594053E0_DP, & ! = zt( 4 + ngs(4) )
!
! 5-point formula
-0.906179845938664E0_DP, & ! = zt( 1 + ngs(5) )
-0.538469310105683E0_DP, & ! = zt( 2 + ngs(5) )
0.000000000000000E0_DP, & ! = zt( 3 + ngs(5) )
0.538469310105683E0_DP, & ! = zt( 4 + ngs(5) )
0.906179845938664E0_DP, & ! = zt( 5 + ngs(5) )
!
! 6-point formula
-0.932469514203152E0_DP, & ! = zt( 1 + ngs(6) )
-0.661209386466265E0_DP, & ! = zt( 2 + ngs(6) )
-0.238619186083197E0_DP, & ! = zt( 3 + ngs(6) )
0.238619186083197E0_DP, & ! = zt( 4 + ngs(6) )
0.661209386466265E0_DP, & ! = zt( 5 + ngs(6) )
0.932469514203152E0_DP & ! = zt( 6 + ngs(6) )
/)
! Weights to multiply to the function values at the integration points
REAL(DP) :: wt(20) =(/ &
! 2-point formula
0.100000000000000E1_DP, & ! = wt( 1 + ngs(2) )
0.100000000000000E1_DP, & ! = wt( 2 + ngs(2) )
!
! 3-point formula
0.555555555555556E0_DP, & ! = wt( 1 + ngs(3) )
0.888888888888889E0_DP, & ! = wt( 2 + ngs(3) )
0.555555555555556E0_DP, & ! = wt( 3 + ngs(3) )
!
! 4-point formula
0.347854845137454E0_DP, & ! = wt( 1 + ngs(4) )
0.652145154862546E0_DP, & ! = wt( 2 + ngs(4) )
0.652145154862546E0_DP, & ! = wt( 3 + ngs(4) )
0.347854845137454E0_DP, & ! = wt( 4 + ngs(4) )
!
! 5-point formula
0.236926885056189E0_DP, & ! = wt( 1 + ngs(5) )
0.478628670499366E0_DP, & ! = wt( 2 + ngs(5) )
0.568888888888889E0_DP, & ! = wt( 3 + ngs(5) )
0.478628670499366E0_DP, & ! = wt( 4 + ngs(5) )
0.236926885056189E0_DP, & ! = wt( 5 + ngs(5) )
!
! 6-point formula
0.171324492379170E0_DP, & ! = wt( 1 + ngs(6) )
0.360761573048139E0_DP, & ! = wt( 2 + ngs(6) )
0.467913934572691E0_DP, & ! = wt( 3 + ngs(6) )
0.467913934572691E0_DP, & ! = wt( 4 + ngs(6) )
0.360761573048139E0_DP, & ! = wt( 5 + ngs(6) )
0.171324492379170E0_DP & ! = wt( 6 + ngs(6) )
/)
END MODULE Gauss