|
[Sponsors] |
January 19, 2011, 04:33 |
Define_profile
|
#1 |
Member
EH
Join Date: Dec 2010
Posts: 61
Rep Power: 15 |
Hi,
Does anyone know if such computations are allowed in DEFINE_PROFILE? Code:
DEFINE_PROFILE(heater_bc,t,i) { #if !RP_HOST if(I_AM_NODE_ZERO_P) { begin_c_loop(c,thtank) { C_CENTROID(coord,c,thtank); x=sensor_coord[0]; y=sensor_coord[1]; z=sensor_coord[2]; if ((x >= xmin) && (x <= xmax)) { if ((y >= ymin) && (y <= ymax)) { if ((z >= zmin) && (z <= zmax)) { Tpoint = Tpoint + C_T(c,thtank); /* get thermosensor temperature */ nt = nt + 1.0; /* count number */ } } } } end_c_loop(c,thtank) Tpoint =Tpoint/nt; /* Average over all cells calculated */ compute_node_loop_not_zero(i) { PRF_CSEND_DOUBLE(i, &Tpoint, 1, myid); } } . . . . IF (Tpoint < Tcutoff) F_PROFILE = 1000 ELSE F_PROFILE = 0 end begin_c_loop C_UDMI=Tpoint end_c_loop but Tpoint actually doesnt belong to a particular cell. Other than the F_UDMI and C_UDMI, does anyone know how to pass the value calculated from DEFNE_ADJUST to DEFINE_PROFILE? Thank you all. Cheers EH |
|
|
|