source: trunk/tools/bsf/boundperio.pro @ 68

Last change on this file since 68 was 2, checked in by post_it, 17 years ago

Initial import from ~/POST_IT/

File size: 2.3 KB
Line 
1;+
2;;
3;; Controle les conditions cycliques
4;;
5;-
6FUNCTION boundperio, z, uu = uu, vv = vv, ff1 = ff1
7@common   
8;
9   zz = z
10   type = 0
11   IF keyword_set(uu) THEN type = 1
12   IF keyword_set(vv) THEN type = 2
13   IF keyword_set(ff1) THEN type = 3
14;
15   milieu = 91                  ; indice de colonne (convention IDL) du point T, centre
16                                ; de symetrie (son indice de ligne etant jpj-2)
17                                ; Ce point T se replie sur lui meme
18   CASE (size(z))[0] OF
19      2 : BEGIN
20         zz(0, *)     = zz(jpi-2, *)
21         zz(jpi-1, *) = zz(1, *)
22         CASE type OF
23            0:BEGIN
24               zz(*, jpj-1) = shift(reverse( zz(*, jpj-3)), 1)
25               zz(milieu:jpi-1, jpj-2) = reverse( zz(1:milieu, jpj-2) )
26            END
27; Point u
28            1:BEGIN         
29               zz(*, jpj-1) = -reverse( zz(*, jpj-3))
30               zz(milieu-1:jpi-1, jpj-2) = -reverse( zz(0:milieu, jpj-2) )
31            END               
32; Point v 
33            2:BEGIN         
34               zz(*, jpj-2) = -shift(reverse( zz(*, jpj-3)), 1)
35               zz(*, jpj-1) = -shift(reverse( zz(*, jpj-4)), 1)
36            END
37; Point f
38            3:BEGIN
39               zz(*, jpj-2) = reverse( zz(*, jpj-3))
40               zz(*, jpj-1) = reverse( zz(*, jpj-4))
41            END
42         ENDCASE
43      END
44      3 : BEGIN
45         zz(0, *, *)     = zz(jpi-2, *, *)
46         zz(jpi-1, *, *) = zz(1, *, *)
47         CASE type OF
48            0:BEGIN
49               zz(*, jpj-1, *) = shift(reverse( zz(*, jpj-3, *)), 1, 0, 0)
50               zz(milieu:jpi-1, jpj-2, *) = reverse( zz(1:milieu, jpj-2, *) )
51            END
52; Point u
53            1:BEGIN         
54               zz(*, jpj-1, *) = reverse( zz(*, jpj-3, *))
55               zz(milieu-1:jpi-1, jpj-2, *) = -reverse( zz(0:milieu, jpj-2, *) )
56            END               
57; Point v 
58            2:BEGIN         
59               zz(*, jpj-2, *) = -shift(reverse( zz(*, jpj-3, *)), 1, 0, 0)
60               zz(*, jpj-1, *) = -shift(reverse( zz(*, jpj-4, *)), 1, 0, 0)
61            END
62; Point f
63            3:BEGIN
64               zz(*, jpj-2, *) = reverse( zz(*, jpj-3, *))
65               zz(*, jpj-1, *) = reverse( zz(*, jpj-4, *))
66            END
67         ENDCASE
68      END
69   ENDCASE
70   return, zz
71END
Note: See TracBrowser for help on using the repository browser.