|
[Sponsors] |
September 26, 2007, 20:35 |
patching all faces ...
|
#1 |
Guest
Posts: n/a
|
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); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2.0.x on Mac OSX | niklas | OpenFOAM Installation | 74 | March 28, 2012 17:46 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 10:01 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |