DEFINE_INIT in multiphase eulerian model
Hello everybody,
I am trying this code to define as initial temperature distribution in a sphere of radius 0.5. I compiled it well but when I iterate I have a violation error. The function is: DEFINE_INIT(my_init_function, domain) { Thread *t; Thread **pt; cell_t c; Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,1); real xc[ND_ND], y, x; mp_thread_loop_c (t,domain,pt) begin_c_loop_all (c,t) { C_CENTROID(xc,c,t); x=xc[0]; y=xc[1]; if ( x*x+y*y < 0.5*0.5 ) C_T(c,t)=0.1; else C_T(c,t)=1; } end_c_loop_all (c,t) } |
All times are GMT -4. The time now is 21:12. |