Problem on Parallel DEFINE_SOURCE
Hi everyone, I met a probelm.the following code is running well in serial FLUENT.
DEFINE_SOURCE(src_number_hom,c,t,dS,eqn) { dS[eqn]=0.0; return C_UDMI(c,t,9); } However, it gives wrong result in parallel FLUENT, therefore i modified it to, DEFINE_SOURCE(src_number_hom,c,t,dS,eqn) { /* serial */ #if !PARALLEL dS[eqn]=0.0; return C_UDMI(c,t,9); #endif /* node */ #if RP_NODE if(C_PART(c,t)==myid) { dS[eqn]=0.0; return C_UDMI(c,t,9); } else { dS[eqn]=0.0; return 0.0; } #endif /* host */ #if RP_HOST Message("%d %d in src_mass in host\n",C_PART(c,t),myid); dS[eqn]=0.0; return 0.0; #endif } but i still found it cannot give right result. anybody can help me? thanks. |
All times are GMT -4. The time now is 19:48. |