/*************************************************************************** module classe solsor_dynspg_flt.h - description ***************************************************************************/ // Mohamed Berrada // locean-ipsl.upmc, Paris, April 23, 2009 //=========================================================================== // methode forward forward () { if(Yt==TU) return; else{ if(Yi==0){ int t,jn,jj,ji, icount = 0,ncut=0,niter=0,ishift; niter=0;ncut=0; if(Yt==TU+1 && neuler==0) t=0; else t=1; //--------------------- //initialisation de gcx for(jj=0;jj=nmax-1) xtest("gcx__",gcx(28,3),28,3,0,Yt); icount = icount + 1; // ! test of convergence if( jn > nmin && (jn-nmin)%nmod == 0 ) { zres2=0.; for(jj=1;jj=nmax-1) xtest("gcx____",gcx(28,3),28,3,0,Yt); // ! indicator of non-convergence or explosion // IF( jn == nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2 if( ncut == 999 ) break; } // cout<<"niter="<=1;jn--){ // printf("BACK1=======YG_gcx_dynspg_flt(%d)=%23.16e\n",Yt,G_gcx(9,9)); // printf("BACK2=======YG_gcb_dynspg_flt(%d)=%23.16e\n",Yt,YG_gcb_dynspg_flt(0,9,9,Yt)); // BACK ! Guess red update for(jj=NY-2;jj>=1;jj--){ ishift = (jj-1)%2; istart=NX-2-(ishift-1)%2*(NX%2-1)%2-ishift*NX%2; for(ji=istart;ji>=1;ji-=2){ G_ztmp=G_gcx(ji,jj)*sor; G_gcx0(ji,jj)=G_gcx(ji,jj)*(1.-sor); YG_gcb_dynspg_flt(0,ji,jj,Yt)+=G_ztmp; G_gcx0(ji ,jj-1)+=- G_ztmp*gcp(ji,jj,0,t) ; G_gcx0(ji-1,jj )+=- G_ztmp*gcp(ji,jj,1,t) ; G_gcx0(ji+1,jj )+=- G_ztmp*gcp(ji,jj,2,t) ; G_gcx0(ji ,jj+1)+=- G_ztmp*gcp(ji,jj,3,t) ; } } // BACK ! Guess black update for(jj=NY-2;jj>=1;jj--){ ishift = jj%2; istart=NX-2-(ishift-1)%2*(NX%2-1)%2-ishift*NX%2; for(ji=istart;ji>=1;ji-=2){ G_ztmp=(G_gcx(ji,jj)+G_gcx0(ji,jj))*sor; G_gcx0(ji,jj)=(G_gcx(ji,jj)+G_gcx0(ji,jj))*(1.-sor); YG_gcb_dynspg_flt(0,ji,jj,Yt)+=G_ztmp; G_gcx0(ji ,jj-1)+=- G_ztmp*gcp(ji,jj,0,t) ; G_gcx0(ji-1,jj )+=- G_ztmp*gcp(ji,jj,1,t) ; G_gcx0(ji+1,jj )+=- G_ztmp*gcp(ji,jj,2,t) ; G_gcx0(ji ,jj+1)+=-G_ztmp* gcp(ji,jj,3,t) ; } } for(jj=0;jj