subroutine SetupFieldInts(nBasis, nFlds)
use HElem, only: HElement_t_size
use MemoryManager, only: LogMemalloc
implicit none
integer, intent(in) :: nBasis, nFlds
integer :: ierr,iSize
character(*),parameter :: t_r = 'SetupFieldInts'
! Using a square array to hold <i|h|j> (incl. elements which are
! zero by symmetry).
Allocate(OneEFieldInts(nBasis,nBasis,nFlds),STAT=ierr)
iSize = NBasis*NBasis*nFlds
call LogMemAlloc('OneEFieldInts',nBasis*nBasis*nFlds,HElement_t_size*8,t_r,tagOneEFieldInts)
OneEFieldInts = (0.0_dp)
Allocate(FieldCore(nFlds),STAT=ierr)
call LogMemAlloc('FieldCore',nFlds,dp,t_r,tagFieldCore)
FieldCore = 0.0d0
end subroutine SetupFieldInts