source: trunk/src/solsor_gx2_x_r.h~ @ 64

Last change on this file since 64 was 44, checked in by jbrlod, 13 years ago

test du solsort mblod

File size: 2.0 KB
Line 
1/***************************************************************************
2                 module classe solsor_gc1_x_r.h  -  description
3***************************************************************************/
4// Julien Brajard
5// locean-ipsl.upmc, Paris, April 25, 2011
6//===========================================================================
7//                          methode forward
8forward (YREAL x1, YREAL x2, YREAL x3, YREAL x4, YREAL x5, YREAL x6, YREAL x7, YREAL x8)
9{
10/*      1       from    gcx_dynspg_flt          1  i    j         t
11        2       from    gcb_dynspg_flt          1  i    j         t
12        3       from    solsor_gc2_x_r          1  i    j-1  k-1  t
13        4       from    solsor_gc2_x_r          1  i-1  j    k-1  t
14        5       from    solsor_gc2_x_r          1  i+1  j    k-1  t
15        6       from    solsor_gc2_x_r          1  i    j+1  k-1  t
16        7       from    solsor_gc2_x_r          1  i    j    k-1  t
17        8       from    solsor_flag             2  NX   NY   k-1  t
18}
19output 1 : gcx
20oupput 2 : gcr (pour l'arrêt des itérations
21
22*/
23 if(Yt==TU)
24   {
25     YS1=0;
26     YS2=0;
27   }
28 else {
29   int t;
30   if(Yt==TU+1 && neuler==0)
31     t=0;
32   else
33     t=1;
34   
35   if (x8==1)
36     {
37       YS1=x7;
38       YS2=0;
39     }
40   else
41     {
42       if (Yk==0) {
43         if ( ( (Yi==0) | (Yj==0) ) | ( (Yi==NX-1) | (Yj==NY-1) ) {
44             YS1=0;
45             YS2=0;
46           }
47           else {
48             YS1=x1;
49             YS2=0;
50           }
51           } //Yk=0;
52         else {
53           YREAL gcx,gcr,ztmp,zres;
54           int ishift=Yj%2;
55           if ((Yi+1)%2==ishift) { //! Guess black update
56             ztmp = x2
57               - gcp(ji,jj,0,t) * x3   
58               - gcp(ji,jj,1,t) * x4   
59               - gcp(ji,jj,2,t) * x5   
60               - gcp(ji,jj,3,t) * x6;
61             //     ! Estimate of the residual
62             zres = ztmp - x7;
63             YS2 = zres * gcdmat(ji,jj,t) * zres;
64             //               ! Guess update
65             YS1 = sor * ztmp + (1.-sor) * x7;
66           }
67           else
68             {
69               YS2=0;
70               YS1=x7;
71             }
72           
73         }
74         
75         
76       } // Yk>0
77     } //if x8==0
78 } //Yt>TU
79}
80
81//===========================================================================
82//                          methode backward
83
84backward () {
85}
Note: See TracBrowser for help on using the repository browser.