Changeset 48 for trunk/src


Ignore:
Timestamp:
05/10/11 16:17:50 (13 years ago)
Author:
jbrlod
Message:

forward solsor ok

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/solsor_flag.h

    r47 r48  
    1919   
    2020  //jn (current iteration) = Yk 
    21    
    22   if ( ((Yk<=nmin) | (Yt==TU)) | ((Yk-nmin)%nmod != 0)) 
     21  
     22  if ( (Yk<=nmin) | (Yt==TU)) 
    2323    { 
    2424      YS1=0; 
     
    2626    } 
    2727  else { 
    28         if (x2 == 1) { 
     28    if (x2 == 1) { 
    2929      YS1=0; //plus besoin d'avoir la valeur du max 
    3030      YS2=1; 
    3131    } 
    3232    else { 
    33        
    34       if ( (Yi==0) & (Yj==0) ) {  
    35         YS1=x1; 
     33      if ((Yk-nmin)%nmod != 0) { 
     34        YS1=0; 
     35        YS2=0; 
    3636      } 
    3737      else { 
    38         if (Yj==0) YS1= ((x3<x1) ? x1 : x3) ; //max(x1,x3) 
    39         else YS1 = ((x4<x1) ? x1 : x4) ; // max(x1,x4) 
    40         if ( ( (Yi==NX-1) & (Yj ==NY-1) ) & (YS1< resmax))  
    41           { 
    42 YS2=1; 
    43 printf("FOR=======tniter(%d)=%d\n",Yt,Yk); 
    44 } //moment de tester le maximum        
    45         else YS2=0;      
    46       } // Yi>0 || Yj>0 
    47     }  //x2==0 
    48         // printf("%d\t%d\t%d\t%e\t%e\t%e\t%e\t\n",Yk,Yj,Yi,x1,x2,x3,x4);  
    49         //      if (Yt==TU+2) printf("%d\t%d\t%d\t%e\t%d\n",Yk,Yj,Yi,YS1,(int)YS2);  
    50  
    51 } //Yk>kmin 
     38        if ( (Yi==0) & (Yj==0) ) {  
     39          YS1=x1; 
     40        } 
     41        else { 
     42          if (Yj==0) YS1= ((x3<x1) ? x1 : x3) ; //max(x1,x3) 
     43          else YS1 = ((x4<x1) ? x1 : x4) ; // max(x1,x4) 
     44          if ( ( (Yi==NX-1) & (Yj ==NY-1) ) & (YS1< resmax))  
     45            { 
     46              YS2=1; 
     47              printf("FOR=======tniter(%d)=%d\n",Yt,Yk); 
     48            } //moment de tester le maximum        
     49          else YS2=0; 
     50           
     51        } // Yi>0 || Yj>0 
     52      } //((Yk-nmin)%nmod == 0) 
     53}  //x2==0 
     54    // printf("%d\t%d\t%d\t%e\t%e\t%e\t%e\t\n",Yk,Yj,Yi,x1,x2,x3,x4);  
     55    //  if (Yt==TU+2) printf("%d\t%d\t%d\t%e\t%d\n",Yk,Yj,Yi,YS1,(int)YS2);  
     56     
     57  } //Yk>kmin 
    5258} 
    5359//=========================================================================== 
Note: See TracChangeset for help on using the changeset viewer.