2D AMRCLAW
Functions/Subroutines
init_alloc.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine init_alloc ()
 

Function/Subroutine Documentation

◆ init_alloc()

subroutine init_alloc ( )

Definition at line 12 of file init_alloc.f90.

References amr_module::alloc, and amr_module::memsize.

Referenced by stst1().

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 
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
Here is the caller graph for this function: