|
[Sponsors] |
multi-dimensional dynamic array allocation for multi-block solver using fortran |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 24, 2012, 04:48 |
multi-dimensional dynamic array allocation for multi-block solver using fortran
|
#1 |
New Member
Manokaran K
Join Date: Sep 2011
Posts: 4
Rep Power: 14 |
I am converting my CFD solver to multi-block solver. I had used dynamic array allocation for the single block solver, but for multi-block, the dynamic array allocation syntax is not clear to me. I tried a sample code, but end up in error "Error: Expression at (1) must be scalar". I also don't know how to pass the multi dimensional allocated array to subroutines. Please, suggest solution, regards
common/iteration/nb integer, dimension (,allocatable::nib,njb,nkb real, dimension (:,:,:,,allocatable::x,y,z allocate (nib(nb),njb(nb),nkb(nb)) do l=1,nb ni=nib(l) nj=njb(l) nk=nkb(l) allocate (x(l,ni,nj,nk),y(l,ni,nj,nk),z(l,ni,nj,nk)) enddo call gridatt (x,y,z,nib,njb,nkb) deallocate(x,y,z,nib,njb,nkb) end c subroutine gridatt (x,y,z,nib,njb,nkb) common/iteration/nb integer, dimension (nb)::nib,njb,nkb real, dimension (nb,nib,njb,nkb)::x,y,z return end
__________________
mano |
|
Tags |
dynamic array, fortran, mult-block |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
[Commercial meshers] Icem Mesh to Foam | jphandrigan | OpenFOAM Meshing & Mesh Conversion | 4 | March 9, 2010 02:58 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 1, 2003 23:32 |