Dynamic Arrays in OF 1.6 [SOLVED]
I am having trouble with a custom post-processor. I want to be able to read in a tab separated file from memory and refer to its values (look-up table essentially). Since the size of the file may change, I was thinking of using dynamic arrays, and was able to write the code for it to work in a program on its own.
The problem I run into is when I try run the program in FOAM. I've included all the necessary header files, and the program compiles just fine. When I run it and I need to allocate space, I get the following errors:
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
My table isn't very big, which is why I'm going the array route. Has anyone run into this before. Barring that, how could I implement this type of functionality with the built in foam libraries?
Ok, figured it out. Easiest way to do this is with the interpolationTable library.
For future reference, I'm going to see if I can do something similar for multidimensional interpolation. Out of curiosity, what is the best way to indicate that I've solved my problem so people browsing the forum for this answer can find it faster?
|All times are GMT -4. The time now is 23:47.|