Add array Q in the data block structure to store primitive variables.

This commit is contained in:
Grzegorz Kowal 2012-07-27 21:45:35 -03:00
parent 5b2d79a0c4
commit 18b4de6458

View File

@ -134,10 +134,16 @@ module blocks
! !
type(block_meta), pointer :: meta type(block_meta), pointer :: meta
! an allocatable array to store all variables ! an allocatable array to store all conserved
! variables
! !
real, dimension(:,:,:,:) , allocatable :: u real, dimension(:,:,:,:) , allocatable :: u
! an allocatable array to store all primitive
! variables
!
real, dimension(:,:,:,:) , allocatable :: q
! an allocatable array to store all fluxes ! an allocatable array to store all fluxes
! !
real, dimension(:,:,:,:,:), allocatable :: f real, dimension(:,:,:,:,:), allocatable :: f
@ -1032,10 +1038,14 @@ module blocks
nullify(pdata%next) nullify(pdata%next)
nullify(pdata%meta) nullify(pdata%meta)
! allocate space for the conserved variables ! allocate space for conserved variables
! !
allocate(pdata%u(nvars,nx,ny,nz)) allocate(pdata%u(nvars,nx,ny,nz))
! allocate space for primitive variables
!
allocate(pdata%q(nvars,nx,ny,nz))
! allocate space for the numerical fluxes ! allocate space for the numerical fluxes
! !
if (nflux .gt. 0) allocate(pdata%f(ndims,nflux,nx,ny,nz)) if (nflux .gt. 0) allocate(pdata%f(ndims,nflux,nx,ny,nz))