|
[Sponsors] |
May 16, 2002, 04:49 |
Dynamical memory allocation for multiblock?
|
#1 |
Guest
Posts: n/a
|
Dear everyone:
I want to use memory dynamical allocation of Fortran90 for multiblock calculation in order to save memory, but I encounter a problem. As for coordinates of every block, if I use the below statement, real,allocatable::x(:,:,:, allocate(nblock,ni,nj,nk,stat=err) where nblock denotes number of blocks,ni,nj,nk are the dimension of a block. I must allocate same dimension ni,nj and nk for every block, which leads to redundant memory allocation especially when the differences of sizes of blocks are very remarkable. Does anyone have a better method to deal with this situation? All comments are appreciated! Thanks in advance. |
|
May 16, 2002, 07:22 |
Re: Dynamical memory allocation for multiblock?
|
#2 |
Guest
Posts: n/a
|
Hello !
I think that it is a common practise to allocate the variables as one-dimensional table(s). This way you do not need to waste memory space. I use 1-D tables in the whole code but it is possible to use 3-D tables in the subroutines even if the memory space is allocated as 1-D table(s) in the main program. Best regards Petri M |
|
May 20, 2002, 05:58 |
Re: Dynamical memory allocation for multiblock?
|
#3 |
Guest
Posts: n/a
|
Petri Majander, Thank you very much!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
about numeca harmonic method Memory allocation failed | uqzcpo | Fidelity CFD | 2 | October 7, 2011 23:10 |
Memory allocation problem | Ammar Abdilghanie | FLUENT | 5 | February 19, 2007 19:15 |
CFX CPU time & real time | Nick Strantzias | CFX | 8 | July 23, 2006 18:50 |
Memory allocation problem | shhe | CFX | 4 | January 7, 2004 00:00 |
memory allocation | strudl | CFX | 1 | October 5, 2003 11:26 |