From 59b114be2bc45de7d0da29c10cb60b53cc1bd04c Mon Sep 17 00:00:00 2001 From: IvanMary Date: Mon, 2 Dec 2024 14:59:38 +0100 Subject: [PATCH 1/2] FastS: correction BC mineur pour generation auto --- Fast/FastS/FastS/BC/BCInflowFichSA_i.for | 3 +- Fast/FastS/FastS/BC/BCInflowFichSA_j.for | 3 +- Fast/FastS/FastS/BC/BCInflowFichSA_k.for | 3 +- Fast/FastS/FastS/BC/BCWallExchange_init.for | 26 ++++ Fast/FastS/FastS/BC/BCWallModelRhs_j.for | 2 +- Fast/FastS/FastS/BC/BCWallModelRhs_k.for | 2 +- Fast/FastS/FastS/BC/BCWallModel_init.for | 4 +- .../FastS/BC/BCWallViscous_transition.for | 2 + Fast/FastS/FastS/BC/bvbs_extrapolate.for | 19 ++- .../FastS/BC/bvbs_extrapolate_ransles.for | 19 ++- Fast/FastS/FastS/BC/bvbs_farfield.for | 22 ++-- Fast/FastS/FastS/BC/bvbs_inflow.for | 22 +++- Fast/FastS/FastS/BC/bvbs_inflow_fich.for | 19 ++- Fast/FastS/FastS/BC/bvbs_inflow_lund.for | 22 +++- Fast/FastS/FastS/BC/bvbs_inflow_newton.for | 19 ++- .../FastS/FastS/BC/bvbs_inflow_supersonic.for | 19 ++- .../FastS/BC/bvbs_inflow_supersonic_fich.for | 19 ++- Fast/FastS/FastS/BC/bvbs_injmfr.for | 19 ++- Fast/FastS/FastS/BC/bvbs_outflow.for | 19 ++- Fast/FastS/FastS/BC/bvbs_outmfr.for | 19 ++- Fast/FastS/FastS/BC/bvbs_outpres.for | 19 ++- Fast/FastS/FastS/BC/bvbs_periodique.for | 19 ++- Fast/FastS/FastS/BC/bvbs_wall_inviscid.for | 19 ++- .../FastS/FastS/BC/bvbs_wall_viscous_adia.for | 19 ++- .../FastS/BC/bvbs_wall_viscous_isothermal.for | 19 ++- .../FastS/BC/bvbs_wall_viscous_transition.for | 20 ++- Fast/FastS/FastS/BC/bvbs_wallexchange.for | 20 ++- Fast/FastS/FastS/BC/bvbs_wallmodel.for | 19 +-- Fast/FastS/FastS/BC/bvbs_wallmodel_rhs.for | 18 +-- Fast/FastS/FastS/BC/generate_Allbc.py | 3 +- Fast/FastS/FastS/BC/generate_bc.py | 89 ++++++------- Fast/FastS/FastS/BC/generate_bc.save | 119 ++++++++++++++++++ Fast/FastS/FastS/BC/mj_lund_planrecyl.for | 12 +- Fast/FastS/FastS/BC/mj_wallmodel_plan.for | 22 ++-- Fast/FastS/FastS/BC/template_bc.for | 16 +-- 35 files changed, 536 insertions(+), 179 deletions(-) create mode 100644 Fast/FastS/FastS/BC/BCWallExchange_init.for create mode 100644 Fast/FastS/FastS/BC/generate_bc.save diff --git a/Fast/FastS/FastS/BC/BCInflowFichSA_i.for b/Fast/FastS/FastS/BC/BCInflowFichSA_i.for index e7253d60..027c03c3 100644 --- a/Fast/FastS/FastS/BC/BCInflowFichSA_i.for +++ b/Fast/FastS/FastS/BC/BCInflowFichSA_i.for @@ -1,3 +1,2 @@ - li = indbci(j, k ) -#include "FastS/BC/BCInflowFich.for" +#include "FastS/BC/BCInflowFich_i.for" rop(l,6) = nutilde(li) diff --git a/Fast/FastS/FastS/BC/BCInflowFichSA_j.for b/Fast/FastS/FastS/BC/BCInflowFichSA_j.for index d494cd02..eaa1db3d 100644 --- a/Fast/FastS/FastS/BC/BCInflowFichSA_j.for +++ b/Fast/FastS/FastS/BC/BCInflowFichSA_j.for @@ -1,3 +1,2 @@ - li = indbci(i, k ) -#include "FastS/BC/BCInflowFich.for" +#include "FastS/BC/BCInflowFich_j.for" rop(l,6) = nutilde(li) diff --git a/Fast/FastS/FastS/BC/BCInflowFichSA_k.for b/Fast/FastS/FastS/BC/BCInflowFichSA_k.for index fc746864..c0ecfa85 100644 --- a/Fast/FastS/FastS/BC/BCInflowFichSA_k.for +++ b/Fast/FastS/FastS/BC/BCInflowFichSA_k.for @@ -1,3 +1,2 @@ - li = indbci(i, j ) -#include "FastS/BC/BCInflowFich.for" +#include "FastS/BC/BCInflowFich_k.for" rop(l,6) = nutilde(li) diff --git a/Fast/FastS/FastS/BC/BCWallExchange_init.for b/Fast/FastS/FastS/BC/BCWallExchange_init.for new file mode 100644 index 00000000..e31eb832 --- /dev/null +++ b/Fast/FastS/FastS/BC/BCWallExchange_init.for @@ -0,0 +1,26 @@ + sampling = param_int(WM_SAMPLING) + sample = param_int(WM_SAMPLING) + + exchange = 1 - sampling ! index correction for identifying the correct cell + + sens_int = 1 + shift = 0 + if(mod(idir,2).eq.0) then + sens_int = -1 + shift = 1 + exchange = -exchange + endif + + shiftvent = param_int(NIJK_VENT + idir/2)* exchange + + if(idir.le.2) then + incijk=1 + elseif(idir.le.4) then + incijk=param_int(NIJK) + else + incijk=param_int(NIJK+1)*param_int(NIJK) + endif + shift =incijk*shift + + exchange =incijk*exchange + shift_loo= 2 diff --git a/Fast/FastS/FastS/BC/BCWallModelRhs_j.for b/Fast/FastS/FastS/BC/BCWallModelRhs_j.for index ae3bff9e..74d55f19 100644 --- a/Fast/FastS/FastS/BC/BCWallModelRhs_j.for +++ b/Fast/FastS/FastS/BC/BCWallModelRhs_j.for @@ -1,3 +1,3 @@ - ldjr = inddm( ir , j, k ) + ldjr = inddm( i , jr, k ) diff --git a/Fast/FastS/FastS/BC/BCWallModelRhs_k.for b/Fast/FastS/FastS/BC/BCWallModelRhs_k.for index ae3bff9e..f7f141a4 100644 --- a/Fast/FastS/FastS/BC/BCWallModelRhs_k.for +++ b/Fast/FastS/FastS/BC/BCWallModelRhs_k.for @@ -1,3 +1,3 @@ - ldjr = inddm( ir , j, k ) + ldjr = inddm( i, j, kr ) diff --git a/Fast/FastS/FastS/BC/BCWallModel_init.for b/Fast/FastS/FastS/BC/BCWallModel_init.for index f82c8af2..040b7611 100644 --- a/Fast/FastS/FastS/BC/BCWallModel_init.for +++ b/Fast/FastS/FastS/BC/BCWallModel_init.for @@ -2,17 +2,14 @@ exchange = 1 - sampling ! index correction for identifying the correct cell - sens = 1. sens_int = 1 shift = 0 if(mod(idir,2).eq.0) then - sens = -1. sens_int = -1 shift = 1 exchange = -exchange endif - shift =incijk*shift shiftvent = param_int(NIJK_VENT + idir/2)* exchange if(idir.le.2) then @@ -22,6 +19,7 @@ else incijk=param_int(NIJK+1)*param_int(NIJK) endif + shift =incijk*shift exchange =incijk*exchange shift_loo= 2 diff --git a/Fast/FastS/FastS/BC/BCWallViscous_transition.for b/Fast/FastS/FastS/BC/BCWallViscous_transition.for index b44e2870..74ded5ee 100644 --- a/Fast/FastS/FastS/BC/BCWallViscous_transition.for +++ b/Fast/FastS/FastS/BC/BCWallViscous_transition.for @@ -15,6 +15,8 @@ lambdaz_transi = 2. ampli_transi = 0.0005 + pi = 4*atan(1.) + if(zlong_transi.eq.0.0) then zlong=abs( z( indcg(ind_loop(1),1, 1 ) ) & -z( indcg(ind_loop(1),1, param_int(IJKV+2)+1) ) ) diff --git a/Fast/FastS/FastS/BC/bvbs_extrapolate.for b/Fast/FastS/FastS/BC/bvbs_extrapolate.for index c3bca262..93977d93 100644 --- a/Fast/FastS/FastS/BC/bvbs_extrapolate.for +++ b/Fast/FastS/FastS/BC/bvbs_extrapolate.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCExtrapolate_init.for" diff --git a/Fast/FastS/FastS/BC/bvbs_extrapolate_ransles.for b/Fast/FastS/FastS/BC/bvbs_extrapolate_ransles.for index c526404b..9cb720bb 100644 --- a/Fast/FastS/FastS/BC/bvbs_extrapolate_ransles.for +++ b/Fast/FastS/FastS/BC/bvbs_extrapolate_ransles.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCExtrapolateRansLes_init.for" diff --git a/Fast/FastS/FastS/BC/bvbs_farfield.for b/Fast/FastS/FastS/BC/bvbs_farfield.for index c9791040..013ea004 100644 --- a/Fast/FastS/FastS/BC/bvbs_farfield.for +++ b/Fast/FastS/FastS/BC/bvbs_farfield.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCFarfield_init.for" @@ -315,7 +326,6 @@ C... Parametre specific a la CL(insert2) else - do k = ind_loop(5), ind_loop(6) j = ind_loop(3) @@ -332,7 +342,6 @@ C... Parametre specific a la CL(insert2) l = inddm( i, j , k ) ldp = indven( i, ind_loop(3) , k ) !next rank lmtr = indmtr( i, ind_loop(3) , k ) !next rank - #include "FastS/BC/BC_nextrankSA_j.for" enddo enddo !j @@ -340,7 +349,6 @@ C... Parametre specific a la CL(insert2) endif !param_int(NEQ) - ELSEIF (idir.eq.5) THEN kref = 2*ind_loop(6) + 1 diff --git a/Fast/FastS/FastS/BC/bvbs_inflow.for b/Fast/FastS/FastS/BC/bvbs_inflow.for index 75dbb430..60da9c6e 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -80,7 +83,7 @@ C Var local c write(*,*)'idir=', idir,nijk(4),nijk(5),ndimdx c write(*,*)'nijk=', nijk -c write(*,*)'loop inflow=', ind_loop +c write(*,*)'loop vis=', ind_loop c......determine la forme des tableau metrique en fonction de la nature du domaine @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCInflow_init.for" @@ -149,7 +160,6 @@ C... Parametre specific a la CL(insert2) i = ind_loop(2) l = inddm( i , j, k ) - ldp = indven( ind_loop(2)+1 , j, k ) lmtr = indmtr( ind_loop(2)+1 , j, k ) #include "FastS/BC/BCInflow_i.for" diff --git a/Fast/FastS/FastS/BC/bvbs_inflow_fich.for b/Fast/FastS/FastS/BC/bvbs_inflow_fich.for index 634f6185..9c65cff5 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow_fich.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow_fich.for @@ -55,11 +55,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E ux(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -82,7 +84,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -104,7 +107,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -116,6 +123,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -145,6 +154,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_inflow_lund.for b/Fast/FastS/FastS/BC/bvbs_inflow_lund.for index e6a945ef..e561746b 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow_lund.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow_lund.for @@ -69,11 +69,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E rho_in(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -96,7 +98,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -110,6 +113,7 @@ c write(*,*)'idir=', idir,nijk(4),nijk(5),ndimdx c write(*,*)'nijk=', nijk c write(*,*)'loop vis=', ind_loop + c......determine la forme des tableau metrique en fonction de la nature du domaine !Seule la valeur de k_vent et ck_vent a un sens dans cet appel call shape_tab_mtr(neq_mtr, param_int, idir, @@ -117,7 +121,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -129,6 +137,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -152,12 +162,13 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & /(ro_state*param_real(CVINF)) if (param_int(NEQ).eq.6) nut_state = state(6)/state(1) - c0 = 1./c6 c1 =-(c4 + c5)*c0 c2 =- c6*c0 c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + #include "FastS/BC/BCInflowLund_init.for" C... Parametre specific a la CL(insert2) @@ -169,6 +180,7 @@ C... Parametre specific a la CL(insert2) incp = param_int(IJKV)*inci ir = ind_loop(2) + 1 + if(param_int(NEQ).eq.5) then do k = ind_loop(5), ind_loop(6) diff --git a/Fast/FastS/FastS/BC/bvbs_inflow_newton.for b/Fast/FastS/FastS/BC/bvbs_inflow_newton.for index adf6f3e7..16011e73 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow_newton.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow_newton.for @@ -55,11 +55,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E d0x(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -82,7 +84,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -104,7 +107,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -116,6 +123,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -145,6 +154,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_inflow_supersonic.for b/Fast/FastS/FastS/BC/bvbs_inflow_supersonic.for index 0a81e61c..ad76b5aa 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow_supersonic.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow_supersonic.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_inflow_supersonic_fich.for b/Fast/FastS/FastS/BC/bvbs_inflow_supersonic_fich.for index 07509161..55377f5c 100644 --- a/Fast/FastS/FastS/BC/bvbs_inflow_supersonic_fich.for +++ b/Fast/FastS/FastS/BC/bvbs_inflow_supersonic_fich.for @@ -55,11 +55,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E rofich(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -82,7 +84,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -104,7 +107,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -116,6 +123,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -145,6 +154,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_injmfr.for b/Fast/FastS/FastS/BC/bvbs_injmfr.for index 4d165235..fd8c58d0 100644 --- a/Fast/FastS/FastS/BC/bvbs_injmfr.for +++ b/Fast/FastS/FastS/BC/bvbs_injmfr.for @@ -55,11 +55,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E d0x(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -82,7 +84,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -104,7 +107,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -116,6 +123,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -145,6 +154,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_outflow.for b/Fast/FastS/FastS/BC/bvbs_outflow.for index 8f220394..700df3b2 100644 --- a/Fast/FastS/FastS/BC/bvbs_outflow.for +++ b/Fast/FastS/FastS/BC/bvbs_outflow.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_outmfr.for b/Fast/FastS/FastS/BC/bvbs_outmfr.for index 810c1e1f..5852b298 100644 --- a/Fast/FastS/FastS/BC/bvbs_outmfr.for +++ b/Fast/FastS/FastS/BC/bvbs_outmfr.for @@ -45,11 +45,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E qp(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -72,7 +74,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -94,7 +97,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -106,6 +113,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -135,6 +144,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_outpres.for b/Fast/FastS/FastS/BC/bvbs_outpres.for index 6aefdf64..a0be4e47 100644 --- a/Fast/FastS/FastS/BC/bvbs_outpres.for +++ b/Fast/FastS/FastS/BC/bvbs_outpres.for @@ -45,11 +45,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E pext(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -72,7 +74,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -94,7 +97,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -106,6 +113,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -135,6 +144,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_periodique.for b/Fast/FastS/FastS/BC/bvbs_periodique.for index 57825209..e55455c3 100644 --- a/Fast/FastS/FastS/BC/bvbs_periodique.for +++ b/Fast/FastS/FastS/BC/bvbs_periodique.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCPeriodic_init.for" diff --git a/Fast/FastS/FastS/BC/bvbs_wall_inviscid.for b/Fast/FastS/FastS/BC/bvbs_wall_inviscid.for index 77f8211b..84ec7047 100644 --- a/Fast/FastS/FastS/BC/bvbs_wall_inviscid.for +++ b/Fast/FastS/FastS/BC/bvbs_wall_inviscid.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_wall_viscous_adia.for b/Fast/FastS/FastS/BC/bvbs_wall_viscous_adia.for index 1fe4abd1..536367c6 100644 --- a/Fast/FastS/FastS/BC/bvbs_wall_viscous_adia.for +++ b/Fast/FastS/FastS/BC/bvbs_wall_viscous_adia.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_wall_viscous_isothermal.for b/Fast/FastS/FastS/BC/bvbs_wall_viscous_isothermal.for index cc011a07..44c93fa1 100644 --- a/Fast/FastS/FastS/BC/bvbs_wall_viscous_isothermal.for +++ b/Fast/FastS/FastS/BC/bvbs_wall_viscous_isothermal.for @@ -45,11 +45,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E tw(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -72,7 +74,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -94,7 +97,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -106,6 +113,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -135,6 +144,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_wall_viscous_transition.for b/Fast/FastS/FastS/BC/bvbs_wall_viscous_transition.for index 1cceec97..163fcdc5 100644 --- a/Fast/FastS/FastS/BC/bvbs_wall_viscous_transition.for +++ b/Fast/FastS/FastS/BC/bvbs_wall_viscous_transition.for @@ -45,11 +45,13 @@ C... Valeurs des grandeurs thermo imposees (insert1) REAL_E random(size_data) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -72,7 +74,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -86,6 +89,7 @@ c write(*,*)'idir=', idir,nijk(4),nijk(5),ndimdx c write(*,*)'nijk=', nijk c write(*,*)'loop vis=', ind_loop + c......determine la forme des tableau metrique en fonction de la nature du domaine !Seule la valeur de k_vent et ck_vent a un sens dans cet appel call shape_tab_mtr(neq_mtr, param_int, idir, @@ -93,7 +97,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -105,6 +113,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -134,6 +144,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_wallexchange.for b/Fast/FastS/FastS/BC/bvbs_wallexchange.for index c5bd6e53..75b99435 100644 --- a/Fast/FastS/FastS/BC/bvbs_wallexchange.for +++ b/Fast/FastS/FastS/BC/bvbs_wallexchange.for @@ -41,11 +41,13 @@ c*********************************************************************** C... Valeurs des grandeurs thermo imposees (insert1) C Var local - INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp, + INTEGER_E inc2,inc3,li1,li2,l,iref,jref,kref,lij,lr,lp,sens_int, & njf,nkf,ldjr,ic,jc,kc,i,j,k,li3,ldp,kc_vent,ijkplanrec,idirlund, & ijk_amor,kshift,jshift, ishift,ci_amor,cj_amor,ck_amor,nijk, & iamor,jamor,inci,incj,inck,lmtr,li,l1,l2,l0,nitnwt,newtonmax, - & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp + & ldx,lx,ldnm,ldnp,ldl,ir,jr,kr,lsample,sample,m,iter,lghost,incp, + & shift_loo,exchange, shift,shiftvent,incijk, sampling, + & loo,ltg,iadrf, mvent REAL_E ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale,tcx,tcy,tcz, @@ -68,7 +70,8 @@ C Var local & cv1,tol,cp,ro_state,u_state,v_state,w_state,t_state,nut_state, & expy,nutcible,nu,a,q,ap,bp,dp,delta,delta0,delta1, & y1,y2,z1,p1,p2,kappa,superdelta,root,b0,cmus1,temp01,coesut, - & c0_2,coefa,coefb,coefc,mach,clund, amor + & c0_2,coefa,coefb,coefc,mach,clund, amor, text, uext,tt_ext, + & cpinv,t1,utau2,tauw,e1,e2,e3, mu_w #include "FastS/formule_param.h" @@ -90,7 +93,11 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. if(mod(idir,2).eq.0) snorm = 1. @@ -102,6 +109,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai rgp = param_real(CVINF)*gam1 cv = param_real( CVINF ) cvinv = 1./cv + cpinv = 1./(gam*cv) + prandlt = param_real( PRANDT ) cmus1 = param_real( CS ) @@ -131,7 +140,10 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) +#include "FastS/BC/BCWallExchange_init.for" IF (idir.eq.1) THEN diff --git a/Fast/FastS/FastS/BC/bvbs_wallmodel.for b/Fast/FastS/FastS/BC/bvbs_wallmodel.for index 72bd6afc..a3ecd786 100644 --- a/Fast/FastS/FastS/BC/bvbs_wallmodel.for +++ b/Fast/FastS/FastS/BC/bvbs_wallmodel.for @@ -54,7 +54,7 @@ C Var local & ventx,venty,ventz,r,u,v,w,ut,vt,wt,ua,va,wa,s_1,qn REAL_E ro,t,nut,c6inv,c0,c1,c2,c3,c7,roe,rue,rve,rwe,ete, & qref1,qref2,qref3,qref4,qref5,p,c,snorm, nue, gam1,gam2, - & gam1_1,gam,cvinv,rho_w,vmax,sens, + & gam1_1,gam,cvinv,rho_w,vmax, & sni,tn,qen,eigv1,eigv2,eigv3,eigv4, & eigv5,qvar1,qvar2,qvar3,qvar4,qvar5,svar1,svar2,svar3, & svar4,svar5,rvar1,rvar2,rvar3,rvar4,rvar5, @@ -93,14 +93,14 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. - sens =1 - if(mod(idir,2).eq.0) then - snorm = 1. - sens =-1 - endif + if(mod(idir,2).eq.0) snorm = 1. gam = param_real(GAMMA) gam1 = param_real(GAMMA) - 1. @@ -140,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) #include "FastS/BC/BCWallModel_init.for" @@ -268,8 +270,8 @@ C... Parametre specific a la CL(insert2) enddo !k else - do k = ind_loop(5), ind_loop(6) + do k = ind_loop(5), ind_loop(6) j = ind_loop(4) !DEC$ IVDEP @@ -324,7 +326,6 @@ C... Parametre specific a la CL(insert2) else - do k = ind_loop(5), ind_loop(6) j = ind_loop(3) diff --git a/Fast/FastS/FastS/BC/bvbs_wallmodel_rhs.for b/Fast/FastS/FastS/BC/bvbs_wallmodel_rhs.for index 07be2028..3a2a1c8c 100644 --- a/Fast/FastS/FastS/BC/bvbs_wallmodel_rhs.for +++ b/Fast/FastS/FastS/BC/bvbs_wallmodel_rhs.for @@ -54,7 +54,7 @@ C Var local & ventx,venty,ventz,r,u,v,w,ut,vt,wt,ua,va,wa,s_1,qn REAL_E ro,t,nut,c6inv,c0,c1,c2,c3,c7,roe,rue,rve,rwe,ete, & qref1,qref2,qref3,qref4,qref5,p,c,snorm, nue, gam1,gam2, - & gam1_1,gam,cvinv,rho_w,vmax,sens, + & gam1_1,gam,cvinv,rho_w,vmax, & sni,tn,qen,eigv1,eigv2,eigv3,eigv4, & eigv5,qvar1,qvar2,qvar3,qvar4,qvar5,svar1,svar2,svar3, & svar4,svar5,rvar1,rvar2,rvar3,rvar4,rvar5, @@ -93,14 +93,14 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. - sens =1 - if(mod(idir,2).eq.0) then - snorm = 1. - sens =-1 - endif + if(mod(idir,2).eq.0) snorm = 1. gam = param_real(GAMMA) gam1 = param_real(GAMMA) - 1. @@ -140,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN @@ -284,7 +286,7 @@ C... Parametre specific a la CL(insert2) l = inddm( i, j , k ) ldp = indven( i, ind_loop(4)+1 , k ) !next rank lmtr = indmtr( i, ind_loop(4)+1 , k ) !next rank -!!#include "FastS/BC/BCWallModelRhsSA_j.for" +#include "FastS/BC/BCWallModelRhsSA_j.for" enddo enddo !j enddo !k diff --git a/Fast/FastS/FastS/BC/generate_Allbc.py b/Fast/FastS/FastS/BC/generate_Allbc.py index 560fd0d8..a1a267ef 100644 --- a/Fast/FastS/FastS/BC/generate_Allbc.py +++ b/Fast/FastS/FastS/BC/generate_Allbc.py @@ -5,6 +5,7 @@ BC=["BCWallViscous","BCWallViscousIsothermal","BCWallViscous_transition","BCWallInviscid","BCWallModel","BCInj1","BCOutMFR"] BC.append("BCInjMFR") BC.append("BCWallExchange") +BC.append("BCWallModelRhs") BC.append("BCOutpres") BC.append("BCInflowSupersonic") BC.append("BCInflowSupersonicFich") @@ -19,6 +20,6 @@ for bc in BC: - cmd='python generate_bc.py'+' '+bc + cmd='python3 generate_bc.py'+' '+bc print(cmd) os.system(cmd) diff --git a/Fast/FastS/FastS/BC/generate_bc.py b/Fast/FastS/FastS/BC/generate_bc.py index 91c7c13d..8eb0fb05 100644 --- a/Fast/FastS/FastS/BC/generate_bc.py +++ b/Fast/FastS/FastS/BC/generate_bc.py @@ -9,8 +9,8 @@ LundVar=[] for plan in ['_in','_planlund']: - for v in ['rho','u','v','w','t','nut']: - LundVar.append(v+plan) + for v in ['rho','u','v','w','t','nut']: + LundVar.append(v+plan) LundVar.append('lund_param') dico= {} @@ -23,7 +23,7 @@ dico["BCInj1"] = {'name':'bvbs_inflow_newton' ,'BCname':'BCInj1' ,'dataVars':['d0x','d0y','d0z','pa','ha','nuext'] , 'nextrank':'BC_nextrank', 'Init':'no'} dico["BCOutMFR"] = {'name':'bvbs_outmfr' ,'BCname':'BCOutMFR' ,'dataVars':['qp'] , 'nextrank':'BC_extrap' , 'Init':'no'} dico["BCInjMFR"] = {'name':'bvbs_injmfr' ,'BCname':'BCInjMFR' ,'dataVars':['d0x','d0y','d0z','qp','ha','nuext'] , 'nextrank':'BC_nextrank', 'Init':'no'} -dico["BCWallExchange"] = {'name':'bvbs_wallexchange' ,'BCname':'BCWallExchange' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'no'} +dico["BCWallExchange"] = {'name':'bvbs_wallexchange' ,'BCname':'BCWallExchange' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} dico["BCOutpres"] = {'name':'bvbs_outpres' ,'BCname':'BCOutpres' ,'dataVars':['pext'] , 'nextrank':'BC_extrap' , 'Init':'no'} dico["BCInflowSupersonic"] = {'name':'bvbs_inflow_supersonic' ,'BCname':'BCInflowSupersonic' ,'dataVars':[] , 'nextrank':'BC_nextrank', 'Init':'no'} dico["BCInflowSupersonicFich"] = {'name':'bvbs_inflow_supersonic_fich' ,'BCname':'BCInflowSupersonicFich' ,'dataVars':['rofich','rufich','rvfich','rwfich','refich','ronutfich'] , 'nextrank':'BC_nextrank', 'Init':'no'} @@ -46,7 +46,7 @@ bcname = dico[ bc ]['BCname'] nextrank = dico[ bc ]['nextrank'] Init = dico[ bc ]['Init'] - + # ouvrir le fichier input @@ -55,64 +55,65 @@ for i in range( len(lines) ): - lines[i]=lines[i].replace("bvbs_template", name) - if 'insert0' in lines[i]: - c_insert0=i+1 - if 'insert1' in lines[i]: - c_insert1=i+1 - if 'insert2' in lines[i]: - c_insert2=i+1 + lines[i]=lines[i].replace("bvbs_template", name) + if 'insert0' in lines[i]: + c_insert0=i+1 + if 'insert1' in lines[i]: + c_insert1=i+1 + if 'insert2' in lines[i]: + c_insert2=i+1 linsert=False outline0=' & ,' c=0 for var in vars: - #outline0+=var+' ,' - outline0=' & ,'+var+' \n' - lines.insert(c_insert0,outline0) - c_insert0+=1 - c_insert1+=1 - c_insert2+=1 - outline1=' REAL_E '+var+'(size_data) \n' - lines.insert(c_insert1,outline1) - c_insert2+=1 - linsert=True - c+=1 + #outline0+=var+' ,' + outline0=' & ,'+var+' \n' + lines.insert(c_insert0,outline0) + c_insert0+=1 + c_insert1+=1 + c_insert2+=1 + outline1=' REAL_E '+var+'(size_data) \n' + lines.insert(c_insert1,outline1) + c_insert2+=1 + linsert=True + c+=1 if linsert: - lines.insert(c_insert0,' & ,size_data, inc_bc \n') - lines.insert(c_insert1,' INTEGER_E size_data, indbci, inc_bc(3) \n') + lines.insert(c_insert0,' & ,size_data, inc_bc \n') + lines.insert(c_insert1,' INTEGER_E size_data, indbci, inc_bc(3) \n') else: - for i in range( len(lines) ): - if " indbci(j_1,k_1) = 1 + (j" in lines[i]: - lines[i]=lines[i].replace(" indbci(j_1,k_1) = 1 + (j_1-inc_bc(2)) + (k_1-inc_bc(3))*inc_bc(1)","" ) - + for i in range( len(lines) ): + if " indbci(j_1,k_1) = 1 + (j" in lines[i]: + lines[i]=lines[i].replace(" indbci(j_1,k_1) = 1 + (j_1-inc_bc(2)) + (k_1-inc_bc(3))*inc_bc(1)","" ) + if Init =='yes': - include ='#include "FastS/BC/'+bcname+'_init.for" \n' - lines.insert(c_insert2, include) + include ='#include "FastS/BC/'+bcname+'_init.for" \n' + lines.insert(c_insert2, include) -fout = dico[ bcname ]['name']+'.for' +fout = dico[ bcname ]['name']+'.for' fo = open(fout,"w") # ouvrir le fichier de sortie print(bcname,' Scheme: file',fout, 'generated') lines_del=[] for i in range( len(lines) ): - if "BCTarget" in lines[i]: - new_bc = bcname - if 'next rank' in lines[i] and nextrank !='vide': new_bc=nextrank - lines[i]=lines[i].replace("BCTarget", new_bc) - if new_bc !='vide': - lines[i]=lines[i].replace(" !next rank", '') - #lines_del.append(i-2) - #lines_del.append(i-1) - else: - lines[i]=lines[i].replace(" !next rank", '') + if "BCTarget" in lines[i]: + new_bc = bcname + if 'next rank' in lines[i] and nextrank !='vide': new_bc=nextrank + lines[i]=lines[i].replace("BCTarget", new_bc) + if new_bc !='vide': + lines[i]=lines[i].replace(" !next rank", '') + #lines_del.append(i-2) + #lines_del.append(i-1) + else: + lines[i]=lines[i].replace(" !next rank", '') c=0 for i in lines_del: - print(i), len(lines) - del lines[i-c] - c+=1 + print(i), len(lines) + del lines[i-c] + c+=1 for l in lines: fo.write(l) fo.close() # fermer le fichier output global + diff --git a/Fast/FastS/FastS/BC/generate_bc.save b/Fast/FastS/FastS/BC/generate_bc.save new file mode 100644 index 00000000..8eb0fb05 --- /dev/null +++ b/Fast/FastS/FastS/BC/generate_bc.save @@ -0,0 +1,119 @@ +#!/usr/bin/env python +import sys + +# python generate_correction.py repertoire_flux +n = len(sys.argv) +if n != 2: + print('Flux name folder is required as argument: python generate_flu.py fluxFolder') + sys.exit() + +LundVar=[] +for plan in ['_in','_planlund']: + for v in ['rho','u','v','w','t','nut']: + LundVar.append(v+plan) +LundVar.append('lund_param') + +dico= {} +dico["BCWallViscous"] = {'name':'bvbs_wall_viscous_adia' ,'BCname':'BCWallViscous' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'no'} +dico["BCWallViscousIsothermal"] = {'name':'bvbs_wall_viscous_isothermal' ,'BCname':'BCWallViscousIsothermal' ,'dataVars':['tw'] , 'nextrank':'vide' , 'Init':'no'} +dico["BCWallViscous_transition"]= {'name':'bvbs_wall_viscous_transition' ,'BCname':'BCWallViscous_transition','dataVars':['random'] , 'nextrank':'vide' , 'Init':'no'} +dico["BCWallInviscid"] = {'name':'bvbs_wall_inviscid' ,'BCname':'BCWallInviscid' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'no'} +dico["BCWallModel"] = {'name':'bvbs_wallmodel' ,'BCname':'BCWallModel' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} +dico["BCWallModelRhs"] = {'name':'bvbs_wallmodel_rhs' ,'BCname':'BCWallModelRhs' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'no'} +dico["BCInj1"] = {'name':'bvbs_inflow_newton' ,'BCname':'BCInj1' ,'dataVars':['d0x','d0y','d0z','pa','ha','nuext'] , 'nextrank':'BC_nextrank', 'Init':'no'} +dico["BCOutMFR"] = {'name':'bvbs_outmfr' ,'BCname':'BCOutMFR' ,'dataVars':['qp'] , 'nextrank':'BC_extrap' , 'Init':'no'} +dico["BCInjMFR"] = {'name':'bvbs_injmfr' ,'BCname':'BCInjMFR' ,'dataVars':['d0x','d0y','d0z','qp','ha','nuext'] , 'nextrank':'BC_nextrank', 'Init':'no'} +dico["BCWallExchange"] = {'name':'bvbs_wallexchange' ,'BCname':'BCWallExchange' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} +dico["BCOutpres"] = {'name':'bvbs_outpres' ,'BCname':'BCOutpres' ,'dataVars':['pext'] , 'nextrank':'BC_extrap' , 'Init':'no'} +dico["BCInflowSupersonic"] = {'name':'bvbs_inflow_supersonic' ,'BCname':'BCInflowSupersonic' ,'dataVars':[] , 'nextrank':'BC_nextrank', 'Init':'no'} +dico["BCInflowSupersonicFich"] = {'name':'bvbs_inflow_supersonic_fich' ,'BCname':'BCInflowSupersonicFich' ,'dataVars':['rofich','rufich','rvfich','rwfich','refich','ronutfich'] , 'nextrank':'BC_nextrank', 'Init':'no'} +dico["BCInflowLund"] = {'name':'bvbs_inflow_lund' ,'BCname':'BCInflowLund' ,'dataVars':LundVar , 'nextrank':'BC_nextrank', 'Init':'yes'} +dico["BCInflowFich"] = {'name':'bvbs_inflow_fich' ,'BCname':'BCInflowFich' ,'dataVars':['ux','uy','uz','dens','temp','nutilde'] , 'nextrank':'BC_nextrank', 'Init':'no'} +dico["BCInflow"] = {'name':'bvbs_inflow' ,'BCname':'BCInflow' ,'dataVars':[] , 'nextrank':'BC_nextrank', 'Init':'yes'} +dico["BCOutflow"] = {'name':'bvbs_outflow' ,'BCname':'BCOutflow' ,'dataVars':[] , 'nextrank':'BC_extrap' , 'Init':'no'} +dico["BCFarfield"] = {'name':'bvbs_farfield' ,'BCname':'BCFarfield' ,'dataVars':[] , 'nextrank':'BC_nextrank', 'Init':'yes'} +dico["BCExtrapolate"] = {'name':'bvbs_extrapolate' ,'BCname':'BCExtrapolate' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} +dico["BCExtrapolateRansLes"] = {'name':'bvbs_extrapolate_ransles' ,'BCname':'BCExtrapolateRansLes' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} +dico["BCPeriodic"] = {'name':'bvbs_periodique' ,'BCname':'BCPeriodic' ,'dataVars':[] , 'nextrank':'vide' , 'Init':'yes'} + +bc = sys.argv[1] +if bc not in dico: + print('BC not described in the dictionnary') + sys.exit() + +vars = dico[ bc ]['dataVars'] +name = dico[ bc ]['name'] +bcname = dico[ bc ]['BCname'] +nextrank = dico[ bc ]['nextrank'] +Init = dico[ bc ]['Init'] + + + +# ouvrir le fichier input +f = open('template_bc.for','r') +lines = f.readlines() + + +for i in range( len(lines) ): + lines[i]=lines[i].replace("bvbs_template", name) + if 'insert0' in lines[i]: + c_insert0=i+1 + if 'insert1' in lines[i]: + c_insert1=i+1 + if 'insert2' in lines[i]: + c_insert2=i+1 + +linsert=False +outline0=' & ,' +c=0 +for var in vars: + #outline0+=var+' ,' + outline0=' & ,'+var+' \n' + lines.insert(c_insert0,outline0) + c_insert0+=1 + c_insert1+=1 + c_insert2+=1 + outline1=' REAL_E '+var+'(size_data) \n' + lines.insert(c_insert1,outline1) + c_insert2+=1 + linsert=True + c+=1 + +if linsert: + lines.insert(c_insert0,' & ,size_data, inc_bc \n') + lines.insert(c_insert1,' INTEGER_E size_data, indbci, inc_bc(3) \n') +else: + for i in range( len(lines) ): + if " indbci(j_1,k_1) = 1 + (j" in lines[i]: + lines[i]=lines[i].replace(" indbci(j_1,k_1) = 1 + (j_1-inc_bc(2)) + (k_1-inc_bc(3))*inc_bc(1)","" ) + +if Init =='yes': + include ='#include "FastS/BC/'+bcname+'_init.for" \n' + lines.insert(c_insert2, include) + +fout = dico[ bcname ]['name']+'.for' +fo = open(fout,"w") # ouvrir le fichier de sortie +print(bcname,' Scheme: file',fout, 'generated') + +lines_del=[] +for i in range( len(lines) ): + if "BCTarget" in lines[i]: + new_bc = bcname + if 'next rank' in lines[i] and nextrank !='vide': new_bc=nextrank + lines[i]=lines[i].replace("BCTarget", new_bc) + if new_bc !='vide': + lines[i]=lines[i].replace(" !next rank", '') + #lines_del.append(i-2) + #lines_del.append(i-1) + else: + lines[i]=lines[i].replace(" !next rank", '') + +c=0 +for i in lines_del: + print(i), len(lines) + del lines[i-c] + c+=1 + +for l in lines: fo.write(l) +fo.close() # fermer le fichier output global + diff --git a/Fast/FastS/FastS/BC/mj_lund_planrecyl.for b/Fast/FastS/FastS/BC/mj_lund_planrecyl.for index 00066940..9da656e4 100644 --- a/Fast/FastS/FastS/BC/mj_lund_planrecyl.for +++ b/Fast/FastS/FastS/BC/mj_lund_planrecyl.for @@ -89,7 +89,7 @@ c Var loc IF (idir.le.2) THEN i = ind_loop(2) -#include "FastS/Compute/loopPlanI_begin.for" +#include "FastC/HPC_LAYER/loopPlanI_begin.for" li = indbci(j, k ) rof2(li,1) = rop(l,1)*cn + cnm*rof2(li,1) @@ -97,11 +97,11 @@ c Var loc rof2(li,3) = rop(l,3)*cn + cnm*rof2(li,3) rof2(li,4) = rop(l,4)*cn + cnm*rof2(li,4) rof2(li,5) = rop(l,5)*cn + cnm*rof2(li,5) -#include "FastS/Compute/loopPlan_end.for" +#include "FastC/HPC_LAYER/loopPlan_end.for" ELSEIF (idir.le.4) THEN j = ind_loop(4) -#include "FastS/Compute/loopPlanJ_begin.for" +#include "FastC/HPC_LAYER/loopPlanJ_begin.for" li = indbci(i, k ) rof2(li,1) = rop(l,1)*cn + cnm*rof2(li,1) @@ -109,10 +109,10 @@ c Var loc rof2(li,3) = rop(l,3)*cn + cnm*rof2(li,3) rof2(li,4) = rop(l,4)*cn + cnm*rof2(li,4) rof2(li,5) = rop(l,5)*cn + cnm*rof2(li,5) -#include "FastS/Compute/loopPlan_end.for" +#include "FastC/HPC_LAYER/loopPlan_end.for" ELSE k = ind_loop(6) -#include "FastS/Compute/loopPlanK_begin.for" +#include "FastC/HPC_LAYER/loopPlanK_begin.for" li = indbci(i, j ) rof2(li,1) = rop(l,1)*cn + cnm*rof2(li,1) @@ -120,7 +120,7 @@ c Var loc rof2(li,3) = rop(l,3)*cn + cnm*rof2(li,3) rof2(li,4) = rop(l,4)*cn + cnm*rof2(li,4) rof2(li,5) = rop(l,5)*cn + cnm*rof2(li,5) -#include "FastS/Compute/loopPlan_end.for" +#include "FastC/HPC_LAYER/loopPlan_end.for" ENDIF end diff --git a/Fast/FastS/FastS/BC/mj_wallmodel_plan.for b/Fast/FastS/FastS/BC/mj_wallmodel_plan.for index a8d0ad20..20790189 100644 --- a/Fast/FastS/FastS/BC/mj_wallmodel_plan.for +++ b/Fast/FastS/FastS/BC/mj_wallmodel_plan.for @@ -37,13 +37,13 @@ c Var loc !wmles_param(3): nO du snap courant wmles_param(2) = wmles_param(2)+1 + nechant = int( wmles_param(2)) c4=1 if(nechant.le.wmles_param(1) -1) c4=0 wmles_param(2) = min(wmles_param(2), wmles_param(1) -1) !wmles_param(2) = min(wmles_param(2)+1, 1.) !wmles_param(2) = wmles_param(2)+1 - nechant = int( wmles_param(2)) ! coeff pour moyenne glissante temporelle ! c1 = nbr echantillon N @@ -100,11 +100,11 @@ c Var loc l = inddm( ind_loop(2), j, k ) li = indbci(j, k ) - moy(li,1) = rop(l,1)*cn + cnm*moy(li,1) - moy(li,2) = rop(l,2)*cn + cnm*moy(li,2) - moy(li,3) = rop(l,3)*cn + cnm*moy(li,3) - moy(li,4) = rop(l,4)*cn + cnm*moy(li,4) - moy(li,5) = rop(l,5)*cn + cnm*moy(li,5) + moy(li,1) = rop(l,1)*cn + c2*moy(li,1) + moy(li,2) = rop(l,2)*cn + c2*moy(li,2) + moy(li,3) = rop(l,3)*cn + c2*moy(li,3) + moy(li,4) = rop(l,4)*cn + c2*moy(li,4) + moy(li,5) = rop(l,5)*cn + c2*moy(li,5) enddo enddo @@ -252,11 +252,11 @@ c write(*,'(a,8f20.12)')'verif moy',vmoy/float(ind_loop(2)) l = inddm( i, j, ind_loop(6) ) li = indbci(i, j ) - moy(li,1) = rop(l,1)*cn + cnm*moy(li,1) - moy(li,2) = rop(l,2)*cn + cnm*moy(li,2) - moy(li,3) = rop(l,3)*cn + cnm*moy(li,3) - moy(li,4) = rop(l,4)*cn + cnm*moy(li,4) - moy(li,5) = rop(l,5)*cn + cnm*moy(li,5) + moy(li,1) = rop(l,1)*cn + c2*moy(li,1) + moy(li,2) = rop(l,2)*cn + c2*moy(li,2) + moy(li,3) = rop(l,3)*cn + c2*moy(li,3) + moy(li,4) = rop(l,4)*cn + c2*moy(li,4) + moy(li,5) = rop(l,5)*cn + c2*moy(li,5) enddo enddo diff --git a/Fast/FastS/FastS/BC/template_bc.for b/Fast/FastS/FastS/BC/template_bc.for index e0befd04..2596360a 100644 --- a/Fast/FastS/FastS/BC/template_bc.for +++ b/Fast/FastS/FastS/BC/template_bc.for @@ -54,7 +54,7 @@ C Var local & ventx,venty,ventz,r,u,v,w,ut,vt,wt,ua,va,wa,s_1,qn REAL_E ro,t,nut,c6inv,c0,c1,c2,c3,c7,roe,rue,rve,rwe,ete, & qref1,qref2,qref3,qref4,qref5,p,c,snorm, nue, gam1,gam2, - & gam1_1,gam,cvinv,rho_w,vmax,sens, + & gam1_1,gam,cvinv,rho_w,vmax, & sni,tn,qen,eigv1,eigv2,eigv3,eigv4, & eigv5,qvar1,qvar2,qvar3,qvar4,qvar5,svar1,svar2,svar3, & svar4,svar5,rvar1,rvar2,rvar3,rvar4,rvar5, @@ -93,14 +93,14 @@ c......determine la forme des tableau metrique en fonction de la nature du domai & ci_mtr,cj_mtr,ck_mtr,ck_vent,c_ale) c_ale = c_ale*mobile_coef - if(lrhs.eq.1) c_ale = 0. + c_pertu = 1. + if(lrhs.eq.1) then + c_ale = 0. + c_pertu = 0. + endif snorm =-1. - sens =1 - if(mod(idir,2).eq.0) then - snorm = 1. - sens =-1 - endif + if(mod(idir,2).eq.0) snorm = 1. gam = param_real(GAMMA) gam1 = param_real(GAMMA) - 1. @@ -140,6 +140,8 @@ c......determine la forme des tableau metrique en fonction de la nature du domai c3 = (2.- c5- c4)*c0 c7 = (c4-c5)*c0 + + C... Parametre specific a la CL(insert2) IF (idir.eq.1) THEN From 72a8d73e4533560df3a8b43ef4a33bee706751b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 14:01:17 +0000 Subject: [PATCH 2/2] Apply autopep8 formatting --- Fast/FastS/FastS/BC/generate_bc.py | 87 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/Fast/FastS/FastS/BC/generate_bc.py b/Fast/FastS/FastS/BC/generate_bc.py index 8eb0fb05..d67a4039 100644 --- a/Fast/FastS/FastS/BC/generate_bc.py +++ b/Fast/FastS/FastS/BC/generate_bc.py @@ -9,8 +9,8 @@ LundVar=[] for plan in ['_in','_planlund']: - for v in ['rho','u','v','w','t','nut']: - LundVar.append(v+plan) + for v in ['rho','u','v','w','t','nut']: + LundVar.append(v+plan) LundVar.append('lund_param') dico= {} @@ -46,7 +46,7 @@ bcname = dico[ bc ]['BCname'] nextrank = dico[ bc ]['nextrank'] Init = dico[ bc ]['Init'] - + # ouvrir le fichier input @@ -55,65 +55,64 @@ for i in range( len(lines) ): - lines[i]=lines[i].replace("bvbs_template", name) - if 'insert0' in lines[i]: - c_insert0=i+1 - if 'insert1' in lines[i]: - c_insert1=i+1 - if 'insert2' in lines[i]: - c_insert2=i+1 + lines[i]=lines[i].replace("bvbs_template", name) + if 'insert0' in lines[i]: + c_insert0=i+1 + if 'insert1' in lines[i]: + c_insert1=i+1 + if 'insert2' in lines[i]: + c_insert2=i+1 linsert=False outline0=' & ,' c=0 for var in vars: - #outline0+=var+' ,' - outline0=' & ,'+var+' \n' - lines.insert(c_insert0,outline0) - c_insert0+=1 - c_insert1+=1 - c_insert2+=1 - outline1=' REAL_E '+var+'(size_data) \n' - lines.insert(c_insert1,outline1) - c_insert2+=1 - linsert=True - c+=1 + #outline0+=var+' ,' + outline0=' & ,'+var+' \n' + lines.insert(c_insert0,outline0) + c_insert0+=1 + c_insert1+=1 + c_insert2+=1 + outline1=' REAL_E '+var+'(size_data) \n' + lines.insert(c_insert1,outline1) + c_insert2+=1 + linsert=True + c+=1 if linsert: - lines.insert(c_insert0,' & ,size_data, inc_bc \n') - lines.insert(c_insert1,' INTEGER_E size_data, indbci, inc_bc(3) \n') + lines.insert(c_insert0,' & ,size_data, inc_bc \n') + lines.insert(c_insert1,' INTEGER_E size_data, indbci, inc_bc(3) \n') else: - for i in range( len(lines) ): - if " indbci(j_1,k_1) = 1 + (j" in lines[i]: - lines[i]=lines[i].replace(" indbci(j_1,k_1) = 1 + (j_1-inc_bc(2)) + (k_1-inc_bc(3))*inc_bc(1)","" ) - + for i in range( len(lines) ): + if " indbci(j_1,k_1) = 1 + (j" in lines[i]: + lines[i]=lines[i].replace(" indbci(j_1,k_1) = 1 + (j_1-inc_bc(2)) + (k_1-inc_bc(3))*inc_bc(1)","" ) + if Init =='yes': - include ='#include "FastS/BC/'+bcname+'_init.for" \n' - lines.insert(c_insert2, include) + include ='#include "FastS/BC/'+bcname+'_init.for" \n' + lines.insert(c_insert2, include) -fout = dico[ bcname ]['name']+'.for' +fout = dico[ bcname ]['name']+'.for' fo = open(fout,"w") # ouvrir le fichier de sortie print(bcname,' Scheme: file',fout, 'generated') lines_del=[] for i in range( len(lines) ): - if "BCTarget" in lines[i]: - new_bc = bcname - if 'next rank' in lines[i] and nextrank !='vide': new_bc=nextrank - lines[i]=lines[i].replace("BCTarget", new_bc) - if new_bc !='vide': - lines[i]=lines[i].replace(" !next rank", '') - #lines_del.append(i-2) - #lines_del.append(i-1) - else: - lines[i]=lines[i].replace(" !next rank", '') + if "BCTarget" in lines[i]: + new_bc = bcname + if 'next rank' in lines[i] and nextrank !='vide': new_bc=nextrank + lines[i]=lines[i].replace("BCTarget", new_bc) + if new_bc !='vide': + lines[i]=lines[i].replace(" !next rank", '') + #lines_del.append(i-2) + #lines_del.append(i-1) + else: + lines[i]=lines[i].replace(" !next rank", '') c=0 for i in lines_del: - print(i), len(lines) - del lines[i-c] - c+=1 + print(i), len(lines) + del lines[i-c] + c+=1 for l in lines: fo.write(l) fo.close() # fermer le fichier output global -