|
[Sponsors] |
October 16, 2003, 13:10 |
Using c_face_loop
|
#1 |
Guest
Posts: n/a
|
I am trying to write a UDF which print outs the area vectors of the boundary faces could somebody point out why i am getting non -integer subscript expression : unsigned char error when i try interpretting my udf ?the line number where the error occurs is in marked with ******'s Thanks , Ajay
DEFINE_ON_DEMAND(area_on_demand_calc) { int index; real cell_cordi[ND_ND],a[ND_ND]; Thread *t; Thread *tf; cell_t c; face_t face; d = Get_Domain(1); /* Get the domain using Fluent utility */ if ((fpt3=fopen("mean_shear.dat","w"))==NULL) { printf("Cannot open the file\n"); return; } /* Loop over all cell threads in the domain */ thread_loop_c(t,d) { /* Loop over all cells */ begin_c_loop(c,t) { ********** c_face_loop(c,t,index) { tf = C_FACE_THREAD(c,t,index); if (BOUNDARY_FACE_THREAD_P(tf)== TRUE) { F_AREA(a,face,tf); fprintf(fpt3,"%d ",index); } } fprintf(fpt3,"\n "); } end_c_loop(c,t) } fclose(fpt3); } |
|
October 17, 2003, 05:03 |
Re: Using c_face_loop
|
#2 |
Guest
Posts: n/a
|
I have the same problem and I found the solution searching this forum. The problem is that if you use c_face_loop you can't interpret your UDF but you have to compile it.
|
|
October 17, 2003, 14:21 |
Re: Using c_face_loop
|
#3 |
Guest
Posts: n/a
|
Thanks a Ton !
|
|
|
|