File: erd__move_ry.f

package info (click to toggle)
aces3 3.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 82,460 kB
  • sloc: fortran: 225,647; ansic: 20,413; cpp: 4,349; makefile: 953; sh: 137
file content (140 lines) | stat: -rw-r--r-- 4,553 bytes parent folder | download | duplicates (7)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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  ERD__MOVE_RY
     +
     +                    ( NINTGRL,NINDEX,
     +                      NOTMOVE,MOVE,NRY,
     +                      INDEX,
     +                      TILE,
     +                      X,
     +
     +                             IXOFF,
     +                             Y )
     +
C------------------------------------------------------------------------
C  OPERATION   : ERD__MOVE_RY
C  MODULE      : ELECTRON REPULSION INTEGRALS DIRECT
C  MODULE-ID   : ERD
C  SUBROUTINES : ERD__TRANSPOSE_BATCH
C                ERD__MAP_IJKL_TO_IKJL
C  DESCRIPTION : This routine moves all ry-components located on the
C                far right in array X to a specific position to the left
C                in array Y:
C
C                     X (1,2,3,...,RY) ---> Y ( 1, 2, 3,...)
C                                   |          |  |  |   |
C                                    --->------^--^--^...^
C
C                The part of X that is not moved (i.e. the # of
C                invariant indices to the left in X) has been calculated
C                beforehand and is transmitted through argument.
C
C
C                  Input:
C
C                       NINTGRL    =  total # of integrals
C                       NINDEX     =  total # of possible target places
C                       NOTMOVE    =  inactive # of indices
C                       MOVE       =  # of indices that will be moved
C                       NRY        =  # of ry-components to be moved
C                       INDEX      =  place 1,2,3,... to which the
c                                     ry-components will be placed in
C                                     array Y (must be within the range
C                                     1 =< INDEX =< NINDEX)
C                       TILE       =  the level 1 cache tile
C                       X          =  initial set of integrals
C                       IXOFF (I)  =  NINDEX-fold array indicating total
C                                     # of elements preceeding place
C                                     I = 1,2,3,... before the move
C                                     (with IXOFF(1)=1)
C
C                  Output:
C
C                       IXOFF (I)  =  updated NINDEX-fold array
C                                     indicating total # of elements
C                                     preceeding place I = 1,2,3,...
C                                     after the move
C                       Y          =  final set of integrals
C
C
C  AUTHOR      : Norbert Flocke
C------------------------------------------------------------------------
C
C
C             ...include files and declare variables.
C
C
         IMPLICIT   NONE

         INTEGER    I
         INTEGER    INDEX
         INTEGER    MOVE
         INTEGER    NINDEX
         INTEGER    NINTGRL
         INTEGER    NOTMOVE
         INTEGER    NRY
         INTEGER    TILE

         INTEGER    IXOFF (1:NINDEX)

         DOUBLE PRECISION   X (1:NINTGRL)
         DOUBLE PRECISION   Y (1:NINTGRL)
C
C
C------------------------------------------------------------------------
C
C
C             ...check, if the move is simply a transposition
C                or a more general ijkl -> ikjl move.
C
C
         IF (NOTMOVE.EQ.1) THEN

             CALL  ERD__TRANSPOSE_BATCH
     +
     +                  ( MOVE,NRY,
     +                    TILE,
     +                    X,
     +
     +                           Y )
     +
     +
         ELSE

             CALL  ERD__MAP_IJKL_TO_IKJL
     +
     +                  ( NOTMOVE,MOVE,NRY,1,
     +                    TILE,
     +                    X,
     +
     +                           Y )
     +
     +
         END IF
C
C
C             ...update IXOFF values.
C
C
         DO 10 I = INDEX,NINDEX
            IXOFF (I) = IXOFF (I) * NRY
   10    CONTINUE
C
C
C             ...ready!
C
C
         RETURN
         END