2D AMRCLAW
init_alloc.f90
Go to the documentation of this file.
1 ! ============================================================================
2 ! Program: AMRClaw
3 ! File: init_alloc.f90
4 ! Created: 2009-01-21
5 ! Author: Kyle Mandli and Marsha Berger
6 ! ============================================================================
7 ! Description: Initialization of alloc storage
8 ! ============================================================================
9 
10 
11 subroutine init_alloc()
12 
13  use amr_module
14  implicit none
15 
16 ! if (.not.allocated(storage)) then ! old way, changed mjb sept. 2014
17  if (.not.allocated(alloc)) then ! new way, use allocatable arrays, not pointers
18  memsize = 1000000
19 ! allocate(storage(memsize))
20  allocate(alloc(memsize))
21 ! alloc => storage
22  print *, "Storage allocated..."
23  else
24  print *, "Storage already allocated!"
25  endif
26 
27 end subroutine init_alloc
28 
subroutine init_alloc()
Definition: init_alloc.f90:12
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