~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

Viewing changes to src/lib/libdpd/buf4_dirprd.c

  • 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
 
#include <stdio.h>
2
 
#include <libqt/qt.h>
3
 
#include "dpd.h"
4
 
 
5
 
/* dpd_buf4_dirprd(): Computes the direct product between two dpd four-index
6
 
** buffers.
7
 
**
8
 
** Arguments:
9
 
**   dpdbuf4 *BufA, *BufB: Pointers to the dpd four-index buffers.
10
 
**  The results is written to FileB.
11
 
*/
12
 
 
13
 
int dpd_buf4_dirprd(dpdbuf4 *BufA, dpdbuf4 *BufB)
14
 
{
15
 
  int h, nirreps, my_irrep;
16
 
  int row, col;
17
 
 
18
 
  nirreps = BufA->params->nirreps;
19
 
  my_irrep = BufA->file.my_irrep;
20
 
 
21
 
  for(h=0; h < nirreps; h++) {
22
 
 
23
 
      dpd_buf4_mat_irrep_init(BufA, h);
24
 
      dpd_buf4_mat_irrep_init(BufB, h);
25
 
      dpd_buf4_mat_irrep_rd(BufA, h);
26
 
      dpd_buf4_mat_irrep_rd(BufB, h);
27
 
 
28
 
      dirprd_block(BufA->matrix[h], BufB->matrix[h],
29
 
                   BufA->params->rowtot[h], BufA->params->coltot[h^my_irrep]);
30
 
 
31
 
      dpd_buf4_mat_irrep_wrt(BufB, h);
32
 
      dpd_buf4_mat_irrep_close(BufA, h);
33
 
      dpd_buf4_mat_irrep_close(BufB, h);
34
 
    }
35
 
 
36
 
  return 0;
37
 
}
38