CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Dynamical memory allocation for multiblock?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   May 16, 2002, 03:49
Default Dynamical memory allocation for multiblock?
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,



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.
  Reply With Quote

Old   May 16, 2002, 06:22
Default Re: Dynamical memory allocation for multiblock?
Petri Majander
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
  Reply With Quote

Old   May 20, 2002, 04:58
Default Re: Dynamical memory allocation for multiblock?
Posts: n/a
Petri Majander, Thank you very much!
  Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
about numeca harmonic method Memory allocation failed uqzcpo NUMECA 2 October 7, 2011 22: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 17:50
Memory allocation problem shhe CFX 4 January 7, 2004 00:00
memory allocation strudl CFX 1 October 5, 2003 10:26

All times are GMT -4. The time now is 01:31.