|
[Sponsors] |
January 31, 2011, 10:20 |
pushback function for vectors in Fluent UDFs
|
#1 |
New Member
Join Date: Sep 2010
Posts: 4
Rep Power: 16 |
Hi,
I'm writing a UDF that involves storing values for cells in a vector where the number of cells is indefinite, therefore I cannot specify the number of elements in my vector when I declare it, instead I initialize it beginning with one element, for example: real myvector[1]; As my program loops through different cells, if a certain criteria is met by that cell, the parameter of interest is added to the end of the vector. Normally with c programming you would just use the pushback function, ex: myvector.push_back(newvalue); That should increase the vector size by one and put the value of newvalue into the new element. However, push_back doesn't work with fluent UDF's since fluent has created their own vector.h header file which is included when you include the udf.h header file, and push_back isn't included in this new vector.h header. Does anyone know how to do this operation in a fluent UDF? Thanks, Scott |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
wall function UDFs...step | gina | Fluent UDF and Scheme Programming | 7 | June 2, 2009 15:04 |
OpenFoam 14 installation problem | gfcoppola | OpenFOAM Installation | 20 | November 2, 2007 14:38 |
Using compiled UDF:s in different Fluent versions | S H | FLUENT | 1 | September 12, 2007 04:40 |
CFX function in Fluent | Andrew | FLUENT | 4 | December 11, 2006 09:44 |