|
[Sponsors] |
March 14, 2013, 09:21 |
Error in Simple UDF!
|
#1 |
Member
Join Date: Jul 2012
Posts: 48
Rep Power: 14 |
Hi everyone!
There's a very simple on demand udf I'm writing ... using DEFINE_ON_DEMAND .. and I dont get the error its on the line where DEFINE_ON_DEMAND is defined .. theCode and error are: Code:
The udf code is : #include "udf.h" FILE *fout; void get_req_cells_coords(Domain *domain, int id) { real CC[2]; cell_t c; Thread *t = Lookup_Thread(domain, id); fprintf(fout,"thread id %d\n", id); begin_c_loop(c,t) { C_CENTROID(CC,c,t); fprintf(fout, "f%d %g %g %g\n", c, CC[0], CC[1], CC[2]); } end_f_loop(c,t) fprintf(fout, "\n"); } DEFINE_ON_DEMAND(get_req_cells_coords) { Domain *domain; domain = Get_Domain(1); fout = fopen("req_cells.out", "w"); get_req_cells_coords(domain, 3); get_req_cells_coords(domain, 4); fclose(fout); } The error is: # Generating ud_io1.h get_req_cells_coords.c ..\..\src\get_req_cells_coords.c(19) : error C2143: syntax error : missing ';' before 'type' Im using Microsoft Visual Studio 2010 with FLUENT v14.5 |
|
March 14, 2013, 09:36 |
|
#2 |
Member
Join Date: Jul 2012
Posts: 48
Rep Power: 14 |
Another thing I'd like to mention is that I've been able to compile some other udfs using DEFINE_SOURCE without errors ...
but y this doesn't work ??? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FLUENT UDF Simple error. | startup0820 | Fluent UDF and Scheme Programming | 0 | August 14, 2012 04:54 |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 07:43 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 12:29 |
simple rigid body motion UDF | Dan | FLUENT | 0 | January 11, 2006 06:48 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |