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

« back to all changes in this revision

Viewing changes to src/lib/libdpd/trans4_mat_irrep_close.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 <stdlib.h>
3
 
#include <libciomr/libciomr.h>
4
 
#include "dpd.h"
5
 
#define EXTERN
6
 
#include "dpd.gbl"
7
 
 
8
 
int dpd_trans4_mat_irrep_close(dpdtrans4 *Trans, int irrep)
9
 
{
10
 
  int h, nirreps, rowtot, coltot, all_buf_irrep;
11
 
  long int size;
12
 
 
13
 
  all_buf_irrep = Trans->buf.file.my_irrep;
14
 
  nirreps = Trans->buf.params->nirreps;
15
 
  rowtot = Trans->buf.params->coltot[irrep^all_buf_irrep];
16
 
  coltot = Trans->buf.params->rowtot[irrep];
17
 
  size = ((long) rowtot) * ((long) coltot);
18
 
 
19
 
  /* Free the shift structure for this irrep if used */
20
 
  if(Trans->shift.shift_type) {
21
 
      for(h=0; h < nirreps; h++)
22
 
          if(Trans->shift.rowtot[irrep][h])
23
 
              free(Trans->shift.matrix[irrep][h]);
24
 
      free(Trans->shift.matrix[irrep]);
25
 
      Trans->shift.shift_type = 0;
26
 
    }
27
 
 
28
 
  if(size)
29
 
      dpd_free_block(Trans->matrix[irrep], rowtot, coltot);
30
 
  
31
 
  return 0;
32
 
}