5
/* dpd_buf4_dirprd(): Computes the direct product between two dpd four-index
9
** dpdbuf4 *BufA, *BufB: Pointers to the dpd four-index buffers.
10
** The results is written to FileB.
13
int dpd_buf4_dirprd(dpdbuf4 *BufA, dpdbuf4 *BufB)
15
int h, nirreps, my_irrep;
18
nirreps = BufA->params->nirreps;
19
my_irrep = BufA->file.my_irrep;
21
for(h=0; h < nirreps; h++) {
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);
28
dirprd_block(BufA->matrix[h], BufB->matrix[h],
29
BufA->params->rowtot[h], BufA->params->coltot[h^my_irrep]);
31
dpd_buf4_mat_irrep_wrt(BufB, h);
32
dpd_buf4_mat_irrep_close(BufA, h);
33
dpd_buf4_mat_irrep_close(BufB, h);