Hi everybody,
I would like to be able to broadcast an fespace of the processor(0) to all the other processors. However, the broadcast function does not seem to take fespace into account.
I would like a single processor to calculate the boundary condition on the global mesh (which is a Blasius profile in my case) then broadcast it to everyone.
I would like a single processor to calculate the entry limit condition on the global mesh (which is a Blasius profile in my case) then broadcast it to everyone.
Here is the snippet of my code that calculates the input boundary condition:
/* Import de la solution de l'equation de Blasius 2f'''+ff''=0' */
int mbl, nbl;
ifstream Input(".../Profil_Blasius_RK4.txt");
Input >> mbl >> nbl; // Nbr lignes & Nbr colonnes
real[int,int] fblasius(mbl,nbl);
for(int i=0; i<mbl; i++){
for(int j=0; j<nbl; j++){
Input >> fblasius(i,j); // Tableau [eta f f' f"]
}
}
real etamax = fblasius(mbl-1,0); // Eta max (derniere entree du tableau)
/* Interpolation du profil de similitude */
int nbs = fblasius.n-1;
mesh Thb = square(1,nbs/2,[x,y*etamax]);
fespace Vhb(Thb,P2);
Vhb fbx, fby, xx = x, yy = y*(nbs)/etamax;
for(int i=0; i< fbx[].n; ++i){
int k = yy[][i];
if(xx[][i] < 0.1)
fbx[][i] = fblasius(k,2); // u/Uinf = f'(eta)
fby[][i] = (fblasius(k,0)*fblasius(k,2))-fblasius(k,1); // v/sqrt(nu*Uinf/2x) = eta*f'(eta)-f(eta)
}
fbx = fbx(0,y)*Uinf;
fby = fby(0,y)*sqrt(nu*Uinf/(2*xentree));
/* Adaptation du profil au maillage pour le bon delta1 */
fespace Uhglobal(Thglobal, Pu);
Uhglobal Ublasius, Vblasius;
Ublasius = fbx(x,y/delta1*1.7208);
Vblasius = fby(x,y/delta1*1.7208);
/* CL d'entree */
func uIn = Ublasius(0,y); // Condition limite d'entree selon x
func vIn = Vblasius(0,y); // Condition limite d'entree selon y
Thanks !