1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
C Copyright (c) 2003-2010 University of Florida
C
C This program is free software; you can redistribute it and/or modify
C it under the terms of the GNU General Public License as published by
C the Free Software Foundation; either version 2 of the License, or
C (at your option) any later version.
C This program is distributed in the hope that it will be useful,
C but WITHOUT ANY WARRANTY; without even the implied warranty of
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
C GNU General Public License for more details.
C The GNU General Public License is included in this distribution
C in the file COPYRIGHT.
subroutine set_flags2(array_table, narray_table,
* index_table,
* nindex_table, segment_table, nsegment_table,
* block_map_table, nblock_map_table,
* scalar_table, nscalar_table,
* address_table, op)
c---------------------------------------------------------------------------
c Sets the indices of a 3-d static array in common block values.
c The first index is assumed to be the atom, the second is the component
c index (i. e. x,y, or z), and the 3rd is the center.
c
c These indices are stored in the d2int_com common block, and are meant
c to indicate the atom, component, and center on which to calculate a
c single block of derivative integrals.
c
c Example:
c index jatom = 1, natoms
c index jx = 1,3
c static flags2(jatom, jx)
c
c taoint(mu,nu,lambda, sigma) = 0.
c do jatom
c do jx
c execute set_flags2 flags2(jatom, jx)
c execute d2int aoint(mu, nu, lambda, sigma)
c taoint(mu,nu,lambda, sigma) += aoint(mu, nu, lambda, sigma)
c enddo jx
c enddo jatom
c
c----------------------------------------------------------------------------
implicit none
include 'interpreter.h'
include 'mpif.h'
include 'trace.h'
include 'parallel_info.h'
common /d2int_com/jatom, jx, jcenter
integer jatom, jx, jcenter
double precision flags_value
integer narray_table, nindex_table, nsegment_table,
* nblock_map_table
integer op(loptable_entry)
integer array_table(larray_table_entry, narray_table)
integer index_table(lindex_table_entry, nindex_table)
integer segment_table(lsegment_table_entry, nsegment_table)
integer block_map_table(lblock_map_entry, nblock_map_table)
integer nscalar_table
double precision scalar_table(nscalar_table)
integer*8 address_table(narray_table)
integer ierr, array, array_type, ind, nind
integer i
array = op(c_result_array)
if (array .lt. 1 .or. array .gt. narray_table) then
print *,'Error: Invalid array in set_flags, line ',
* current_line
print *,'Array index is ',array,' Allowable values are ',
* ' 1 through ',narray_table
call abort_job()
endif
nind = array_table(c_nindex, array)
if (nind .ne. 2) then
print *,'Error: set_flags2 requires a 2-index array.'
call abort_job()
endif
c-----------------------------------------------------------------------
c Atom, component, and center indices are determined from the c_current_seg
c field of the 1st and 2nd index of the array.
c------------------------------------------------------------------------
ind = array_table(c_index_array1,array)
jatom = index_table(c_current_seg, ind)
ind = array_table(c_index_array1+1,array)
jx = index_table(c_current_seg, ind)
c-----------------------------------------------------------------------
c Set jcenter to 0 as it is not currently being used.
c-----------------------------------------------------------------------
jcenter = 0
return
end
|