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

pushback function for vectors in Fluent UDFs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2011, 09:20
Default pushback function for vectors in Fluent UDFs
  #1
New Member
 
Join Date: Sep 2010
Posts: 4
Rep Power: 15
ScottN is on a distinguished road
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
ScottN is offline   Reply With Quote

Reply


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
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
wall function UDFs...step gina Fluent UDF and Scheme Programming 7 June 2, 2009 14:04
OpenFoam 14 installation problem gfcoppola OpenFOAM Installation 20 November 2, 2007 13:38
Using compiled UDF:s in different Fluent versions S H FLUENT 1 September 12, 2007 03:40
CFX function in Fluent Andrew FLUENT 4 December 11, 2006 08:44


All times are GMT -4. The time now is 16:43.