CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   patching all faces ... (https://www.cfd-online.com/Forums/fluent/46148-patching-all-faces.html)

bart weisser September 26, 2007 19:35

patching all faces ...
 
Howdy there:

I am kinda stuck with a UDF of mine. I want to patch both the cell and face values of some variables. The cell part went without incident, but for the face part, it seems that it is only patching one face. How do I get the UDF to loop over *all* the faces? Here is a snippit of the code I used ...

The value of the variable face_count will be smaller than the total number of faces on the grid.

Thanks in advance, BW.


/************************************************** ***/

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(patch_face)
{
Domain *d;
Thread *t;
face_t *f;

int face_count;

d = Get_Domain (1);
face_count = 0;

thread_loop_f (t,d) {
begin_f_loop (f,t) {
face_count++;
} end_f_loop (f,t)
}

printf ("*** face count = %i ***\n", face_count);
}


All times are GMT -4. The time now is 23:30.