Allocate contiguous space of length nword in main storage array alloc.
Return pointer to this storage
Definition at line 9 of file igetsp.f.
References amr_module::lendim, amr_module::lenf, amr_module::lenmax, amr_module::lentot, amr_module::lfree, amr_module::memsize, amr_module::outunit, resize_storage(), and amr_module::sprint.
Referenced by basecheck(), bufnst2(), domgrid(), flagger(), flglvl2(), gfixup(), ginit(), prepc(), prepf(), restrt(), saveqc(), and spest2().
11 implicit double precision (a-h,o-z)
30 if (
lfree(i,2) .lt. nwords)
go to 20
38 25 left =
lfree(itake,2) - nwords
40 iendtake =
lfree(itake,1) + nwords
44 if (left .le. 0)
go to 30
46 lfree(itake,1) = iendtake
59 901
format(
' require ',i10,
' words - either none left or not big',
62 write(*,902) ((
lfree(i,j),j=1,2),i=1,
lenf)
63 902
format(
' free list: ',//,2x,50(i10,4x,i10,/,2x))
70 do while (istatus > 0)
71 factor = 0.5d0 * factor
72 if (factor < 0.1d0)
then 73 print *,
'Allocation failed, not enough memory' 76 new_size = ceiling((1.d0+factor) *
memsize)
77 iadd_size = ceiling(factor *
memsize)
99 100
format(
' allocating ',i8,
' words in location ',i8,
100 1
' lentot, lenmax ', 2i10)
function igetsp(nwords)
Allocate contiguous space of length nword in main storage array alloc.
integer, parameter outunit
integer, dimension(lfdim, 2) lfree
subroutine resize_storage(new_size, status)
The module contains the definition of a "node descriptor" as well as other global variables used duri...