CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF - C_NFACES (

St.Schmidt December 10, 2002 19:49

Dear All,

In a routine DEFINE_SOURCE(name,c,t,dS,eqn) I want to get the number of cell faces by setting

int n = C_NFACES(c,t); /* it should be integer */

to run a

c_face_loop(c, t, n) {...}

My problem is that I get an error message from the compiler. I am not v/good at C as you can imagine by my question. I have tried to put C_NFACES(c,t) directly into the loop header c_face_loop(c, t, C_NFACES(c,t)) - but with no success.

Any help appreciated.


Markus December 11, 2002 04:11

Hi Stefan,

Most likely your problem is that several macros simply do not work in interpreted mode, among them is C_NFACES. The workaround is to use the compiled mode which definitely works.

best regards,


All times are GMT -4. The time now is 08:36.