Debian Codegraph @

F77/Source/Poisson2d/integrale2d.f

raw symbols SCIP
1 C
2 C Copyright (c) 1998 Eric Gourgoulhon
3 C
4 C This file is part of LORENE.
5 C
6 C LORENE is free software; you can redistribute it and/or modify
7 C it under the terms of the GNU General Public License as published by
8 C the Free Software Foundation; either version 2 of the License, or
9 C (at your option) any later version.
10 C
11 C LORENE is distributed in the hope that it will be useful,
12 C but WITHOUT ANY WARRANTY; without even the implied warranty of
13 C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 C GNU General Public License for more details.
15 C
16 C You should have received a copy of the GNU General Public License
17 C along with LORENE; if not, write to the Free Software
18 C Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 C
20 C
21 SUBROUTINE INTEGRALE2D(NDL1,NDR,NDT,NDF,ERRE,SOU,RESU)
22
23 C
24 C $Id: integrale2d.f,v 1.7 2012/03/30 12:12:43 j_novak Exp $
25 C $Log: integrale2d.f,v $
26 C Revision 1.7 2012/03/30 12:12:43 j_novak
27 C Cleaning of fortran files
28 C
29 C Revision 1.6 2010/10/11 10:23:57 j_novak
30 C Increase of array size NDZ0
31 C
32 C Revision 1.5 2007/11/06 10:09:37 j_novak
33 C Increase of the maximal number of domains.
34 C
35 C Revision 1.4 2005/03/14 10:55:04 j_novak
36 C Increase of array sizes.
37 C
38 C Revision 1.3 2003/09/11 16:04:49 j_novak
39 C Changed the maximal size in r to 134 in integral2d.f
40 C
41 C Revision 1.2 2002/03/25 09:16:58 m_bejger
42 C Increased the number of domains (NZOE) from 4 to 5
43 C
44 C Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon
45 C LORENE
46 C
47 c Revision 1.2 1998/07/20 12:44:19 eric
48 c Augmentation NDR0, NDT0
49 c
50 C Revision 1.1 1998/07/06 15:54:24 eric
51 C Initial revision
52 C
53 C
54 C $Header: /cvsroot/Lorene/F77/Source/Poisson2d/integrale2d.f,v 1.7 2012/03/30 12:12:43 j_novak Exp $
55 C
56 C
57 IMPLICIT NONE
58
59 INTEGER NDL1(*), NDR, NDT, NDF
60 REAL*8 ERRE(NDR,*), SOU(NDR,NDT,NDF,*), RESU
61
62 character*120 header
63 data header/'$Header: /cvsroot/Lorene/F77/Source/Poisson2d/integrale2d.f,v 1.7 2012/03/30 12:12:43 j_novak Exp $'/
64
65 INTEGER NDR0, NDT0, NDF0, NDZ0, N64
66 INTEGER ND64Q, ND2Z
67 PARAMETER (NDR0=270, NDT0=210, NDF0=4, NDZ0=17, N64=20)
68 C## PARAMETER (ND2Z=MAX(NDZ0,NDF0,8), NDEQ=NDZ0+8)
69 PARAMETER (ND2Z=MAX(NDZ0,NDF0,8))
70 PARAMETER (ND64Q=(NDR0+2)*(NDT0+2)*NDF0)
71 REAL*8 CC(ND64Q), CS(ND64Q), C64(ND64Q)
72
73 REAL*8 TRA0(NDR0,NDT0),TRA1(NDR0,NDT0)
74 REAL*8 DEN1(NDR0,NDT0,ND2Z), DEN2(NDR0,NDT0,ND2Z)
75 REAL*8 ERRE0(NDR0,ND2Z)
76
77 INTEGER IND, LZON, NR1, LR, NZOE, NY1, NF, LZ, LT
78
79 C******************************************************************************
80
81 C
82 C... Test de dimension
83 C
84 IF (NDR.GT.NDR0) THEN
85 WRITE(*,*) 'INTEGRALE2D: NDR trop grand !'
86 WRITE(*,*) ' NDR, NDR0 : ', NDR, NDR0
87 STOP
88 ENDIF
89
90 IF (NDT.GT.NDT0) THEN
91 WRITE(*,*) 'INTEGRALE2D: NDT trop grand !'
92 WRITE(*,*) ' NDT, NDT0 : ', NDT, NDT0
93 STOP
94 ENDIF
95
96 IF (NDF.GT.NDF0) THEN
97 WRITE(*,*) 'INTEGRALE2D: NDF trop grand !'
98 WRITE(*,*) ' NDF, NDF0 : ', NDF, NDF0
99 STOP
100 ENDIF
101
102 C
103 C... Recuperation information nombre de points
104 C
105 NZOE = NDL1(1)
106 IF (NZOE.GT.NDZ0) THEN
107 WRITE(*,*) 'INTEGRALE2D: NZOE trop grand !'
108 WRITE(*,*) ' NZOE, NDZ0 : ', NZOE, NDZ0
109 STOP
110 ENDIF
111
112 NY1 = NDL1(NZOE+2)
113 NF = NDL1(NZOE+3)
114
115 C
116 C... Tableau ERRE0 decrivant les points de collocation en r dimensionne comme
117 C (NDR0,*), contrairement a ERRE qui est dimensionne comme (NDR,*)
118 C
119 DO LZON=1,NZOE
120 NR1=NDL1(LZON+1)
121 DO LR=1,NR1
122 ERRE0(LR,LZON)=ERRE(LR,LZON)
123 ENDDO
124 ENDDO
125
126 C
127 C Mise a zero des tableaux de travail
128 C
129 DO LR = 1, ND64Q
130 CC(LR) = 0
131 CS(LR) = 0
132 C64(LR) = 0
133 ENDDO
134
135 DO LT = 1, NDT0
136 DO LR = 1, NDR0
137 TRA0(LR,LT) = 0
138 TRA1(LR,LT) = 0
139 ENDDO
140 ENDDO
141
142 DO LZ = 1, ND2Z
143 DO LT = 1, NDT0
144 DO LR = 1, NDR0
145 DEN1(LR,LT,LZ) = 0
146 DEN2(LR,LT,LZ) = 0
147 ENDDO
148 ENDDO
149 ENDDO
150
151
152 C
153 C Passage dans l'espace des coefficients en theta et en r:
154 C
155 CALL FCEZ3S(NDL1,NDR,NDT,NDF,N64,2,0,C64,CC,CS,DEN2,DEN1,SOU)
156 CALL FCEZ3S(NDL1,NDR,NDT,NDF,N64,1,0,C64,CC,CS,DEN2,DEN1,SOU)
157 C
158 C Terme "monopolaire" l=0 du developpement de SOU en cos(l*theta) ---> TRA0:
159 C
160 DO LZON=1,NZOE
161 NR1=NDL1(LZON+1)
162 DO LR=1,NR1
163 TRA0(LR,LZON)=SOU(LR,1,1,LZON)
164 ENDDO
165 ENDDO
166
167 C
168 C Calcul de int_0^{+infini} SOU(r)(l=0) r dr
169 C
170 IND=2
171 CALL GPAR2S(NDL1,NDR0,IND,C64,ERRE0,TRA0,TRA1)
172
173 RESU=TRA1(1,1)+TRA1(2,1)
174
175 WRITE (*,*) 'INTEGRALE2D: Integ(l=0): ', REAL(TRA1(1,1)),
176 1 '+',REAL(TRA1(2,1)),' = ', REAL(RESU)
177
178 RETURN
179
180 END
181