|
[Sponsors] |
Is there a limitation of memory size for UDFs? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 17, 2003, 08:51 |
Is there a limitation of memory size for UDFs?
|
#1 |
Guest
Posts: n/a
|
I defined a UDF, which requires a large portion of memory. static int randn_1[100000] static int randn_2[100000] static int randn_2[100000]
Can I define three integer arraies like this? I think the needed memory size may be too large? |
|
August 18, 2003, 04:36 |
Re: Is there a limitation of memory size for UDFs?
|
#2 |
Guest
Posts: n/a
|
hi,
If this is a normal variable in C programming, you should refer to the stack size the C compiler permit. Anyway, such a large array definitaion will ocuppy a lot of memory. Why should you do like this? |
|
August 18, 2003, 04:42 |
Re: Is there a limitation of memory size for UDFs?
|
#3 |
Guest
Posts: n/a
|
I need a list of Gaussian random numbers. I don't want to generate them by my UDF scheme as it may spend long time. I use MatLab to create 100,000 random numbers and read them into memory.
I know this method is awful. FLUENT provides a macro "gauss_random()", but I don't how to use it. |
|
August 19, 2003, 02:46 |
Re: Is there a limitation of memory size for UDFs?
|
#4 |
Guest
Posts: n/a
|
For large arrays it makes more sense to allocate it on the heap by using a malloc or calloc call.
is do real *mydata; mydata = malloc(size_of_data); mydata[0] = x Greg |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 03:01 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 13:43 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 14:37 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |