2D AMRCLAW
restrt_alloc.f90
Go to the documentation of this file.
1 ! ============================================================================
2 ! Program: AMRClaw
3 ! File: restrt_alloc.f90
4 ! Created: 2009-10-22
5 ! Author: Marsha Berger and Randy LeVeque
6 ! ============================================================================
7 ! Description: Initialization of alloc storage for restart
8 ! ============================================================================
9 
10 
11 subroutine restrt_alloc(isize)
12 
13  use amr_module
14  implicit none
15  integer :: isize
16 
17 
18 ! if (.not.allocated(storage)) then ! old way, changed mjb Sept. 2014
19  if (.not.allocated(alloc)) then ! new way uses allocatable, not pointer, arrays
20  write(6,*)"allocating ",isize," -sized alloc array"
21  memsize = isize
22 ! allocate(storage(memsize))
23  allocate(alloc(memsize))
24 ! alloc => storage
25  print *, "Storage allocated of size ",memsize," at restart"
26  else
27  print *, "Storage already allocated!"
28  endif
29 
30 end subroutine restrt_alloc
31 
32 
subroutine restrt_alloc(isize)
integer memsize
Definition: amr_module.f90:219
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
real(kind=8), dimension(:), allocatable alloc
Definition: amr_module.f90:218