Index: trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/2mflbc_rd.h
===================================================================
--- trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/2mflbc_rd.h	(revision 403)
+++ trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/2mflbc_rd.h	(revision 403)
@@ -0,0 +1,1171 @@
+
+//----------------------------------------------------
+// project: mflbc_rd     header generated by YAO version v.9
+//----------------------------------------------------
+
+// € € € € € € € € LES FONCTIONS PREDEFINIES
+/*M2_TBTOG   */ 
+void YtabTOgrad_ssd(YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
+			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
+				 YG_ssd(Yws, Yw1, Yw2) = tab[Y3windice]; ++Y3windice;}}}
+}/*M2_RGRAD*/ 
+void Yrazgrad_ssd()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
+				 Yssd(Yw1, Yw2)->Ygrad[Yws] = 0.0;}}}
+}/*M2_SETA*/ 
+void Ysetstate_ssd(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
+			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
+				 Yssd(Yw1, Yw2)->Ystate[Yws] = val;}}}
+}/*M2_YIOTU*/ 
+void Yio_ssd(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("ssd", Yws, Yw1, Yw2, Yw3, Ywt, &YS_ssd(Yws, Yw1, Yw2), val);
+}/*M2_CREY*/ 
+void Ycreate_ssd()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Yssd(Yw1, Yw2)= new Yaossd ())==NULL) Ycreate_errnew();}}
+}/*M1_ADJUS*/ 
+void Yadjust_gama()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1) 
+	 for (int Yws=0;Yws<YNBS_gama; ++Yws) 
+	 { Ystate_gama(Yws, Yw1) -= Yepsi_gama(Yws, Yw1) * Ygrad_gama(Yws, Yw1); 
+	}
+}/*M1_GCTOTB  */ 
+void YgradCTOtab_gama(YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 tab[Y3windice] += YG_gama(Yws, Yw1); ++Y3windice;}}
+}/*M1_VSTA*/ 
+void Y3valstate_gama()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Y3x[Y3windice] = Ygama(Yw1)->Ystate[Yws]; ++Y3windice;}}
+}/*M1_GSTA*/ 
+void Y3getstate_gama(float x[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Ygama(Yw1)->Ystate[Yws] = x[Y3windice]; ++Y3windice;}}
+}/*M1_VGRAD*/ 
+void Y3valgrad_gama(float g[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 g[Y3windice] = Ygama(Yw1)->Ygrad[Yws]; ++Y3windice;}}
+}/*M1_TBTOG   */ 
+void YtabTOgrad_gama(YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 YG_gama(Yws, Yw1) = tab[Y3windice]; ++Y3windice;}}
+}/*M1_RGRAD*/ 
+void Yrazgrad_gama()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Ygama(Yw1)->Ygrad[Yws] = 0.0;}}
+}/*M1_SETA*/ 
+void Ysetstate_gama(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Ygama(Yw1)->Ystate[Yws] = val;}}
+}/*M1_YIOTU*/ 
+void Yio_gama(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("gama", Yws, Yw1, Yw2, Yw3, Ywt, &YS_gama(Yws, Yw1), val);
+}/*M0_OUTOB*/ 
+int Youtoobs_gama(YioKind yiokind, int Yws, int Ywt, int arbpdt)
+{
+	 Yaobs.time = arbpdt;
+	 Yaobs.imod = Yimod("gama");
+	 Yaobs.smod = Yws;/*M1_OUTOB*/ 
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
+	 {	if(select_io(yiokind, "gama", Yws, Yw1, -1, -1, Ywt, &Ystate_gama(Yws, Yw1)))
+			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = -1; Yaobs.kaxe = -1;
+				Yaobs.vobs = Ystate_gama(Yws, Yw1);
+				if(!Yobs_insert (&Yaobs)) return(0);
+			}
+	 }/*M9_OUTOB*/  
+	 return(1);
+}/*M1_SEPS*/ 
+void Ysetepsi_gama(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Ygama(Yw1)->Yepsi[Yws] = val;}}
+}/*M1_CREY*/ 
+void Ycreate_gama() 	
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 if ((Ygama(Yw1) = new Yaogama ())==NULL) Ycreate_errnew();}
+}/*M1_SWISH*/ 
+void Ysetwish_gama(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
+			 Ywish_gama(Yws, Yw1) = val;}}
+}/*M2_TBTOG   */ 
+void YtabTOgrad_nj(YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
+			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
+				 YG_nj(Yws, Yw1, Yw2) = tab[Y3windice]; ++Y3windice;}}}
+}/*M2_RGRAD*/ 
+void Yrazgrad_nj()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
+				 Ynj(Yw1, Yw2)->Ygrad[Yws] = 0.0;}}}
+}/*M2_SETA*/ 
+void Ysetstate_nj(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
+			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
+				 Ynj(Yw1, Yw2)->Ystate[Yws] = val;}}}
+}/*M2_YIOTU*/ 
+void Yio_nj(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("nj", Yws, Yw1, Yw2, Yw3, Ywt, &YS_nj(Yws, Yw1, Yw2), val);
+}/*M2_CREU*/ 
+void Ycreate_nj()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ynj(Yw1, Yw2)= new nj ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_diac(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
+					 YG_diac(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_diac()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
+					 Ydiac(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_diac(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
+					 Ydiac(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_diac(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("diac", Yws, Yw1, Yw2, Yw3, Ywt, &YS_diac(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_diac()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ydiac(Yw1, Yw2)= new diac ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_diab(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
+					 YG_diab(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_diab()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
+					 Ydiab(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_diab(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
+					 Ydiab(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_diab(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("diab", Yws, Yw1, Yw2, Yw3, Ywt, &YS_diab(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_diab()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ydiab(Yw1, Yw2)= new diab ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_bet(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
+					 YG_bet(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_bet()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
+					 Ybet(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_bet(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
+					 Ybet(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_bet(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("bet", Yws, Yw1, Yw2, Yw3, Ywt, &YS_bet(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_bet()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ybet(Yw1, Yw2)= new bet ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_gag(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
+					 YG_gag(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_gag()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
+					 Ygag(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_gag(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
+					 Ygag(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_gag(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("gag", Yws, Yw1, Yw2, Yw3, Ywt, &YS_gag(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_gag()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ygag(Yw1, Yw2)= new gag ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_res(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_res; ++Yws){
+					 YG_res(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_res()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_res; ++Yws){
+					 Yres(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_res(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_res; ++Yws){
+					 Yres(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_res(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("res", Yws, Yw1, Yw2, Yw3, Ywt, &YS_res(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_res()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Yres(Yw1, Yw2)= new res ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_ixu(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
+					 YG_ixu(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_ixu()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
+					 Yixu(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_ixu(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
+					 Yixu(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_ixu(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("ixu", Yws, Yw1, Yw2, Yw3, Ywt, &YS_ixu(Yws, Yw1, Yw2, Ywt), val);
+}/*M2_CREU*/ 
+void Ycreate_ixu()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Yixu(Yw1, Yw2)= new ixu ())==NULL) Ycreate_errnew();}}
+}/*M2_TBTOGT  */ 
+void YtabTOgrad_psi(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
+					 YG_psi(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
+}/*M2_RGRADT*/ 
+void Yrazgrad_psi()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
+					 Ypsi(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
+}/*M2_SETAT*/ 
+void Ysetstate_psi(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
+				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
+					 Ypsi(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
+}/*M2_YIOUT*/ 
+void Yio_psi(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("psi", Yws, Yw1, Yw2, Yw3, Ywt, &YS_psi(Yws, Yw1, Yw2, Ywt), val);
+}/*M0_OUTOB*/ 
+int Youtoobs_psi(YioKind yiokind, int Yws, int Ywt, int arbpdt)
+{
+	 Yaobs.time = arbpdt;
+	 Yaobs.imod = Yimod("psi");
+	 Yaobs.smod = Yws;/*M2_OUTOBT*/
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
+	 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2)
+	 {	if(select_io(yiokind, "psi", Yws, Yw1, Yw2, -1, Ywt, &Ystate_psi(Yws, Yw1, Yw2, Ywt)))
+			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = Yw2; Yaobs.kaxe = -1;
+				Yaobs.vobs = Ystate_psi(Yws, Yw1, Yw2, Ywt);
+				if(!Yobs_insert (&Yaobs)) return(0);
+			}
+	 }/*M9_OUTOB*/  
+	 return(1);
+}/*M2_CREU*/ 
+void Ycreate_psi()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
+			 if ((Ypsi(Yw1, Yw2)= new psi ())==NULL) Ycreate_errnew();}}
+}/*M2_SWISH*/ 
+void Ysetwish_psi(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
+			 for (int Yws=0; Yws<YNBS_psi; ++Yws){
+				 Ywish_psi(Yws, Yw1, Yw2) = val;}}}
+}/*M1_TBTOGT  */ 
+void YtabTOgrad_psifd(int frompdt, int topdt, YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Ywt=frompdt; Ywt<topdt;  ++Ywt){
+			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
+				 YG_psifd(Yws, Yw1, Ywt) = tab[Y3windice]; ++Y3windice;}}}
+}/*M1_RGRADT*/ 
+void Yrazgrad_psifd()
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
+			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
+				 Ypsifd(Yw1)->Ygrad[Ywt][Yws] = 0.0;}}}
+}/*M1_SETAT*/ 
+void Ysetstate_psifd(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;  ++Ywt){
+			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
+				 Ypsifd(Yw1)->Ystate[Ywt][Yws] = val;}}}
+}/*M1_YIOUT*/ 
+void Yio_psifd(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("psifd", Yws, Yw1, Yw2, Yw3, Ywt, &YS_psifd(Yws, Yw1, Ywt), val);
+}/*M0_OUTOB*/ 
+int Youtoobs_psifd(YioKind yiokind, int Yws, int Ywt, int arbpdt)
+{
+	 Yaobs.time = arbpdt;
+	 Yaobs.imod = Yimod("psifd");
+	 Yaobs.smod = Yws;/*M1_OUTOBT*/
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
+	 {	if(select_io(yiokind, "psifd", Yws, Yw1, -1, -1, Ywt, &Ystate_psifd(Yws, Yw1, Ywt)))
+			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = -1; Yaobs.kaxe = -1;
+				Yaobs.vobs = Ystate_psifd(Yws, Yw1, Ywt);
+				if(!Yobs_insert (&Yaobs)) return(0);
+			}
+	 }/*M9_OUTOB*/  
+	 return(1);
+}/*M1_CREU*/ 
+void Ycreate_psifd()  
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 if ((Ypsifd(Yw1) = new psifd ())==NULL) Ycreate_errnew();}
+}/*M1_SWISH*/ 
+void Ysetwish_psifd(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
+			 Ywish_psifd(Yws, Yw1) = val;}}
+}/*M1_TBTOG   */ 
+void YtabTOgrad_lap(YREAL tab[])
+{
+	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
+			 YG_lap(Yws, Yw1) = tab[Y3windice]; ++Y3windice;}}
+}/*M1_RGRAD*/ 
+void Yrazgrad_lap()
+{
+	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
+			 Ylap(Yw1)->Ygrad[Yws] = 0.0;}}
+}/*M1_SETA*/ 
+void Ysetstate_lap(double val)
+{
+	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
+		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
+			 Ylap(Yw1)->Ystate[Yws] = val;}}
+}/*M1_YIOTU*/ 
+void Yio_lap(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
+{  Yiorwf ("lap", Yws, Yw1, Yw2, Yw3, Ywt, &YS_lap(Yws, Yw1), val);
+}/*M1_CREU*/ 
+void Ycreate_lap()  
+{
+	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
+		 if ((Ylap(Yw1) = new lap ())==NULL) Ycreate_errnew();}
+}
+void Ycreate_all () 
+{
+	 Ycreate_ssd ();
+	 Ycreate_gama ();
+	 Ycreate_nj ();
+	 Ycreate_diac ();
+	 Ycreate_diab ();
+	 Ycreate_bet ();
+	 Ycreate_gag ();
+	 Ycreate_res ();
+	 Ycreate_ixu ();
+	 Ycreate_psi ();
+	 Ycreate_psifd ();
+	 Ycreate_lap ();
+}
+void Ywishdiff_all (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt, YREAL vobs) 
+{	
+	 if(1==0);
+	 else if (strcmp(nmmod, "gama") == 0)
+				 YW_gama(Yws, Yw1) = YS_gama(Yws, Yw1) - vobs;
+	 else if (strcmp(nmmod, "psi") == 0)
+				 YW_psi(Yws, Yw1, Yw2) = YS_psi(Yws, Yw1, Yw2, Ywt) - vobs;
+	 else if (strcmp(nmmod, "psifd") == 0)
+				 YW_psifd(Yws, Yw1) = YS_psifd(Yws, Yw1, Ywt) - vobs;
+}
+void Ycostwishdiff_all (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt) 
+{	
+	 if(1==0);
+	 else if (strcmp(nmmod, "gama") == 0)
+				 YG_gama(Yws, Yw1) += Ycostdiff(YW_gama(Yws, Yw1), YS_lap(Yws, Yw1));
+	 else if (strcmp(nmmod, "psi") == 0)
+				      YG_psi(Yws, Yw1, Yw2, Ywt) += Ycostdiff(YW_psi(Yws, Yw1, Yw2), YW_psi(Yws, Yw1, Yw2));
+	 else if (strcmp(nmmod, "psifd") == 0)
+				 YG_psifd(Yws, Yw1, Ywt) += Ycostdiff(YW_psifd(Yws, Yw1), YW_psifd(Yws, Yw1));
+}
+void Youtoobs_mod(YioKind yiokind, char *nmmod, int numout, int pdt, int arbpdt)
+{
+ 	 if(1==0);
+ 	 else if (strcmp(nmmod, "gama") == 0) Youtoobs_gama(yiokind, numout, pdt, arbpdt);
+ 	 else if (strcmp(nmmod, "psi") == 0) Youtoobs_psi(yiokind, numout, pdt, arbpdt);
+ 	 else if (strcmp(nmmod, "psifd") == 0) Youtoobs_psifd(yiokind, numout, pdt, arbpdt);
+}
+void Yadjust_all () 
+{
+	 Yadjust_gama ();
+}
+void Yrazgrad_all () 
+{
+	 Yrazgrad_ssd ();
+	 Yrazgrad_gama ();
+	 Yrazgrad_nj ();
+	 Yrazgrad_diac ();
+	 Yrazgrad_diab ();
+	 Yrazgrad_bet ();
+	 Yrazgrad_gag ();
+	 Yrazgrad_res ();
+	 Yrazgrad_ixu ();
+	 Yrazgrad_psi ();
+	 Yrazgrad_psifd ();
+	 Yrazgrad_lap ();
+}
+void Yrazgrad_only (int itraj) 
+{
+	if (itraj==Yid_Tlu)
+	{  Yrazgrad_nj ();
+	   Yrazgrad_lap ();
+	 }
+}
+int Ysetstate_mod (char *nmmod, YREAL val) 
+{	int codret=0; int all=0;
+	if (!strcmp(nmmod, "Y#A")) all=1;
+	if (!strcmp(nmmod, "ssd") || all)
+	{  Ysetstate_ssd(val);codret=1;}
+	if (!strcmp(nmmod, "gama") || all)
+	{  Ysetstate_gama(val);codret=1;}
+	if (!strcmp(nmmod, "nj") || all)
+	{  Ysetstate_nj(val);codret=1;}
+	if (!strcmp(nmmod, "diac") || all)
+	{  Ysetstate_diac(val);codret=1;}
+	if (!strcmp(nmmod, "diab") || all)
+	{  Ysetstate_diab(val);codret=1;}
+	if (!strcmp(nmmod, "bet") || all)
+	{  Ysetstate_bet(val);codret=1;}
+	if (!strcmp(nmmod, "gag") || all)
+	{  Ysetstate_gag(val);codret=1;}
+	if (!strcmp(nmmod, "res") || all)
+	{  Ysetstate_res(val);codret=1;}
+	if (!strcmp(nmmod, "ixu") || all)
+	{  Ysetstate_ixu(val);codret=1;}
+	if (!strcmp(nmmod, "psi") || all)
+	{  Ysetstate_psi(val);codret=1;}
+	if (!strcmp(nmmod, "psifd") || all)
+	{  Ysetstate_psifd(val);codret=1;}
+	if (!strcmp(nmmod, "lap") || all)
+	{  Ysetstate_lap(val);codret=1;}
+	return(codret);
+}
+void Ysetwish_mod (int imod, YREAL val) 
+{	if(1==0);
+	else if (imod==1) Ysetwish_gama(val);
+	else if (imod==9) Ysetwish_psi(val);
+	else if (imod==10) Ysetwish_psifd(val);
+}
+void  Yio_mod (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)
+{
+	 if(1==0);
+	 else if (strcmp(nmmod, "ssd") == 0) Yio_ssd(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "gama") == 0) Yio_gama(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "nj") == 0) Yio_nj(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "diac") == 0) Yio_diac(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "diab") == 0) Yio_diab(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "bet") == 0) Yio_bet(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "gag") == 0) Yio_gag(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "res") == 0) Yio_res(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "ixu") == 0) Yio_ixu(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "psi") == 0) Yio_psi(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "psifd") == 0) Yio_psifd(Yws, Yw1, Yw2, Yw3, Ywt, val);
+	 else if (strcmp(nmmod, "lap") == 0) Yio_lap(Yws, Yw1, Yw2, Yw3, Ywt, val);
+}
+void YgradCTOtab_target (YREAL tab[]) 
+{	//Y3windice = 0;
+	 YgradCTOtab_gama (tab);
+}
+void YtabTOgrad_target (YREAL tab[]) 
+{	//Y3windice = 0;
+	 YtabTOgrad_gama (tab);
+}
+void Y3getstate_all (float x[]) 
+{	 Y3windice = 0;
+	 Y3getstate_gama (x);
+}
+void Y3valstate_all () 
+{	 Y3windice = 0;
+	 Y3valstate_gama ();
+}
+void Y3valgrad_all (float g[]) 
+{	 Y3windice = 0;
+	 Y3valgrad_gama (g);
+}
+int Yauto_call (int argc, char *argv[]) 
+{
+	 int codret=0; int all=0; double val;
+	 if (1==0);
+	 else if ( !strcmp(argv[0], "setepsi") || !strcmp(argv[0], "SETEPSI") 
+					 ||!strcmp(argv[0], "setepsi_all") || !strcmp(argv[0], "SETEPSI_ALL"))
+	 {
+			 if (!strcmp(argv[0], "setepsi_all") || !strcmp(argv[0], "SETEPSI_ALL")){all=1; val=atof(argv[1]);} else val=atof(argv[2]);
+			 if (!strcmp(argv[1], "gama") || all)
+					 {Ysetepsi_gama(val);codret=1;}
+	 }
+	 else codret=0;
+	 return(codret);
+}
+
+//#############################################################################################################################
+
+
+#include <sys/time.h>
+double my_gettimeofday(){
+   struct timeval tmp_time;
+    gettimeofday(&tmp_time, NULL);
+     return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
+}
+
+
+ int Yforward_space_Sac()
+{
+  double begin=0, end=0;
+	 YA1=2049; YA2=512; YA3=0;
+Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
+
+begin=my_gettimeofday();
+#pragma omp parallel for 
+for(YY=0; YY<YA1_Sac; ++YY){
+  Yi=YY;
+{
+for(Yj=0; Yj<YA2_Sac; ++Yj)
+{
+	 Yting[0]=YS1_ssd( Yi, Yj);
+	 Ynj(Yi, Yj)->forward( Yting[0] );
+	 Yting[0]=YS1_nj( Yi, Yj);
+	 Ydiab(Yi, Yj)->forward( Yting[0] );
+	 Yting[0]=YS1_nj( Yi, Yj);
+	 Ydiac(Yi, Yj)->forward( Yting[0] );
+	 if (1==0 || Yj-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YS1_bet( Yi, Yj-1, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YS2_bet( Yi, Yj-1, YTemps);
+	 Ygag(Yi, Yj)->forward( Yting[0], Yting[1] );
+	 Yting[0]=YS1_diac( Yi, Yj, YTemps);
+	 Yting[1]=YS2_diac( Yi, Yj, YTemps);
+	 Yting[2]=YS1_gag( Yi, Yj, YTemps);
+	 Yting[3]=YS2_gag( Yi, Yj, YTemps);
+	 Ybet(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3] );
+
+}
+
+}
+}
+
+for(Yi=0; Yi<YA1_Sac; ++Yi)
+{
+for(Yj=0; Yj<YA2_Sac; ++Yj)
+{
+	 if (1==0 || Yi-1<0 || Yj-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YS1_psi( Yi-1, Yj-1, YTemps);
+	 if (1==0 || Yi-1<0 || Yj-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YS2_psi( Yi-1, Yj-1, YTemps);
+	 if (1==0 || Yi-1<0)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_psi( Yi-1, Yj, YTemps);
+	 if (1==0 || Yi-1<0)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_psi( Yi-1, Yj, YTemps);
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YS1_psi( Yi-1, Yj+1, YTemps);
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YS2_psi( Yi-1, Yj+1, YTemps);
+	 Yting[6]=YS1_diab( 0, Yj, YTemps);
+	 Yting[7]=YS2_diab( 0, Yj, YTemps);
+	 Yting[8]=YS1_gama( Yi);
+	 Yting[9]=YS2_gama( Yi);
+	 Yres(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7], Yting[8], Yting[9] );
+	 Yting[0]=YS1_res( Yi, Yj, YTemps);
+	 Yting[1]=YS2_res( Yi, Yj, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_ixu( Yi, Yj-1, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_ixu( Yi, Yj-1, YTemps);
+	 Yting[4]=YS1_bet( 0, Yj, YTemps);
+	 Yting[5]=YS2_bet( 0, Yj, YTemps);
+	 if (1==0 || Yi+1>YA1_Sac-1)
+	 Yting[6]=0; 
+	 else 
+	 Yting[6]=YS1_gama( Yi+1);
+	 if (1==0 || Yi+1>YA1_Sac-1)
+	 Yting[7]=0; 
+	 else 
+	 Yting[7]=YS2_gama( Yi+1);
+	 Yixu(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7] );
+
+}
+for(Yj=YA2_Sac-1; Yj>=0; --Yj)
+{
+	 Yting[0]=YS1_ixu( Yi, Yj, YTemps);
+	 Yting[1]=YS2_ixu( Yi, Yj, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_psi( Yi, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_psi( Yi, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YS1_gag( 0, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YS2_gag( 0, Yj+1, YTemps);
+	 Ypsi(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
+
+}
+
+}
+#pragma omp parallel for 
+for(YY=0; YY<YA1_Sac; ++YY){
+  Yi=YY;
+{
+	 Yting[0]=YS1_psi( Yi, 511, YTemps);
+	 Yting[1]=YS2_psi( Yi, 511, YTemps);
+	 Yting[2]=YS1_gama( Yi);
+	 Yting[3]=YS2_gama( Yi);
+	 Ypsifd(Yi)->forward( Yting[0], Yting[1], Yting[2], Yting[3] );
+
+}
+}
+  end=my_gettimeofday();
+
+  printf("\n\n################ FORWARD_SPACE_SAC #########################################");
+//  printf("\nTime begin: %f", begin);
+//  printf("\nTime end: %f", end);
+  printf("\nTimeForwardDifference %f", (end - begin));
+  printf("\n###############################################################################\n\n");
+
+	 return(0);
+}
+//#############################################################################################################################
+
+ int Ybackward_space_Sac()
+{
+  double begin=0, end=0;
+	 YA1=2049; YA2=512; YA3=0;
+Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
+  begin=my_gettimeofday();
+#pragma omp parallel for 
+for(YY=YA1_Sac-1; YY>=0; --YY){
+  Yi=YY;
+{
+	 Yting[0]=YS1_psi( Yi, 511, YTemps);
+	 Yting[1]=YS2_psi( Yi, 511, YTemps);
+	 Yting[2]=YS1_gama( Yi);
+	 Yting[3]=YS2_gama( Yi);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ypsifd(Yi)->backward( Yting[0], Yting[1], Yting[2], Yting[3] );
+	 Yvsmatt (YNBS_psifd, YNBI_psifd, YMAX_JAC_NBI, &YG1Y_psifd, Yjac[0], Ytbeta);
+	 YG1_psi( Yi, 511, YTemps) += Ytbeta[0];
+	 YG2_psi( Yi, 511, YTemps) += Ytbeta[1];
+	 YG1_gama( Yi) += Ytbeta[2];
+	 YG2_gama( Yi) += Ytbeta[3];
+
+}
+}
+for(Yi=YA1_Sac-1; Yi>=0; --Yi)
+{
+for(Yj=0; Yj<YA2_Sac; ++Yj)
+{
+	 Yting[0]=YS1_ixu( Yi, Yj, YTemps);
+	 Yting[1]=YS2_ixu( Yi, Yj, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_psi( Yi, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_psi( Yi, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YS1_gag( 0, Yj+1, YTemps);
+	 if (1==0 || Yj+1>YA2_Sac-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YS2_gag( 0, Yj+1, YTemps);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ypsi(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
+	 Yvsmatt (YNBS_psi, YNBI_psi, YMAX_JAC_NBI, &YG1Y_psi, Yjac[0], Ytbeta);
+	 YG1_ixu( Yi, Yj, YTemps) += Ytbeta[0];
+	 YG2_ixu( Yi, Yj, YTemps) += Ytbeta[1];
+	 if (1==0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG1_psi( Yi, Yj+1, YTemps) += Ytbeta[2];
+	 if (1==0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG2_psi( Yi, Yj+1, YTemps) += Ytbeta[3];
+	 if (1==0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG1_gag( 0, Yj+1, YTemps) += Ytbeta[4];
+	 if (1==0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG2_gag( 0, Yj+1, YTemps) += Ytbeta[5];
+
+}
+for(Yj=YA2_Sac-1; Yj>=0; --Yj)
+{
+	 Yting[0]=YS1_res( Yi, Yj, YTemps);
+	 Yting[1]=YS2_res( Yi, Yj, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_ixu( Yi, Yj-1, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_ixu( Yi, Yj-1, YTemps);
+	 Yting[4]=YS1_bet( 0, Yj, YTemps);
+	 Yting[5]=YS2_bet( 0, Yj, YTemps);
+	 if (1==0 || Yi+1>YA1_Sac-1)
+	 Yting[6]=0; 
+	 else 
+	 Yting[6]=YS1_gama( Yi+1);
+	 if (1==0 || Yi+1>YA1_Sac-1)
+	 Yting[7]=0; 
+	 else 
+	 Yting[7]=YS2_gama( Yi+1);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Yixu(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7] );
+	 Yvsmatt (YNBS_ixu, YNBI_ixu, YMAX_JAC_NBI, &YG1Y_ixu, Yjac[0], Ytbeta);
+	 YG1_res( Yi, Yj, YTemps) += Ytbeta[0];
+	 YG2_res( Yi, Yj, YTemps) += Ytbeta[1];
+	 if (1==0 || Yj-1<0){} 
+	 else 
+	 YG1_ixu( Yi, Yj-1, YTemps) += Ytbeta[2];
+	 if (1==0 || Yj-1<0){} 
+	 else 
+	 YG2_ixu( Yi, Yj-1, YTemps) += Ytbeta[3];
+	 YG1_bet( 0, Yj, YTemps) += Ytbeta[4];
+	 YG2_bet( 0, Yj, YTemps) += Ytbeta[5];
+	 if (1==0 || Yi+1>YA1_Sac-1){} 
+	 else 
+	 YG1_gama( Yi+1) += Ytbeta[6];
+	 if (1==0 || Yi+1>YA1_Sac-1){} 
+	 else 
+	 YG2_gama( Yi+1) += Ytbeta[7];
+	 if (1==0 || Yi-1<0 || Yj-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YS1_psi( Yi-1, Yj-1, YTemps);
+	 if (1==0 || Yi-1<0 || Yj-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YS2_psi( Yi-1, Yj-1, YTemps);
+	 if (1==0 || Yi-1<0)
+	 Yting[2]=0; 
+	 else 
+	 Yting[2]=YS1_psi( Yi-1, Yj, YTemps);
+	 if (1==0 || Yi-1<0)
+	 Yting[3]=0; 
+	 else 
+	 Yting[3]=YS2_psi( Yi-1, Yj, YTemps);
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YS1_psi( Yi-1, Yj+1, YTemps);
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YS2_psi( Yi-1, Yj+1, YTemps);
+	 Yting[6]=YS1_diab( 0, Yj, YTemps);
+	 Yting[7]=YS2_diab( 0, Yj, YTemps);
+	 Yting[8]=YS1_gama( Yi);
+	 Yting[9]=YS2_gama( Yi);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Yres(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7], Yting[8], Yting[9] );
+	 Yvsmatt (YNBS_res, YNBI_res, YMAX_JAC_NBI, &YG1Y_res, Yjac[0], Ytbeta);
+	 if (1==0 || Yi-1<0 || Yj-1<0){} 
+	 else 
+	 YG1_psi( Yi-1, Yj-1, YTemps) += Ytbeta[0];
+	 if (1==0 || Yi-1<0 || Yj-1<0){} 
+	 else 
+	 YG2_psi( Yi-1, Yj-1, YTemps) += Ytbeta[1];
+	 if (1==0 || Yi-1<0){} 
+	 else 
+	 YG1_psi( Yi-1, Yj, YTemps) += Ytbeta[2];
+	 if (1==0 || Yi-1<0){} 
+	 else 
+	 YG2_psi( Yi-1, Yj, YTemps) += Ytbeta[3];
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG1_psi( Yi-1, Yj+1, YTemps) += Ytbeta[4];
+	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1){} 
+	 else 
+	 YG2_psi( Yi-1, Yj+1, YTemps) += Ytbeta[5];
+	 YG1_diab( 0, Yj, YTemps) += Ytbeta[6];
+	 YG2_diab( 0, Yj, YTemps) += Ytbeta[7];
+	 YG1_gama( Yi) += Ytbeta[8];
+	 YG2_gama( Yi) += Ytbeta[9];
+
+}
+
+}
+#pragma omp parallel for 
+for(YY=YA1_Sac-1; YY>=0; --YY){
+  Yi=YY;
+{
+for(Yj=YA2_Sac-1; Yj>=0; --Yj)
+{
+	 Yting[0]=YS1_diac( Yi, Yj, YTemps);
+	 Yting[1]=YS2_diac( Yi, Yj, YTemps);
+	 Yting[2]=YS1_gag( Yi, Yj, YTemps);
+	 Yting[3]=YS2_gag( Yi, Yj, YTemps);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ybet(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3] );
+	 Yvsmatt (YNBS_bet, YNBI_bet, YMAX_JAC_NBI, &YG1Y_bet, Yjac[0], Ytbeta);
+	 YG1_diac( Yi, Yj, YTemps) += Ytbeta[0];
+	 YG2_diac( Yi, Yj, YTemps) += Ytbeta[1];
+	 YG1_gag( Yi, Yj, YTemps) += Ytbeta[2];
+	 YG2_gag( Yi, Yj, YTemps) += Ytbeta[3];
+	 if (1==0 || Yj-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YS1_bet( Yi, Yj-1, YTemps);
+	 if (1==0 || Yj-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YS2_bet( Yi, Yj-1, YTemps);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ygag(Yi, Yj)->backward( Yting[0], Yting[1] );
+	 Yvsmatt (YNBS_gag, YNBI_gag, YMAX_JAC_NBI, &YG1Y_gag, Yjac[0], Ytbeta);
+	 if (1==0 || Yj-1<0){} 
+	 else 
+	 YG1_bet( Yi, Yj-1, YTemps) += Ytbeta[0];
+	 if (1==0 || Yj-1<0){} 
+	 else 
+	 YG2_bet( Yi, Yj-1, YTemps) += Ytbeta[1];
+	 Yting[0]=YS1_nj( Yi, Yj);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ydiac(Yi, Yj)->backward( Yting[0] );
+	 Yvsmatt (YNBS_diac, YNBI_diac, YMAX_JAC_NBI, &YG1Y_diac, Yjac[0], Ytbeta);
+	 YG1_nj( Yi, Yj) += Ytbeta[0];
+	 Yting[0]=YS1_nj( Yi, Yj);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ydiab(Yi, Yj)->backward( Yting[0] );
+	 Yvsmatt (YNBS_diab, YNBI_diab, YMAX_JAC_NBI, &YG1Y_diab, Yjac[0], Ytbeta);
+	 YG1_nj( Yi, Yj) += Ytbeta[0];
+	 Yting[0]=YS1_ssd( Yi, Yj);
+	 memset(Yjac, 0, 10*sizeof(double));
+	 Ynj(Yi, Yj)->backward( Yting[0] );
+	 Yvsmatt (YNBS_nj, YNBI_nj, YMAX_JAC_NBI, &YG1Y_nj, Yjac[0], Ytbeta);
+	 YG1_ssd( Yi, Yj) += Ytbeta[0];
+
+}
+
+}
+}
+  end=my_gettimeofday();
+
+  printf("\n\n################BACKWARD_SPACE_SAC#########################################");
+//  printf("\nTime begin: %f", begin);
+//  printf("\nTime end: %f", end);
+  printf("\nTimeBackwardDifference %f", (end - begin));
+  printf("\n############################################################################\n\n");
+
+	 return(0);
+}
+
+ int Yforward_space_Olap()
+{
+	 YA1=2049; YA2=0; YA3=0;
+Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
+#pragma omp parallel for 
+for(YY=0; YY<YA1_Olap; ++YY){
+  Yi=YY;
+{
+	 if (1==0 || Yi-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YW1_gama( Yi-1);
+	 if (1==0 || Yi-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YW2_gama( Yi-1);
+	 Yting[2]=YW1_gama( Yi);
+	 Yting[3]=YW2_gama( Yi);
+	 if (1==0 || Yi+1>YA1_Olap-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YW1_gama( Yi+1);
+	 if (1==0 || Yi+1>YA1_Olap-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YW2_gama( Yi+1);
+	 Ylap(Yi)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
+
+}
+}
+
+	 return(0);
+}
+
+ int Ybackward_space_Olap()
+{
+	 YA1=2049; YA2=0; YA3=0;
+Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
+#pragma omp parallel for 
+for(YY=YA1_Olap-1; YY>=0; --YY){
+  Yi=YY;
+{
+	 if (1==0 || Yi-1<0)
+	 Yting[0]=0; 
+	 else 
+	 Yting[0]=YW1_gama( Yi-1);
+	 if (1==0 || Yi-1<0)
+	 Yting[1]=0; 
+	 else 
+	 Yting[1]=YW2_gama( Yi-1);
+	 Yting[2]=YW1_gama( Yi);
+	 Yting[3]=YW2_gama( Yi);
+	 if (1==0 || Yi+1>YA1_Olap-1)
+	 Yting[4]=0; 
+	 else 
+	 Yting[4]=YW1_gama( Yi+1);
+	 if (1==0 || Yi+1>YA1_Olap-1)
+	 Yting[5]=0; 
+	 else 
+	 Yting[5]=YW2_gama( Yi+1);
+	 memset(Yjac, 0, 20*sizeof(double));
+	 Ylap(Yi)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
+	 Yvsmatt (YNBS_lap, YNBI_lap, YMAX_JAC_NBI, &YG1Y_lap, Yjac[0], Ytbeta);
+	 if (1==0 || Yi-1<0){} 
+	 else 
+	 #pragma omp atomic
+	 YG1_gama( Yi-1) += Ytbeta[0];
+	 if (1==0 || Yi-1<0){} 
+	 else 
+	 #pragma omp atomic
+	 YG2_gama( Yi-1) += Ytbeta[1];
+	 YG1_gama( Yi) += Ytbeta[2];
+	 YG2_gama( Yi) += Ytbeta[3];
+	 if (1==0 || Yi+1>YA1_Olap-1){} 
+	 else 
+	 #pragma omp atomic
+	 YG1_gama( Yi+1) += Ytbeta[4];
+	 if (1==0 || Yi+1>YA1_Olap-1){} 
+	 else 
+	 #pragma omp atomic
+	 YG2_gama( Yi+1) += Ytbeta[5];
+
+}
+}
+
+	 return(0);
+}
+
+int Yforward_traj_Tlu(int nbp)
+{
+	Ycurward=FORWARD;
+	 Yforward_space_Sac();
+	 return(0);
+}
+
+int Ybackward_traj_Tlu(int nbp)
+{
+	Ycurward=BACKWARD;
+	 Ybackward_space_Sac();
+	 return(0);
+}
+
+int Yforward_order()
+{
+	 Yforward_traj_Tlu(0);
+	 return(0);
+}
+
+int Ybackward_order()
+{
+	 Ybackward_traj_Tlu(0);
+	 return(0);
+}
+
+void Yforward_operator (char type) 
+{	
+	if ((YTabOpera[Yid_Olap].type==type || type=='*')  && YTabOpera[Yid_Olap].isactiv) Yforward_space_Olap();
+}
+void Ybackward_operator (char type) 
+{	
+	if ((YTabOpera[Yid_Olap].type==type || type=='*')  && YTabOpera[Yid_Olap].isactiv) Ybackward_space_Olap();
+}
+
+// € € € € € € € € LES FONCTIONS UTILISATEUR ... : 
+int Yuser_call (int argc, char *argv[]) 
+{
+	 int codret=1;
+	 if (strcmp(argv[0], "xdisplay") == 0)
+		 xdisplay();
+	 else if (strcmp(argv[0], "xset_init") == 0)
+		 xset_init();
+	 else if (strcmp(argv[0], "xnorme") == 0)
+		 xnorme();
+	 else if (strcmp(argv[0], "xgama0") == 0)
+		 xgama0(argc, argv);
+	 else if (strcmp(argv[0], "xset_deltazr") == 0)
+		 xset_deltazr(argc, argv);
+	 else if (strcmp(argv[0], "xset_c0") == 0)
+		 xset_c0(argc, argv);
+	 else if (strcmp(argv[0], "xset_freq") == 0)
+		 xset_freq(argc, argv);
+	 else if (strcmp(argv[0], "xset_tab_freq") == 0)
+		 xset_tab_freq(argc, argv);
+	 else if (strcmp(argv[0], "xset_zs") == 0)
+		 xset_zs(argc, argv);
+	 else if (strcmp(argv[0], "xset_fac") == 0)
+		 xset_fac(argc, argv);
+	 else if (strcmp(argv[0], "xset_gama") == 0)
+		 xset_gama(argc, argv);
+	 else if (strcmp(argv[0], "xcoef_OBS") == 0)
+		 xcoef_OBS(argc, argv);
+	 else codret=0;
+	 return(codret);
+}
+
+//-------------- end Yao generation -----------------
Index: trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/Y2mflbc_rd.h
===================================================================
--- trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/Y2mflbc_rd.h	(revision 402)
+++ 	(revision )
@@ -1,1171 +1,0 @@
-
-//----------------------------------------------------
-// project: mflbc_rd     header generated by YAO version v.9
-//----------------------------------------------------
-
-// € € € € € € € € LES FONCTIONS PREDEFINIES
-/*M2_TBTOG   */ 
-void YtabTOgrad_ssd(YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
-			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
-				 YG_ssd(Yws, Yw1, Yw2) = tab[Y3windice]; ++Y3windice;}}}
-}/*M2_RGRAD*/ 
-void Yrazgrad_ssd()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
-				 Yssd(Yw1, Yw2)->Ygrad[Yws] = 0.0;}}}
-}/*M2_SETA*/ 
-void Ysetstate_ssd(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
-			 for (int Yws=0; Yws<YNBS_ssd; ++Yws){
-				 Yssd(Yw1, Yw2)->Ystate[Yws] = val;}}}
-}/*M2_YIOTU*/ 
-void Yio_ssd(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("ssd", Yws, Yw1, Yw2, Yw3, Ywt, &YS_ssd(Yws, Yw1, Yw2), val);
-}/*M2_CREY*/ 
-void Ycreate_ssd()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Yssd(Yw1, Yw2)= new Yaossd ())==NULL) Ycreate_errnew();}}
-}/*M1_ADJUS*/ 
-void Yadjust_gama()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1) 
-	 for (int Yws=0;Yws<YNBS_gama; ++Yws) 
-	 { Ystate_gama(Yws, Yw1) -= Yepsi_gama(Yws, Yw1) * Ygrad_gama(Yws, Yw1); 
-	}
-}/*M1_GCTOTB  */ 
-void YgradCTOtab_gama(YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 tab[Y3windice] += YG_gama(Yws, Yw1); ++Y3windice;}}
-}/*M1_VSTA*/ 
-void Y3valstate_gama()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Y3x[Y3windice] = Ygama(Yw1)->Ystate[Yws]; ++Y3windice;}}
-}/*M1_GSTA*/ 
-void Y3getstate_gama(float x[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Ygama(Yw1)->Ystate[Yws] = x[Y3windice]; ++Y3windice;}}
-}/*M1_VGRAD*/ 
-void Y3valgrad_gama(float g[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 g[Y3windice] = Ygama(Yw1)->Ygrad[Yws]; ++Y3windice;}}
-}/*M1_TBTOG   */ 
-void YtabTOgrad_gama(YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 YG_gama(Yws, Yw1) = tab[Y3windice]; ++Y3windice;}}
-}/*M1_RGRAD*/ 
-void Yrazgrad_gama()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Ygama(Yw1)->Ygrad[Yws] = 0.0;}}
-}/*M1_SETA*/ 
-void Ysetstate_gama(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Ygama(Yw1)->Ystate[Yws] = val;}}
-}/*M1_YIOTU*/ 
-void Yio_gama(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("gama", Yws, Yw1, Yw2, Yw3, Ywt, &YS_gama(Yws, Yw1), val);
-}/*M0_OUTOB*/ 
-int Youtoobs_gama(YioKind yiokind, int Yws, int Ywt, int arbpdt)
-{
-	 Yaobs.time = arbpdt;
-	 Yaobs.imod = Yimod("gama");
-	 Yaobs.smod = Yws;/*M1_OUTOB*/ 
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
-	 {	if(select_io(yiokind, "gama", Yws, Yw1, -1, -1, Ywt, &Ystate_gama(Yws, Yw1)))
-			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = -1; Yaobs.kaxe = -1;
-				Yaobs.vobs = Ystate_gama(Yws, Yw1);
-				if(!Yobs_insert (&Yaobs)) return(0);
-			}
-	 }/*M9_OUTOB*/  
-	 return(1);
-}/*M1_SEPS*/ 
-void Ysetepsi_gama(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Ygama(Yw1)->Yepsi[Yws] = val;}}
-}/*M1_CREY*/ 
-void Ycreate_gama() 	
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 if ((Ygama(Yw1) = new Yaogama ())==NULL) Ycreate_errnew();}
-}/*M1_SWISH*/ 
-void Ysetwish_gama(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_gama; ++Yws){
-			 Ywish_gama(Yws, Yw1) = val;}}
-}/*M2_TBTOG   */ 
-void YtabTOgrad_nj(YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
-			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
-				 YG_nj(Yws, Yw1, Yw2) = tab[Y3windice]; ++Y3windice;}}}
-}/*M2_RGRAD*/ 
-void Yrazgrad_nj()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
-				 Ynj(Yw1, Yw2)->Ygrad[Yws] = 0.0;}}}
-}/*M2_SETA*/ 
-void Ysetstate_nj(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
-			 for (int Yws=0; Yws<YNBS_nj; ++Yws){
-				 Ynj(Yw1, Yw2)->Ystate[Yws] = val;}}}
-}/*M2_YIOTU*/ 
-void Yio_nj(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("nj", Yws, Yw1, Yw2, Yw3, Ywt, &YS_nj(Yws, Yw1, Yw2), val);
-}/*M2_CREU*/ 
-void Ycreate_nj()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ynj(Yw1, Yw2)= new nj ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_diac(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
-					 YG_diac(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_diac()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
-					 Ydiac(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_diac(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diac; ++Yws){
-					 Ydiac(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_diac(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("diac", Yws, Yw1, Yw2, Yw3, Ywt, &YS_diac(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_diac()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ydiac(Yw1, Yw2)= new diac ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_diab(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
-					 YG_diab(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_diab()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
-					 Ydiab(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_diab(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_diab; ++Yws){
-					 Ydiab(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_diab(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("diab", Yws, Yw1, Yw2, Yw3, Ywt, &YS_diab(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_diab()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ydiab(Yw1, Yw2)= new diab ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_bet(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
-					 YG_bet(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_bet()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
-					 Ybet(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_bet(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_bet; ++Yws){
-					 Ybet(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_bet(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("bet", Yws, Yw1, Yw2, Yw3, Ywt, &YS_bet(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_bet()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ybet(Yw1, Yw2)= new bet ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_gag(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
-					 YG_gag(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_gag()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
-					 Ygag(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_gag(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_gag; ++Yws){
-					 Ygag(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_gag(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("gag", Yws, Yw1, Yw2, Yw3, Ywt, &YS_gag(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_gag()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ygag(Yw1, Yw2)= new gag ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_res(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_res; ++Yws){
-					 YG_res(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_res()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_res; ++Yws){
-					 Yres(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_res(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_res; ++Yws){
-					 Yres(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_res(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("res", Yws, Yw1, Yw2, Yw3, Ywt, &YS_res(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_res()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Yres(Yw1, Yw2)= new res ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_ixu(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
-					 YG_ixu(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_ixu()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
-					 Yixu(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_ixu(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_ixu; ++Yws){
-					 Yixu(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_ixu(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("ixu", Yws, Yw1, Yw2, Yw3, Ywt, &YS_ixu(Yws, Yw1, Yw2, Ywt), val);
-}/*M2_CREU*/ 
-void Ycreate_ixu()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Yixu(Yw1, Yw2)= new ixu ())==NULL) Ycreate_errnew();}}
-}/*M2_TBTOGT  */ 
-void YtabTOgrad_psi(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=frompdt; Ywt<topdt; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
-					 YG_psi(Yws, Yw1, Yw2, Ywt) = tab[Y3windice]; ++Y3windice;}}}}
-}/*M2_RGRADT*/ 
-void Yrazgrad_psi()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
-					 Ypsi(Yw1, Yw2)->Ygrad[Ywt][Yws] = 0.0;}}}}
-}/*M2_SETAT*/ 
-void Ysetstate_psi(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;    ++Ywt){
-				 for (int Yws=0; Yws<YNBS_psi; ++Yws){
-					 Ypsi(Yw1, Yw2)->Ystate[Ywt][Yws] = val;}}}}
-}/*M2_YIOUT*/ 
-void Yio_psi(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("psi", Yws, Yw1, Yw2, Yw3, Ywt, &YS_psi(Yws, Yw1, Yw2, Ywt), val);
-}/*M0_OUTOB*/ 
-int Youtoobs_psi(YioKind yiokind, int Yws, int Ywt, int arbpdt)
-{
-	 Yaobs.time = arbpdt;
-	 Yaobs.imod = Yimod("psi");
-	 Yaobs.smod = Yws;/*M2_OUTOBT*/
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
-	 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2)
-	 {	if(select_io(yiokind, "psi", Yws, Yw1, Yw2, -1, Ywt, &Ystate_psi(Yws, Yw1, Yw2, Ywt)))
-			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = Yw2; Yaobs.kaxe = -1;
-				Yaobs.vobs = Ystate_psi(Yws, Yw1, Yw2, Ywt);
-				if(!Yobs_insert (&Yaobs)) return(0);
-			}
-	 }/*M9_OUTOB*/  
-	 return(1);
-}/*M2_CREU*/ 
-void Ycreate_psi()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac; ++Yw2){
-			 if ((Ypsi(Yw1, Yw2)= new psi ())==NULL) Ycreate_errnew();}}
-}/*M2_SWISH*/ 
-void Ysetwish_psi(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yw2=0; Yw2<YA2_Sac;  ++Yw2){
-			 for (int Yws=0; Yws<YNBS_psi; ++Yws){
-				 Ywish_psi(Yws, Yw1, Yw2) = val;}}}
-}/*M1_TBTOGT  */ 
-void YtabTOgrad_psifd(int frompdt, int topdt, YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Ywt=frompdt; Ywt<topdt;  ++Ywt){
-			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
-				 YG_psifd(Yws, Yw1, Ywt) = tab[Y3windice]; ++Y3windice;}}}
-}/*M1_RGRADT*/ 
-void Yrazgrad_psifd()
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Ywt=0; Ywt<YNBALLTIME_Tlu; ++Ywt){
-			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
-				 Ypsifd(Yw1)->Ygrad[Ywt][Yws] = 0.0;}}}
-}/*M1_SETAT*/ 
-void Ysetstate_psifd(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Ywt=0; Ywt<YNBALLTIME_Tlu;  ++Ywt){
-			 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
-				 Ypsifd(Yw1)->Ystate[Ywt][Yws] = val;}}}
-}/*M1_YIOUT*/ 
-void Yio_psifd(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("psifd", Yws, Yw1, Yw2, Yw3, Ywt, &YS_psifd(Yws, Yw1, Ywt), val);
-}/*M0_OUTOB*/ 
-int Youtoobs_psifd(YioKind yiokind, int Yws, int Ywt, int arbpdt)
-{
-	 Yaobs.time = arbpdt;
-	 Yaobs.imod = Yimod("psifd");
-	 Yaobs.smod = Yws;/*M1_OUTOBT*/
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1)
-	 {	if(select_io(yiokind, "psifd", Yws, Yw1, -1, -1, Ywt, &Ystate_psifd(Yws, Yw1, Ywt)))
-			{	Yaobs.iaxe = Yw1; Yaobs.jaxe = -1; Yaobs.kaxe = -1;
-				Yaobs.vobs = Ystate_psifd(Yws, Yw1, Ywt);
-				if(!Yobs_insert (&Yaobs)) return(0);
-			}
-	 }/*M9_OUTOB*/  
-	 return(1);
-}/*M1_CREU*/ 
-void Ycreate_psifd()  
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 if ((Ypsifd(Yw1) = new psifd ())==NULL) Ycreate_errnew();}
-}/*M1_SWISH*/ 
-void Ysetwish_psifd(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Sac; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_psifd; ++Yws){
-			 Ywish_psifd(Yws, Yw1) = val;}}
-}/*M1_TBTOG   */ 
-void YtabTOgrad_lap(YREAL tab[])
-{
-	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
-			 YG_lap(Yws, Yw1) = tab[Y3windice]; ++Y3windice;}}
-}/*M1_RGRAD*/ 
-void Yrazgrad_lap()
-{
-	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
-			 Ylap(Yw1)->Ygrad[Yws] = 0.0;}}
-}/*M1_SETA*/ 
-void Ysetstate_lap(double val)
-{
-	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
-		 for (int Yws=0; Yws<YNBS_lap; ++Yws){
-			 Ylap(Yw1)->Ystate[Yws] = val;}}
-}/*M1_YIOTU*/ 
-void Yio_lap(int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)	
-{  Yiorwf ("lap", Yws, Yw1, Yw2, Yw3, Ywt, &YS_lap(Yws, Yw1), val);
-}/*M1_CREU*/ 
-void Ycreate_lap()  
-{
-	 for (int Yw1=0; Yw1<YA1_Olap; ++Yw1){
-		 if ((Ylap(Yw1) = new lap ())==NULL) Ycreate_errnew();}
-}
-void Ycreate_all () 
-{
-	 Ycreate_ssd ();
-	 Ycreate_gama ();
-	 Ycreate_nj ();
-	 Ycreate_diac ();
-	 Ycreate_diab ();
-	 Ycreate_bet ();
-	 Ycreate_gag ();
-	 Ycreate_res ();
-	 Ycreate_ixu ();
-	 Ycreate_psi ();
-	 Ycreate_psifd ();
-	 Ycreate_lap ();
-}
-void Ywishdiff_all (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt, YREAL vobs) 
-{	
-	 if(1==0);
-	 else if (strcmp(nmmod, "gama") == 0)
-				 YW_gama(Yws, Yw1) = YS_gama(Yws, Yw1) - vobs;
-	 else if (strcmp(nmmod, "psi") == 0)
-				 YW_psi(Yws, Yw1, Yw2) = YS_psi(Yws, Yw1, Yw2, Ywt) - vobs;
-	 else if (strcmp(nmmod, "psifd") == 0)
-				 YW_psifd(Yws, Yw1) = YS_psifd(Yws, Yw1, Ywt) - vobs;
-}
-void Ycostwishdiff_all (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt) 
-{	
-	 if(1==0);
-	 else if (strcmp(nmmod, "gama") == 0)
-				 YG_gama(Yws, Yw1) += Ycostdiff(YW_gama(Yws, Yw1), YS_lap(Yws, Yw1));
-	 else if (strcmp(nmmod, "psi") == 0)
-				      YG_psi(Yws, Yw1, Yw2, Ywt) += Ycostdiff(YW_psi(Yws, Yw1, Yw2), YW_psi(Yws, Yw1, Yw2));
-	 else if (strcmp(nmmod, "psifd") == 0)
-				 YG_psifd(Yws, Yw1, Ywt) += Ycostdiff(YW_psifd(Yws, Yw1), YW_psifd(Yws, Yw1));
-}
-void Youtoobs_mod(YioKind yiokind, char *nmmod, int numout, int pdt, int arbpdt)
-{
- 	 if(1==0);
- 	 else if (strcmp(nmmod, "gama") == 0) Youtoobs_gama(yiokind, numout, pdt, arbpdt);
- 	 else if (strcmp(nmmod, "psi") == 0) Youtoobs_psi(yiokind, numout, pdt, arbpdt);
- 	 else if (strcmp(nmmod, "psifd") == 0) Youtoobs_psifd(yiokind, numout, pdt, arbpdt);
-}
-void Yadjust_all () 
-{
-	 Yadjust_gama ();
-}
-void Yrazgrad_all () 
-{
-	 Yrazgrad_ssd ();
-	 Yrazgrad_gama ();
-	 Yrazgrad_nj ();
-	 Yrazgrad_diac ();
-	 Yrazgrad_diab ();
-	 Yrazgrad_bet ();
-	 Yrazgrad_gag ();
-	 Yrazgrad_res ();
-	 Yrazgrad_ixu ();
-	 Yrazgrad_psi ();
-	 Yrazgrad_psifd ();
-	 Yrazgrad_lap ();
-}
-void Yrazgrad_only (int itraj) 
-{
-	if (itraj==Yid_Tlu)
-	{  Yrazgrad_nj ();
-	   Yrazgrad_lap ();
-	 }
-}
-int Ysetstate_mod (char *nmmod, YREAL val) 
-{	int codret=0; int all=0;
-	if (!strcmp(nmmod, "Y#A")) all=1;
-	if (!strcmp(nmmod, "ssd") || all)
-	{  Ysetstate_ssd(val);codret=1;}
-	if (!strcmp(nmmod, "gama") || all)
-	{  Ysetstate_gama(val);codret=1;}
-	if (!strcmp(nmmod, "nj") || all)
-	{  Ysetstate_nj(val);codret=1;}
-	if (!strcmp(nmmod, "diac") || all)
-	{  Ysetstate_diac(val);codret=1;}
-	if (!strcmp(nmmod, "diab") || all)
-	{  Ysetstate_diab(val);codret=1;}
-	if (!strcmp(nmmod, "bet") || all)
-	{  Ysetstate_bet(val);codret=1;}
-	if (!strcmp(nmmod, "gag") || all)
-	{  Ysetstate_gag(val);codret=1;}
-	if (!strcmp(nmmod, "res") || all)
-	{  Ysetstate_res(val);codret=1;}
-	if (!strcmp(nmmod, "ixu") || all)
-	{  Ysetstate_ixu(val);codret=1;}
-	if (!strcmp(nmmod, "psi") || all)
-	{  Ysetstate_psi(val);codret=1;}
-	if (!strcmp(nmmod, "psifd") || all)
-	{  Ysetstate_psifd(val);codret=1;}
-	if (!strcmp(nmmod, "lap") || all)
-	{  Ysetstate_lap(val);codret=1;}
-	return(codret);
-}
-void Ysetwish_mod (int imod, YREAL val) 
-{	if(1==0);
-	else if (imod==1) Ysetwish_gama(val);
-	else if (imod==9) Ysetwish_psi(val);
-	else if (imod==10) Ysetwish_psifd(val);
-}
-void  Yio_mod (char *nmmod, int Yws, int Yw1, int Yw2, int Yw3, int Ywt, double val)
-{
-	 if(1==0);
-	 else if (strcmp(nmmod, "ssd") == 0) Yio_ssd(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "gama") == 0) Yio_gama(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "nj") == 0) Yio_nj(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "diac") == 0) Yio_diac(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "diab") == 0) Yio_diab(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "bet") == 0) Yio_bet(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "gag") == 0) Yio_gag(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "res") == 0) Yio_res(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "ixu") == 0) Yio_ixu(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "psi") == 0) Yio_psi(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "psifd") == 0) Yio_psifd(Yws, Yw1, Yw2, Yw3, Ywt, val);
-	 else if (strcmp(nmmod, "lap") == 0) Yio_lap(Yws, Yw1, Yw2, Yw3, Ywt, val);
-}
-void YgradCTOtab_target (YREAL tab[]) 
-{	//Y3windice = 0;
-	 YgradCTOtab_gama (tab);
-}
-void YtabTOgrad_target (YREAL tab[]) 
-{	//Y3windice = 0;
-	 YtabTOgrad_gama (tab);
-}
-void Y3getstate_all (float x[]) 
-{	 Y3windice = 0;
-	 Y3getstate_gama (x);
-}
-void Y3valstate_all () 
-{	 Y3windice = 0;
-	 Y3valstate_gama ();
-}
-void Y3valgrad_all (float g[]) 
-{	 Y3windice = 0;
-	 Y3valgrad_gama (g);
-}
-int Yauto_call (int argc, char *argv[]) 
-{
-	 int codret=0; int all=0; double val;
-	 if (1==0);
-	 else if ( !strcmp(argv[0], "setepsi") || !strcmp(argv[0], "SETEPSI") 
-					 ||!strcmp(argv[0], "setepsi_all") || !strcmp(argv[0], "SETEPSI_ALL"))
-	 {
-			 if (!strcmp(argv[0], "setepsi_all") || !strcmp(argv[0], "SETEPSI_ALL")){all=1; val=atof(argv[1]);} else val=atof(argv[2]);
-			 if (!strcmp(argv[1], "gama") || all)
-					 {Ysetepsi_gama(val);codret=1;}
-	 }
-	 else codret=0;
-	 return(codret);
-}
-
-//#############################################################################################################################
-
-
-#include <sys/time.h>
-double my_gettimeofday(){
-   struct timeval tmp_time;
-    gettimeofday(&tmp_time, NULL);
-     return tmp_time.tv_sec + (tmp_time.tv_usec * 1.0e-6L);
-}
-
-
- int Yforward_space_Sac()
-{
-  double begin=0, end=0;
-	 YA1=2049; YA2=512; YA3=0;
-Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
-
-begin=my_gettimeofday();
-#pragma omp parallel for 
-for(YY=0; YY<YA1_Sac; ++YY){
-  Yi=YY;
-{
-for(Yj=0; Yj<YA2_Sac; ++Yj)
-{
-	 Yting[0]=YS1_ssd( Yi, Yj);
-	 Ynj(Yi, Yj)->forward( Yting[0] );
-	 Yting[0]=YS1_nj( Yi, Yj);
-	 Ydiab(Yi, Yj)->forward( Yting[0] );
-	 Yting[0]=YS1_nj( Yi, Yj);
-	 Ydiac(Yi, Yj)->forward( Yting[0] );
-	 if (1==0 || Yj-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YS1_bet( Yi, Yj-1, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YS2_bet( Yi, Yj-1, YTemps);
-	 Ygag(Yi, Yj)->forward( Yting[0], Yting[1] );
-	 Yting[0]=YS1_diac( Yi, Yj, YTemps);
-	 Yting[1]=YS2_diac( Yi, Yj, YTemps);
-	 Yting[2]=YS1_gag( Yi, Yj, YTemps);
-	 Yting[3]=YS2_gag( Yi, Yj, YTemps);
-	 Ybet(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3] );
-
-}
-
-}
-}
-
-for(Yi=0; Yi<YA1_Sac; ++Yi)
-{
-for(Yj=0; Yj<YA2_Sac; ++Yj)
-{
-	 if (1==0 || Yi-1<0 || Yj-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YS1_psi( Yi-1, Yj-1, YTemps);
-	 if (1==0 || Yi-1<0 || Yj-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YS2_psi( Yi-1, Yj-1, YTemps);
-	 if (1==0 || Yi-1<0)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_psi( Yi-1, Yj, YTemps);
-	 if (1==0 || Yi-1<0)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_psi( Yi-1, Yj, YTemps);
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YS1_psi( Yi-1, Yj+1, YTemps);
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YS2_psi( Yi-1, Yj+1, YTemps);
-	 Yting[6]=YS1_diab( 0, Yj, YTemps);
-	 Yting[7]=YS2_diab( 0, Yj, YTemps);
-	 Yting[8]=YS1_gama( Yi);
-	 Yting[9]=YS2_gama( Yi);
-	 Yres(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7], Yting[8], Yting[9] );
-	 Yting[0]=YS1_res( Yi, Yj, YTemps);
-	 Yting[1]=YS2_res( Yi, Yj, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_ixu( Yi, Yj-1, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_ixu( Yi, Yj-1, YTemps);
-	 Yting[4]=YS1_bet( 0, Yj, YTemps);
-	 Yting[5]=YS2_bet( 0, Yj, YTemps);
-	 if (1==0 || Yi+1>YA1_Sac-1)
-	 Yting[6]=0; 
-	 else 
-	 Yting[6]=YS1_gama( Yi+1);
-	 if (1==0 || Yi+1>YA1_Sac-1)
-	 Yting[7]=0; 
-	 else 
-	 Yting[7]=YS2_gama( Yi+1);
-	 Yixu(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7] );
-
-}
-for(Yj=YA2_Sac-1; Yj>=0; --Yj)
-{
-	 Yting[0]=YS1_ixu( Yi, Yj, YTemps);
-	 Yting[1]=YS2_ixu( Yi, Yj, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_psi( Yi, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_psi( Yi, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YS1_gag( 0, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YS2_gag( 0, Yj+1, YTemps);
-	 Ypsi(Yi, Yj)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
-
-}
-
-}
-#pragma omp parallel for 
-for(YY=0; YY<YA1_Sac; ++YY){
-  Yi=YY;
-{
-	 Yting[0]=YS1_psi( Yi, 511, YTemps);
-	 Yting[1]=YS2_psi( Yi, 511, YTemps);
-	 Yting[2]=YS1_gama( Yi);
-	 Yting[3]=YS2_gama( Yi);
-	 Ypsifd(Yi)->forward( Yting[0], Yting[1], Yting[2], Yting[3] );
-
-}
-}
-  end=my_gettimeofday();
-
-  printf("\n\n################ FORWARD_SPACE_SAC #########################################");
-//  printf("\nTime begin: %f", begin);
-//  printf("\nTime end: %f", end);
-  printf("\nTimeForwardDifference %f", (end - begin));
-  printf("\n###############################################################################\n\n");
-
-	 return(0);
-}
-//#############################################################################################################################
-
- int Ybackward_space_Sac()
-{
-  double begin=0, end=0;
-	 YA1=2049; YA2=512; YA3=0;
-Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
-  begin=my_gettimeofday();
-#pragma omp parallel for 
-for(YY=YA1_Sac-1; YY>=0; --YY){
-  Yi=YY;
-{
-	 Yting[0]=YS1_psi( Yi, 511, YTemps);
-	 Yting[1]=YS2_psi( Yi, 511, YTemps);
-	 Yting[2]=YS1_gama( Yi);
-	 Yting[3]=YS2_gama( Yi);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ypsifd(Yi)->backward( Yting[0], Yting[1], Yting[2], Yting[3] );
-	 Yvsmatt (YNBS_psifd, YNBI_psifd, YMAX_JAC_NBI, &YG1Y_psifd, Yjac[0], Ytbeta);
-	 YG1_psi( Yi, 511, YTemps) += Ytbeta[0];
-	 YG2_psi( Yi, 511, YTemps) += Ytbeta[1];
-	 YG1_gama( Yi) += Ytbeta[2];
-	 YG2_gama( Yi) += Ytbeta[3];
-
-}
-}
-for(Yi=YA1_Sac-1; Yi>=0; --Yi)
-{
-for(Yj=0; Yj<YA2_Sac; ++Yj)
-{
-	 Yting[0]=YS1_ixu( Yi, Yj, YTemps);
-	 Yting[1]=YS2_ixu( Yi, Yj, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_psi( Yi, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_psi( Yi, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YS1_gag( 0, Yj+1, YTemps);
-	 if (1==0 || Yj+1>YA2_Sac-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YS2_gag( 0, Yj+1, YTemps);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ypsi(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
-	 Yvsmatt (YNBS_psi, YNBI_psi, YMAX_JAC_NBI, &YG1Y_psi, Yjac[0], Ytbeta);
-	 YG1_ixu( Yi, Yj, YTemps) += Ytbeta[0];
-	 YG2_ixu( Yi, Yj, YTemps) += Ytbeta[1];
-	 if (1==0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG1_psi( Yi, Yj+1, YTemps) += Ytbeta[2];
-	 if (1==0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG2_psi( Yi, Yj+1, YTemps) += Ytbeta[3];
-	 if (1==0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG1_gag( 0, Yj+1, YTemps) += Ytbeta[4];
-	 if (1==0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG2_gag( 0, Yj+1, YTemps) += Ytbeta[5];
-
-}
-for(Yj=YA2_Sac-1; Yj>=0; --Yj)
-{
-	 Yting[0]=YS1_res( Yi, Yj, YTemps);
-	 Yting[1]=YS2_res( Yi, Yj, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_ixu( Yi, Yj-1, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_ixu( Yi, Yj-1, YTemps);
-	 Yting[4]=YS1_bet( 0, Yj, YTemps);
-	 Yting[5]=YS2_bet( 0, Yj, YTemps);
-	 if (1==0 || Yi+1>YA1_Sac-1)
-	 Yting[6]=0; 
-	 else 
-	 Yting[6]=YS1_gama( Yi+1);
-	 if (1==0 || Yi+1>YA1_Sac-1)
-	 Yting[7]=0; 
-	 else 
-	 Yting[7]=YS2_gama( Yi+1);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Yixu(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7] );
-	 Yvsmatt (YNBS_ixu, YNBI_ixu, YMAX_JAC_NBI, &YG1Y_ixu, Yjac[0], Ytbeta);
-	 YG1_res( Yi, Yj, YTemps) += Ytbeta[0];
-	 YG2_res( Yi, Yj, YTemps) += Ytbeta[1];
-	 if (1==0 || Yj-1<0){} 
-	 else 
-	 YG1_ixu( Yi, Yj-1, YTemps) += Ytbeta[2];
-	 if (1==0 || Yj-1<0){} 
-	 else 
-	 YG2_ixu( Yi, Yj-1, YTemps) += Ytbeta[3];
-	 YG1_bet( 0, Yj, YTemps) += Ytbeta[4];
-	 YG2_bet( 0, Yj, YTemps) += Ytbeta[5];
-	 if (1==0 || Yi+1>YA1_Sac-1){} 
-	 else 
-	 YG1_gama( Yi+1) += Ytbeta[6];
-	 if (1==0 || Yi+1>YA1_Sac-1){} 
-	 else 
-	 YG2_gama( Yi+1) += Ytbeta[7];
-	 if (1==0 || Yi-1<0 || Yj-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YS1_psi( Yi-1, Yj-1, YTemps);
-	 if (1==0 || Yi-1<0 || Yj-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YS2_psi( Yi-1, Yj-1, YTemps);
-	 if (1==0 || Yi-1<0)
-	 Yting[2]=0; 
-	 else 
-	 Yting[2]=YS1_psi( Yi-1, Yj, YTemps);
-	 if (1==0 || Yi-1<0)
-	 Yting[3]=0; 
-	 else 
-	 Yting[3]=YS2_psi( Yi-1, Yj, YTemps);
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YS1_psi( Yi-1, Yj+1, YTemps);
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YS2_psi( Yi-1, Yj+1, YTemps);
-	 Yting[6]=YS1_diab( 0, Yj, YTemps);
-	 Yting[7]=YS2_diab( 0, Yj, YTemps);
-	 Yting[8]=YS1_gama( Yi);
-	 Yting[9]=YS2_gama( Yi);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Yres(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5], Yting[6], Yting[7], Yting[8], Yting[9] );
-	 Yvsmatt (YNBS_res, YNBI_res, YMAX_JAC_NBI, &YG1Y_res, Yjac[0], Ytbeta);
-	 if (1==0 || Yi-1<0 || Yj-1<0){} 
-	 else 
-	 YG1_psi( Yi-1, Yj-1, YTemps) += Ytbeta[0];
-	 if (1==0 || Yi-1<0 || Yj-1<0){} 
-	 else 
-	 YG2_psi( Yi-1, Yj-1, YTemps) += Ytbeta[1];
-	 if (1==0 || Yi-1<0){} 
-	 else 
-	 YG1_psi( Yi-1, Yj, YTemps) += Ytbeta[2];
-	 if (1==0 || Yi-1<0){} 
-	 else 
-	 YG2_psi( Yi-1, Yj, YTemps) += Ytbeta[3];
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG1_psi( Yi-1, Yj+1, YTemps) += Ytbeta[4];
-	 if (1==0 || Yi-1<0 || Yj+1>YA2_Sac-1){} 
-	 else 
-	 YG2_psi( Yi-1, Yj+1, YTemps) += Ytbeta[5];
-	 YG1_diab( 0, Yj, YTemps) += Ytbeta[6];
-	 YG2_diab( 0, Yj, YTemps) += Ytbeta[7];
-	 YG1_gama( Yi) += Ytbeta[8];
-	 YG2_gama( Yi) += Ytbeta[9];
-
-}
-
-}
-#pragma omp parallel for 
-for(YY=YA1_Sac-1; YY>=0; --YY){
-  Yi=YY;
-{
-for(Yj=YA2_Sac-1; Yj>=0; --Yj)
-{
-	 Yting[0]=YS1_diac( Yi, Yj, YTemps);
-	 Yting[1]=YS2_diac( Yi, Yj, YTemps);
-	 Yting[2]=YS1_gag( Yi, Yj, YTemps);
-	 Yting[3]=YS2_gag( Yi, Yj, YTemps);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ybet(Yi, Yj)->backward( Yting[0], Yting[1], Yting[2], Yting[3] );
-	 Yvsmatt (YNBS_bet, YNBI_bet, YMAX_JAC_NBI, &YG1Y_bet, Yjac[0], Ytbeta);
-	 YG1_diac( Yi, Yj, YTemps) += Ytbeta[0];
-	 YG2_diac( Yi, Yj, YTemps) += Ytbeta[1];
-	 YG1_gag( Yi, Yj, YTemps) += Ytbeta[2];
-	 YG2_gag( Yi, Yj, YTemps) += Ytbeta[3];
-	 if (1==0 || Yj-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YS1_bet( Yi, Yj-1, YTemps);
-	 if (1==0 || Yj-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YS2_bet( Yi, Yj-1, YTemps);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ygag(Yi, Yj)->backward( Yting[0], Yting[1] );
-	 Yvsmatt (YNBS_gag, YNBI_gag, YMAX_JAC_NBI, &YG1Y_gag, Yjac[0], Ytbeta);
-	 if (1==0 || Yj-1<0){} 
-	 else 
-	 YG1_bet( Yi, Yj-1, YTemps) += Ytbeta[0];
-	 if (1==0 || Yj-1<0){} 
-	 else 
-	 YG2_bet( Yi, Yj-1, YTemps) += Ytbeta[1];
-	 Yting[0]=YS1_nj( Yi, Yj);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ydiac(Yi, Yj)->backward( Yting[0] );
-	 Yvsmatt (YNBS_diac, YNBI_diac, YMAX_JAC_NBI, &YG1Y_diac, Yjac[0], Ytbeta);
-	 YG1_nj( Yi, Yj) += Ytbeta[0];
-	 Yting[0]=YS1_nj( Yi, Yj);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ydiab(Yi, Yj)->backward( Yting[0] );
-	 Yvsmatt (YNBS_diab, YNBI_diab, YMAX_JAC_NBI, &YG1Y_diab, Yjac[0], Ytbeta);
-	 YG1_nj( Yi, Yj) += Ytbeta[0];
-	 Yting[0]=YS1_ssd( Yi, Yj);
-	 memset(Yjac, 0, 10*sizeof(double));
-	 Ynj(Yi, Yj)->backward( Yting[0] );
-	 Yvsmatt (YNBS_nj, YNBI_nj, YMAX_JAC_NBI, &YG1Y_nj, Yjac[0], Ytbeta);
-	 YG1_ssd( Yi, Yj) += Ytbeta[0];
-
-}
-
-}
-}
-  end=my_gettimeofday();
-
-  printf("\n\n################BACKWARD_SPACE_SAC#########################################");
-//  printf("\nTime begin: %f", begin);
-//  printf("\nTime end: %f", end);
-  printf("\nTimeBackwardDifference %f", (end - begin));
-  printf("\n############################################################################\n\n");
-
-	 return(0);
-}
-
- int Yforward_space_Olap()
-{
-	 YA1=2049; YA2=0; YA3=0;
-Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
-#pragma omp parallel for 
-for(YY=0; YY<YA1_Olap; ++YY){
-  Yi=YY;
-{
-	 if (1==0 || Yi-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YW1_gama( Yi-1);
-	 if (1==0 || Yi-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YW2_gama( Yi-1);
-	 Yting[2]=YW1_gama( Yi);
-	 Yting[3]=YW2_gama( Yi);
-	 if (1==0 || Yi+1>YA1_Olap-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YW1_gama( Yi+1);
-	 if (1==0 || Yi+1>YA1_Olap-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YW2_gama( Yi+1);
-	 Ylap(Yi)->forward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
-
-}
-}
-
-	 return(0);
-}
-
- int Ybackward_space_Olap()
-{
-	 YA1=2049; YA2=0; YA3=0;
-Yi=-1; Yj=-1; Yk=-1; /* init des indices de maille: maj par la boucle si valide*/
-#pragma omp parallel for 
-for(YY=YA1_Olap-1; YY>=0; --YY){
-  Yi=YY;
-{
-	 if (1==0 || Yi-1<0)
-	 Yting[0]=0; 
-	 else 
-	 Yting[0]=YW1_gama( Yi-1);
-	 if (1==0 || Yi-1<0)
-	 Yting[1]=0; 
-	 else 
-	 Yting[1]=YW2_gama( Yi-1);
-	 Yting[2]=YW1_gama( Yi);
-	 Yting[3]=YW2_gama( Yi);
-	 if (1==0 || Yi+1>YA1_Olap-1)
-	 Yting[4]=0; 
-	 else 
-	 Yting[4]=YW1_gama( Yi+1);
-	 if (1==0 || Yi+1>YA1_Olap-1)
-	 Yting[5]=0; 
-	 else 
-	 Yting[5]=YW2_gama( Yi+1);
-	 memset(Yjac, 0, 20*sizeof(double));
-	 Ylap(Yi)->backward( Yting[0], Yting[1], Yting[2], Yting[3], Yting[4], Yting[5] );
-	 Yvsmatt (YNBS_lap, YNBI_lap, YMAX_JAC_NBI, &YG1Y_lap, Yjac[0], Ytbeta);
-	 if (1==0 || Yi-1<0){} 
-	 else 
-	 #pragma omp atomic
-	 YG1_gama( Yi-1) += Ytbeta[0];
-	 if (1==0 || Yi-1<0){} 
-	 else 
-	 #pragma omp atomic
-	 YG2_gama( Yi-1) += Ytbeta[1];
-	 YG1_gama( Yi) += Ytbeta[2];
-	 YG2_gama( Yi) += Ytbeta[3];
-	 if (1==0 || Yi+1>YA1_Olap-1){} 
-	 else 
-	 #pragma omp atomic
-	 YG1_gama( Yi+1) += Ytbeta[4];
-	 if (1==0 || Yi+1>YA1_Olap-1){} 
-	 else 
-	 #pragma omp atomic
-	 YG2_gama( Yi+1) += Ytbeta[5];
-
-}
-}
-
-	 return(0);
-}
-
-int Yforward_traj_Tlu(int nbp)
-{
-	Ycurward=FORWARD;
-	 Yforward_space_Sac();
-	 return(0);
-}
-
-int Ybackward_traj_Tlu(int nbp)
-{
-	Ycurward=BACKWARD;
-	 Ybackward_space_Sac();
-	 return(0);
-}
-
-int Yforward_order()
-{
-	 Yforward_traj_Tlu(0);
-	 return(0);
-}
-
-int Ybackward_order()
-{
-	 Ybackward_traj_Tlu(0);
-	 return(0);
-}
-
-void Yforward_operator (char type) 
-{	
-	if ((YTabOpera[Yid_Olap].type==type || type=='*')  && YTabOpera[Yid_Olap].isactiv) Yforward_space_Olap();
-}
-void Ybackward_operator (char type) 
-{	
-	if ((YTabOpera[Yid_Olap].type==type || type=='*')  && YTabOpera[Yid_Olap].isactiv) Ybackward_space_Olap();
-}
-
-// € € € € € € € € LES FONCTIONS UTILISATEUR ... : 
-int Yuser_call (int argc, char *argv[]) 
-{
-	 int codret=1;
-	 if (strcmp(argv[0], "xdisplay") == 0)
-		 xdisplay();
-	 else if (strcmp(argv[0], "xset_init") == 0)
-		 xset_init();
-	 else if (strcmp(argv[0], "xnorme") == 0)
-		 xnorme();
-	 else if (strcmp(argv[0], "xgama0") == 0)
-		 xgama0(argc, argv);
-	 else if (strcmp(argv[0], "xset_deltazr") == 0)
-		 xset_deltazr(argc, argv);
-	 else if (strcmp(argv[0], "xset_c0") == 0)
-		 xset_c0(argc, argv);
-	 else if (strcmp(argv[0], "xset_freq") == 0)
-		 xset_freq(argc, argv);
-	 else if (strcmp(argv[0], "xset_tab_freq") == 0)
-		 xset_tab_freq(argc, argv);
-	 else if (strcmp(argv[0], "xset_zs") == 0)
-		 xset_zs(argc, argv);
-	 else if (strcmp(argv[0], "xset_fac") == 0)
-		 xset_fac(argc, argv);
-	 else if (strcmp(argv[0], "xset_gama") == 0)
-		 xset_gama(argc, argv);
-	 else if (strcmp(argv[0], "xcoef_OBS") == 0)
-		 xcoef_OBS(argc, argv);
-	 else codret=0;
-	 return(codret);
-}
-
-//-------------- end Yao generation -----------------
Index: trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/scriptPerformance.sh
===================================================================
--- trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/scriptPerformance.sh	(revision 402)
+++ trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/scriptPerformance.sh	(revision 403)
@@ -1,25 +1,23 @@
-%%% Lanciare matlab
+#!/bin/bash
+svn checkout svn+ssh://lnalod@forge.ipsl.jussieu.fr/ipsl/forge/projets/yao/svn/trunk /tmp/2010_performance
+cd /tmp/2010_performance/examples/berrada/MFLBC_RD_perfomanceMeasurement
 
 YaoI +O3 mflbc_rd
-
-/%% script che permette di aggiungere le linee di codice al file Yworkdir/Y2mflbc_rd.h %%/
+cp -f 2mflbc_rd.h Yworkdir/Y2mflbc_rd.h 
+# script che permette di aggiungere le linee di codice al file Yworkdir/Y2mflbc_rd.h fare forse poi%%/
 
 YaoI +O3 mflbc_rd > resultNotParallelFile.txt
-
-
-YaoI -p +O3 mflbc_rd
-
-/%% script che permette di aggiungere le linee di codice al file Yworkdir/Y2mflbc_rd.h %%/
-
 YaoI -p +O3 mflbc_rd > resultParallelFile.txt
 
 
-/%% Analisi resultNotParallelFile.txt e resultParallelFile.txt per tirare fuori:
-- le linee TimeForwardDifference
-- le linee TimeBackwardDifference 
-e fare la media sul secondo elemento di questa linea che è il tempo in double.
-%%/
-
-%%% Generare i grafici con Matlab
+# Analisi resultNotParallelFile.txt e resultParallelFile.txt per tirare fuori:
+#- le linee TimeForwardDifference
+#- le linee TimeBackwardDifference 
+#e fare la media sul secondo elemento di questa linea che è il tempo in double.
 
 
+# Generare i grafici con Matlab
+
+# Lanciare matlab
+matlab
+
