~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libqt/filter.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
/*!
 
2
  \file
 
3
  \brief Filter out unneeded frozen core/virt integrals
 
4
  \ingroup QT
 
5
*/
 
6
 
 
7
extern "C" {
 
8
        
 
9
/*!
 
10
** filter(): Filter out undesired (frozen core/virt) integrals
 
11
**
 
12
** Given a lower-triangle array of integrals in the full
 
13
** space of orbitals as well as numbers of frozen core and virtual
 
14
** orbitals, this function returns a list of integrals involving only
 
15
** active orbitals.
 
16
**
 
17
** TDC, June 2001
 
18
**
 
19
** Note: Based on the code written by CDS in the original
 
20
** iwl_rd_one_all_act() function in LIBIWL.
 
21
**
 
22
** \ingroup QT
 
23
*/
 
24
 
 
25
void filter(double *input, double *output, int *ioff, int norbs, 
 
26
            int nfzc, int nfzv)
 
27
{
 
28
  int i, j, ij, IJ;
 
29
  int nact;
 
30
 
 
31
  nact = norbs - nfzc - nfzv;
 
32
 
 
33
  for(i=0,ij=0; i < nact; i++) {
 
34
    for(j=0; j <= i; j++,ij++) {
 
35
      IJ = ioff[i+nfzc] + (j + nfzc);
 
36
      output[ij] = input[IJ];
 
37
    }
 
38
  }
 
39
}
 
40
 
 
41
} /* extern "C" */