Debian Codegraph @

F77/Source/Poisson2d/poisson2di.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 POISS2DI(NDL1,NDR,NDT,NDF,INDD,ERRE,SOU,POT)
22
23 C
24 C $Id: poisson2di.f,v 1.8 2013/09/04 14:12:10 j_novak Exp $
25 C $Log: poisson2di.f,v $
26 C Revision 1.8 2013/09/04 14:12:10 j_novak
27 C Removed some comments.
28 C
29 C Revision 1.7 2013/09/04 13:56:53 j_novak
30 C Dynamical memory allocation for working arrays.
31 C
32 C Revision 1.6 2012/06/08 12:08:35 j_novak
33 C Increase of NDR0
34 C
35 C Revision 1.5 2012/03/30 12:12:44 j_novak
36 C Cleaning of fortran files
37 C
38 C Revision 1.4 2010/12/20 10:05:28 m_bejger
39 C Increase of NDZ0 from 5 to 8
40 C
41 C Revision 1.3 2002/09/09 13:50:28 e_gourgoulhon
42 C
43 C Change of subroutine names:
44 C POISSON2D -> POISS2D
45 C POISSON2DI -> POISS2DI
46 C to avoid any clash with Map::poisson2d and Map::poisson2di.
47 C
48 C Revision 1.2 2002/03/25 09:16:59 m_bejger
49 C Increased the number of domains (NZOE) from 4 to 5
50 C
51 C Revision 1.1.1.1 2001/11/20 15:19:31 e_gourgoulhon
52 C LORENE
53 C
54 c Revision 1.2 1998/07/20 12:44:07 eric
55 c Augmentation NDR0, NDT0
56 c
57 C Revision 1.1 1998/07/01 13:24:24 eric
58 C Initial revision
59 C
60 C
61 C $Header: /cvsroot/Lorene/F77/Source/Poisson2d/poisson2di.f,v 1.8 2013/09/04 14:12:10 j_novak Exp $
62 C
63 C
64
65 IMPLICIT NONE
66
67 INTEGER NDL1(*), NDR, NDT, NDF, INDD(*)
68 REAL*8 ERRE(NDR,*)
69 REAL*8 SOU(NDR,NDT,NDF,*), POT(NDR,NDT,NDF,*)
70
71 character*120 header
72 data header/'$Header: /cvsroot/Lorene/F77/Source/Poisson2d/poisson2di.f,v 1.8 2013/09/04 14:12:10 j_novak Exp $'/
73
74 INTEGER N64, ND64Q, ND2Z, NDEQ
75
76 REAL*8,allocatable:: TRA0(:,:),TRA1(:,:),TRA2(:,:),TRA3(:,:)
77 REAL*8,allocatable:: TRAB0(:,:,:), TRAB1(:,:,:)
78 REAL*8,allocatable:: DEN1(:,:,:), DEN2(:,:,:)
79 REAL*8,allocatable:: BB(:,:), ERRE0(:,:), SOLHH(:,:,:,:)
80 REAL*8,allocatable:: CC(:), CS(:), C64(:)
81
82 INTEGER,ALLOCATABLE:: NDL(:)
83
84 INTEGER LZON, NR1, LR, LY, NZOE, NZON, NY1, NF, LZ, LT, LF
85
86 C******************************************************************************
87
88 C
89 C... Allocation memoire
90 C
91 ND64Q = (NDR+2)*(NDT+2)*NDF
92 NZOE = NDL1(1)
93 ND2Z = MAX(NZOE, NDF, 8)
94 NDEQ = NZOE + 8
95 allocate(CC(ND64Q), CS(ND64Q), C64(ND64Q) )
96 allocate(TRA0(NDR,NDT))
97 allocate(TRA1(NDR,NDT))
98 allocate(TRA2(NDR,NDT))
99 allocate(TRA3(NDR,NDT))
100 allocate(TRAB0(NDR,NDT,ND2Z),TRAB1(NDR,NDT,ND2Z))
101 allocate(DEN1(NDR,NDT,ND2Z), DEN2(NDR,NDT,ND2Z) )
102 allocate(BB(NDR,12), ERRE0(NDR, ND2Z) )
103 allocate(SOLHH(NDR, NDT, 8, NZOE) )
104 N64 = 20
105 ALLOCATE(NDL(NDEQ))
106
107 NZON = NZOE - 1
108 NY1 = NDL1(NZOE+2)
109 NF = NDL1(NZOE+3)
110
111 C
112 C... Tableau NDL decrivant les zones non compactifies:
113 C
114 NDL(1) = NZON
115 DO LZON = 1, NZON
116 NDL(1+LZON) = NDL1(1+LZON)
117 ENDDO
118 NDL(NZON+2)=NY1
119 NDL(NZON+3)=NF
120 NDL(NZON+4)=NDL1(NZOE+4)
121
122 C
123 C... Tableau ERRE0 decrivant les points de collocation en r dimensionne comme
124 C (NDR0,*), contrairement a ERRE qui est dimensionne comme (NDR,*)
125 C
126 DO LZON=1,NZOE
127 NR1=NDL1(LZON+1)
128 DO LR=1,NR1
129 ERRE0(LR,LZON)=ERRE(LR,LZON)
130 ENDDO
131 ENDDO
132
133 C
134 C Mise a zero des tableaux de travail
135 C
136 DO LR = 1, ND64Q
137 CC(LR) = 0
138 CS(LR) = 0
139 C64(LR) = 0
140 ENDDO
141
142 DO LT = 1, NDT
143 DO LR = 1, NDR
144 TRA0(LR,LT) = 0
145 TRA1(LR,LT) = 0
146 TRA2(LR,LT) = 0
147 TRA3(LR,LT) = 0
148 ENDDO
149 ENDDO
150
151 DO LZ = 1, ND2Z
152 DO LT = 1, NDT
153 DO LR = 1, NDR
154 TRAB0(LR,LT,LZ) = 0
155 TRAB1(LR,LT,LZ) = 0
156 DEN1(LR,LT,LZ) = 0
157 DEN2(LR,LT,LZ) = 0
158 ENDDO
159 ENDDO
160 ENDDO
161
162 DO LZ = 1, 12
163 DO LR = 1, NDR
164 BB(LR,LZ) = 0
165 ENDDO
166 ENDDO
167
168 DO LZ = 1, NZOE
169 DO LF = 1, 8
170 DO LT = 1, NDT
171 DO LR = 1, NDR
172 SOLHH(LR,LT,LF,LZ) = 0
173 ENDDO
174 ENDDO
175 ENDDO
176 ENDDO
177
178
179 C
180 C Calcul des coefficients de la source :
181 C
182 C
183 CALL FCEZ3S(NDL,NDR,NDT,NDF,N64,2,1,C64,CC,CS,DEN2,DEN1,SOU)
184 CALL FCEZ3S(NDL,NDR,NDT,NDF,N64,1,0,C64,CC,CS,DEN2,DEN1,SOU)
185
186
187 C
188 C Preparation de la source pour GR2P3S
189 C
190 DO LZON=1,NZOE
191 NR1=NDL1(LZON+1)
192 DO LY=1,NY1
193 DO LR=1,NR1
194 POT(LR,LY,1,LZON) = SOU(LR,LY,1,LZON)
195 ENDDO
196 ENDDO
197 ENDDO
198 C
199 C Appel GR2P3S
200 C
201 CALL GR2P3S(NDL1,NDR,NDT,NDF,INDD,0,CC,C64,BB,DEN1,
202 1 DEN2,TRAB0,TRAB1,ERRE,SOLHH,POT)
203
204 C
205 C Retour dans l'espace des configurations
206 C
207 CALL FCIQ3S(NDL1,NDR,NDT,NDF,INDD,1,0,0,2,C64,CC,CS,DEN1,
208 1 DEN2,ERRE,POT)
209 CALL FCIQ3S(NDL1,NDR,NDT,NDF,INDD,2,1,0,2,C64,CC,CS,DEN1,
210 1 DEN2,ERRE,POT)
211
212 deallocate(TRA0, TRA1, TRA2, TRA3)
213 DEALLOCATE(TRAB0, TRAB1, DEN1, DEN2)
214 DEALLOCATE(BB, ERRE0, SOLHH)
215 DEALLOCATE(CC, CS, C64)
216 DEALLOCATE(NDL)
217
218 RETURN
219
220 END
221