~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/lapack/single/ssygs2.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*> \brief \b SSYGS2 reduces a symmetric definite generalized eigenproblem to standard form, using the factorization results obtained from spotrf (unblocked algorithm).
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*> \htmlonly
 
9
*> Download SSYGS2 + dependencies 
 
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssygs2.f"> 
 
11
*> [TGZ]</a> 
 
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssygs2.f"> 
 
13
*> [ZIP]</a> 
 
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssygs2.f"> 
 
15
*> [TXT]</a>
 
16
*> \endhtmlonly 
 
17
*
 
18
*  Definition:
 
19
*  ===========
 
20
*
 
21
*       SUBROUTINE SSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
 
22
 
23
*       .. Scalar Arguments ..
 
24
*       CHARACTER          UPLO
 
25
*       INTEGER            INFO, ITYPE, LDA, LDB, N
 
26
*       ..
 
27
*       .. Array Arguments ..
 
28
*       REAL               A( LDA, * ), B( LDB, * )
 
29
*       ..
 
30
*  
 
31
*
 
32
*> \par Purpose:
 
33
*  =============
 
34
*>
 
35
*> \verbatim
 
36
*>
 
37
*> SSYGS2 reduces a real symmetric-definite generalized eigenproblem
 
38
*> to standard form.
 
39
*>
 
40
*> If ITYPE = 1, the problem is A*x = lambda*B*x,
 
41
*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
 
42
*>
 
43
*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
 
44
*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T *A*L.
 
45
*>
 
46
*> B must have been previously factorized as U**T *U or L*L**T by SPOTRF.
 
47
*> \endverbatim
 
48
*
 
49
*  Arguments:
 
50
*  ==========
 
51
*
 
52
*> \param[in] ITYPE
 
53
*> \verbatim
 
54
*>          ITYPE is INTEGER
 
55
*>          = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
 
56
*>          = 2 or 3: compute U*A*U**T or L**T *A*L.
 
57
*> \endverbatim
 
58
*>
 
59
*> \param[in] UPLO
 
60
*> \verbatim
 
61
*>          UPLO is CHARACTER*1
 
62
*>          Specifies whether the upper or lower triangular part of the
 
63
*>          symmetric matrix A is stored, and how B has been factorized.
 
64
*>          = 'U':  Upper triangular
 
65
*>          = 'L':  Lower triangular
 
66
*> \endverbatim
 
67
*>
 
68
*> \param[in] N
 
69
*> \verbatim
 
70
*>          N is INTEGER
 
71
*>          The order of the matrices A and B.  N >= 0.
 
72
*> \endverbatim
 
73
*>
 
74
*> \param[in,out] A
 
75
*> \verbatim
 
76
*>          A is REAL array, dimension (LDA,N)
 
77
*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
 
78
*>          n by n upper triangular part of A contains the upper
 
79
*>          triangular part of the matrix A, and the strictly lower
 
80
*>          triangular part of A is not referenced.  If UPLO = 'L', the
 
81
*>          leading n by n lower triangular part of A contains the lower
 
82
*>          triangular part of the matrix A, and the strictly upper
 
83
*>          triangular part of A is not referenced.
 
84
*>
 
85
*>          On exit, if INFO = 0, the transformed matrix, stored in the
 
86
*>          same format as A.
 
87
*> \endverbatim
 
88
*>
 
89
*> \param[in] LDA
 
90
*> \verbatim
 
91
*>          LDA is INTEGER
 
92
*>          The leading dimension of the array A.  LDA >= max(1,N).
 
93
*> \endverbatim
 
94
*>
 
95
*> \param[in] B
 
96
*> \verbatim
 
97
*>          B is REAL array, dimension (LDB,N)
 
98
*>          The triangular factor from the Cholesky factorization of B,
 
99
*>          as returned by SPOTRF.
 
100
*> \endverbatim
 
101
*>
 
102
*> \param[in] LDB
 
103
*> \verbatim
 
104
*>          LDB is INTEGER
 
105
*>          The leading dimension of the array B.  LDB >= max(1,N).
 
106
*> \endverbatim
 
107
*>
 
108
*> \param[out] INFO
 
109
*> \verbatim
 
110
*>          INFO is INTEGER
 
111
*>          = 0:  successful exit.
 
112
*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 
113
*> \endverbatim
 
114
*
 
115
*  Authors:
 
116
*  ========
 
117
*
 
118
*> \author Univ. of Tennessee 
 
119
*> \author Univ. of California Berkeley 
 
120
*> \author Univ. of Colorado Denver 
 
121
*> \author NAG Ltd. 
 
122
*
 
123
*> \date September 2012
 
124
*
 
125
*> \ingroup realSYcomputational
 
126
*
 
127
*  =====================================================================
1
128
      SUBROUTINE SSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
2
129
*
3
 
*  -- LAPACK routine (version 2.0) --
4
 
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
 
*     Courant Institute, Argonne National Lab, and Rice University
6
 
*     February 29, 1992
 
130
*  -- LAPACK computational routine (version 3.4.2) --
 
131
*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 
132
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
133
*     September 2012
7
134
*
8
135
*     .. Scalar Arguments ..
9
136
      CHARACTER          UPLO
13
140
      REAL               A( LDA, * ), B( LDB, * )
14
141
*     ..
15
142
*
16
 
c
17
 
* $Id: ssygs2.f 19697 2010-10-29 16:57:34Z d3y133 $
18
 
c
19
 
*  Purpose
20
 
*  =======
21
 
*
22
 
*  SSYGS2 reduces a real symmetric-definite generalized eigenproblem
23
 
*  to standard form.
24
 
*
25
 
*  If ITYPE = 1, the problem is A*x = lambda*B*x,
26
 
*  and A is overwritten by inv(U')*A*inv(U) or inv(L)*A*inv(L')
27
 
*
28
 
*  If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
29
 
*  B*A*x = lambda*x, and A is overwritten by U*A*U` or L'*A*L.
30
 
*
31
 
*  B must have been previously factorized as U'*U or L*L' by SPOTRF.
32
 
*
33
 
*  Arguments
34
 
*  =========
35
 
*
36
 
*  ITYPE   (input) INTEGER
37
 
*          = 1: compute inv(U')*A*inv(U) or inv(L)*A*inv(L');
38
 
*          = 2 or 3: compute U*A*U' or L'*A*L.
39
 
*
40
 
*  UPLO    (input) CHARACTER
41
 
*          Specifies whether the upper or lower triangular part of the
42
 
*          symmetric matrix A is stored, and how B has been factorized.
43
 
*          = 'U':  Upper triangular
44
 
*          = 'L':  Lower triangular
45
 
*
46
 
*  N       (input) INTEGER
47
 
*          The order of the matrices A and B.  N >= 0.
48
 
*
49
 
*  A       (input/output) REAL array, dimension (LDA,N)
50
 
*          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
51
 
*          n by n upper triangular part of A contains the upper
52
 
*          triangular part of the matrix A, and the strictly lower
53
 
*          triangular part of A is not referenced.  If UPLO = 'L', the
54
 
*          leading n by n lower triangular part of A contains the lower
55
 
*          triangular part of the matrix A, and the strictly upper
56
 
*          triangular part of A is not referenced.
57
 
*
58
 
*          On exit, if INFO = 0, the transformed matrix, stored in the
59
 
*          same format as A.
60
 
*
61
 
*  LDA     (input) INTEGER
62
 
*          The leading dimension of the array A.  LDA >= max(1,N).
63
 
*
64
 
*  B       (input) REAL array, dimension (LDB,N)
65
 
*          The triangular factor from the Cholesky factorization of B,
66
 
*          as returned by SPOTRF.
67
 
*
68
 
*  LDB     (input) INTEGER
69
 
*          The leading dimension of the array B.  LDB >= max(1,N).
70
 
*
71
 
*  INFO    (output) INTEGER
72
 
*          = 0:  successful exit.
73
 
*          < 0:  if INFO = -i, the i-th argument had an illegal value.
74
 
*
75
143
*  =====================================================================
76
144
*
77
145
*     .. Parameters ..
118
186
      IF( ITYPE.EQ.1 ) THEN
119
187
         IF( UPPER ) THEN
120
188
*
121
 
*           Compute inv(U')*A*inv(U)
 
189
*           Compute inv(U**T)*A*inv(U)
122
190
*
123
191
            DO 10 K = 1, N
124
192
*
143
211
   10       CONTINUE
144
212
         ELSE
145
213
*
146
 
*           Compute inv(L)*A*inv(L')
 
214
*           Compute inv(L)*A*inv(L**T)
147
215
*
148
216
            DO 20 K = 1, N
149
217
*
168
236
      ELSE
169
237
         IF( UPPER ) THEN
170
238
*
171
 
*           Compute U*A*U'
 
239
*           Compute U*A*U**T
172
240
*
173
241
            DO 30 K = 1, N
174
242
*
188
256
   30       CONTINUE
189
257
         ELSE
190
258
*
191
 
*           Compute L'*A*L
 
259
*           Compute L**T *A*L
192
260
*
193
261
            DO 40 K = 1, N
194
262
*