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

« back to all changes in this revision

Viewing changes to src/bin/detcas/cleanup.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 DETCAS
 
3
    \brief Enter brief description of file here 
 
4
*/
 
5
#include <cstdlib>
 
6
#include <cstdio>
 
7
#include <libipv1/ip_lib.h>
 
8
#include <libciomr/libciomr.h>
 
9
#include <libqt/qt.h>
 
10
#include "globaldefs.h"
 
11
#include "globals.h"
 
12
 
 
13
namespace psi { namespace detcas {
 
14
 
 
15
/*
 
16
** cleanup()
 
17
**
 
18
** This function frees any allocated global variables
 
19
**
 
20
*/
 
21
void cleanup(void)
 
22
{
 
23
  int i;
 
24
  
 
25
  free(CalcInfo.docc);
 
26
  free(CalcInfo.socc);
 
27
  free(CalcInfo.frozen_docc);
 
28
  free(CalcInfo.frozen_uocc);
 
29
  free(CalcInfo.rstr_docc);
 
30
  free(CalcInfo.rstr_uocc);
 
31
  free(CalcInfo.orbsym);
 
32
  free(CalcInfo.pitz2ci);
 
33
  free(CalcInfo.ci2pitz);
 
34
  free(CalcInfo.ci2relpitz);
 
35
  free(CalcInfo.first);
 
36
  free(CalcInfo.last);
 
37
  free(CalcInfo.fstact);
 
38
  free(CalcInfo.lstact);
 
39
  free(CalcInfo.active);
 
40
  free_int_matrix(CalcInfo.ras_opi);
 
41
  free_int_matrix(CalcInfo.fzc_orbs);
 
42
  free_int_matrix(CalcInfo.fzv_orbs);
 
43
  for (i=0; i<MAX_RAS_SPACES; i++) 
 
44
    free_int_matrix(CalcInfo.ras_orbs[i]);
 
45
  free(CalcInfo.ras_orbs);
 
46
  for (i=0; i<CalcInfo.nirreps; i++) 
 
47
    free(CalcInfo.labels[i]);
 
48
 
 
49
  for (i=0; i<CalcInfo.nirreps; i++) {
 
50
    if (CalcInfo.orbs_per_irr[i]) 
 
51
      free_block(CalcInfo.mo_coeffs[i]);
 
52
  }
 
53
  free(CalcInfo.mo_coeffs);
 
54
 
 
55
  free(CalcInfo.onel_ints);
 
56
  free(CalcInfo.twoel_ints);
 
57
  free_block(CalcInfo.opdm);
 
58
  free(CalcInfo.tpdm);
 
59
  free_block(CalcInfo.lag);
 
60
  free(CalcInfo.F_act);
 
61
  free(CalcInfo.mo_grad);
 
62
  if (CalcInfo.mo_hess_diag != NULL) free(CalcInfo.mo_hess_diag);
 
63
  if (CalcInfo.mo_hess != NULL) free_block(CalcInfo.mo_hess);
 
64
  free(CalcInfo.theta_cur);
 
65
  free(CalcInfo.theta_step);
 
66
  free(CalcInfo.orbs_per_irr);
 
67
}
 
68
 
 
69
}} // end namespace psi::detcas
 
70