CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

C functions in UDF Macro

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2015, 09:32
Default C functions in UDF Macro
  #1
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
I have a problem with compiling C function in UDF. It seems that Flueent does not accept C functions. For instance, a short code:

DEFINE_ON_DEMAND
{
...
int imin(int, int); // line 1
...
int imin(int n, int m) // line 2
{
...
}
}

So, Fluent doesn't accept the function definition (line 2): "syntax error: missing ';' before '(' ". So, it treats the definition as a variable declaration. Remove "int" befor "init", it yields next problems, untill you remove the whole function definition.

What is the difference in the function syntax in pure C and the UDF?
jacek is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
functions in UDF Lucy FLUENT 4 April 14, 2011 17:41
some UDF macro duaiduaihu FLUENT 0 July 9, 2009 00:00
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55


All times are GMT -4. The time now is 04:47.