164
163
C Allocate local arrays
165
allocate(cHrow(nbasis))
166
call memory('A','D',size(cHrow),'denmat')
167
allocate(cSrow(nbasis))
168
call memory('A','D',size(cSrow),'denmat')
169
allocate(chcrow(nbands))
170
call memory('A','D',size(chcrow),'denmat')
171
allocate(cscrow(nbands))
172
call memory('A','D',size(cscrow),'denmat')
173
allocate(chccCol(nbands))
174
call memory('A','D',size(chccCol),'denmat')
175
allocate(csccCol(nbands))
176
call memory('A','D',size(csccCol),'denmat')
166
call re_alloc( cHrow, 1, nbasis, name='cHrow', routine='denmat' )
168
call re_alloc( cSrow, 1, nbasis, name='cSrow', routine='denmat' )
170
call re_alloc( chcrow, 1, nbands, name='chcrow',
173
call re_alloc( cscrow, 1, nbands, name='cscrow',
176
call re_alloc( chccCol, 1, nbands, name='chccCol',
179
call re_alloc( csccCol, 1, nbands, name='csccCol',
178
allocate(chcrowsave(nhijmax,nbandsloc))
179
call memory('A','D',size(chcrowsave),'denmat')
180
allocate(cscrowsave(nhijmax,nbandsloc))
181
call memory('A','D',size(cscrowsave),'denmat')
182
allocate(ctmp(nbands,2))
183
call memory('A','D',size(ctmp),'denmat')
184
allocate(ftG(MaxFt2,nbasisCloc))
185
call memory('A','D',size(ftG),'denmat')
186
allocate(fstG(MaxFt2,nbasisCloc))
187
call memory('A','D',size(fstG),'denmat')
183
nullify( chcrowsave )
184
call re_alloc( chcrowsave, 1, nhijmax, 1, nbandsloc,
185
& name='chcrowsave', routine='denmat' )
186
nullify( cscrowsave )
187
call re_alloc( cscrowsave, 1, nhijmax, 1, nbandsloc,
188
& name='cscrowsave', routine='denmat' )
190
call re_alloc( ctmp, 1, nbands, 1, 2,
191
& name='ctmp', routine='denmat' )
193
call re_alloc( ftG, 1, MaxFt2, 1, nbasisCloc,
194
& name='ftG', routine='denmat' )
196
call re_alloc( fstG, 1, MaxFt2, 1, nbasisCloc,
197
& name='fstG', routine='denmat' )
189
allocate(ft(nftmax,nbasisCloc))
190
call memory('A','D',size(ft),'denmat')
191
allocate(fst(nftmax,nbasisCloc))
192
call memory('A','D',size(fst),'denmat')
200
call re_alloc( ft, 1, nftmax, 1, nbasisCloc,
201
& name='ft', routine='denmat' )
203
call re_alloc( fst, 1, nftmax, 1, nbasisCloc,
204
& name='fst', routine='denmat' )
195
207
C Initialize temporary arrays
443
455
C Deallocate local arrays
445
call memory('D','D',size(fstG),'denmat')
447
call memory('D','D',size(ftG),'denmat')
449
call memory('D','D',size(ctmp),'denmat')
451
call memory('D','D',size(cscrowsave),'denmat')
452
deallocate(cscrowsave)
453
call memory('D','D',size(chcrowsave),'denmat')
454
deallocate(chcrowsave)
457
call de_alloc( fstG, name='fstG' )
458
call de_alloc( ftG, name='ftG' )
459
call de_alloc( ctmp, name='ctmp' )
460
call de_alloc( cscrowsave, name='cscrowsave' )
461
call de_alloc( chcrowsave, name='chcrowsave' )
456
call memory('D','D',size(fst),'denmat')
458
call memory('D','D',size(ft),'denmat')
463
call de_alloc( fst, name='fst' )
464
call de_alloc( ft, name='ft' )
461
call memory('D','D',size(csccCol),'denmat')
463
call memory('D','D',size(chccCol),'denmat')
465
call memory('D','D',size(cscrow),'denmat')
467
call memory('D','D',size(chcrow),'denmat')
469
call memory('D','D',size(cSrow),'denmat')
471
call memory('D','D',size(cHrow),'denmat')
466
call de_alloc( csccCol, name='csccCol' )
467
call de_alloc( chccCol, name='chccCol' )
468
call de_alloc( cscrow, name='cscrow' )
469
call de_alloc( chcrow, name='chcrow' )
470
call de_alloc( cSrow, name='cSrow' )
471
call de_alloc( cHrow, name='cHrow' )
474
473
C Stop time counter and return ..................
475
474
call timer('denmat',2)