~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/bin/ccenergy/diis.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*! \file
 
2
    \ingroup CCENERGY
 
3
    \brief Enter brief description of file here 
 
4
*/
 
5
#include <cstdio>
 
6
#include <cstdlib>
 
7
#include <cmath>
 
8
#include <libciomr/libciomr.h>
 
9
#include <libpsio/psio.h>
 
10
#include <libdpd/dpd.h>
 
11
#include <libqt/qt.h>
 
12
#include <psifiles.h>
 
13
#include "Params.h"
 
14
#define EXTERN
 
15
#include "globals.h"
 
16
 
 
17
namespace psi { namespace ccenergy {
 
18
 
 
19
/*
 
20
** DIIS: Direct inversion in the iterative subspace routine to
 
21
** accelerate convergence of the CCSD amplitude equations.
 
22
**
 
23
** Substantially improved efficiency of this routine:
 
24
** (1) Keeping at most two error vectors in core at once.
 
25
** (2) Limiting direct product (overlap) calculation to unique pairs.
 
26
** (3) Using LAPACK's linear equation solver DGESV instead of flin.
 
27
**
 
28
** -TDC  12/22/01
 
29
** -Modifications for ROHF and UHF, TDC, 6/03
 
30
*/
 
31
 
 
32
void diis_RHF(int);
 
33
void diis_ROHF(int);
 
34
void diis_UHF(int);
 
35
 
 
36
void diis(int iter)
 
37
{
 
38
  if(params.ref == 0) diis_RHF(iter);
 
39
  else if(params.ref == 1) diis_ROHF(iter);
 
40
  else if(params.ref == 2) diis_UHF(iter);
 
41
 
 
42
  return;
 
43
}
 
44
}} // namespace psi::ccenergy