source: trunk/src/solsor_gx2_x_r.h @ 47

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

solsor in YAO

  • Property svn:eol-style set to native
File size: 2.1 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, YREAL x9)
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_gc1_x_r          1  i    j-1  k    t
13        4       from    solsor_gc1_x_r          1  i-1  j    k    t
14        5       from    solsor_gc1_x_r          1  i+1  j    k    t
15        6       from    solsor_gc1_x_r          1  i    j+1  k    t
16        7       from    solsor_gc1_x_r          1  i    j    k    t
17        8       from    solsor_flag             2  NX   NY   k    t
18        9       from    solsor_gc1_x_r          2  i    j    k-1  t
19}
20output 1 : gcx
21oupput 2 : gcr (pour l'arrêt des itérations)
22
23*/
24 if(Yt==TU)
25   {
26     YS1=0;
27     YS2=x9;
28   }
29 else {
30   int t;
31   if(Yt==TU+1 && neuler==0)
32     t=0;
33   else
34     t=1;
35   
36   if (x8==1)
37     {
38       YS1=x7;
39       YS2=x9;
40     }
41   else
42     {
43       if (Yk==0) {
44         YS1=x7;
45         YS2=x9;
46           } //Yk=0;
47         else {
48           YREAL ztmp,zres;
49           int ishift=(Yj-1)%2;
50           if ((Yi+1)%2==ishift) { //! Guess black update
51             ztmp = x2
52               - gcp(Yi,Yj,0,t) * x3   
53               - gcp(Yi,Yj,1,t) * x4   
54               - gcp(Yi,Yj,2,t) * x5   
55               - gcp(Yi,Yj,3,t) * x6;
56             //     ! Estimate of the residual
57             zres = ztmp - x7;
58             YS2 = zres * gcdmat(Yi,Yj,t) * zres;
59             //               ! Guess update
60             YS1 = sor * ztmp + (1.-sor) * x7;
61           }
62           else
63             {
64               YS2=x9;
65               YS1=x7;
66             }
67           
68                 
69         
70       } // Yk>0
71     } //if x8==0
72if (Yt==TU+1) 
73  printf("%d\t%d\t%d\t%e\t%e (2)\n",Yk,Yj,Yi,YS1,YS2); 
74 } //Yt>TU
75}
76
77//===========================================================================
78//                          methode backward
79
80backward (YREAL x1, YREAL x2, YREAL x3, YREAL x4, YREAL x5, YREAL x6, YREAL x7, YREAL x8, YREAL x9) {
81}
Note: See TracBrowser for help on using the repository browser.