~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/contr_full.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
 
/*!
2
 
  \file contr_full.c
3
 
  \ingroup CHKPT
4
 
*/
5
 
 
6
 
#include <stdio.h>
7
 
#include <stdlib.h>
8
 
#include <libciomr/libciomr.h>
9
 
#include "chkpt.h"
10
 
#include <psifiles.h>
11
 
#include <libpsio/psio.h>
12
 
 
13
 
/*!
14
 
** chkpt_rd_contr_full(): Reads in the normalized contraction coefficients.
15
 
**
16
 
**  takes no arguments.
17
 
**
18
 
**  returns: double **contr Normalized contraction coefficients are
19
 
**  returned as a matrix of doubles.
20
 
** \ingroup (CHKPT)
21
 
*/
22
 
 
23
 
double **chkpt_rd_contr_full(void)
24
 
{
25
 
  double **contr, *temp_contr;
26
 
  int nprim, i, j, ij = 0;
27
 
  char *keyword;
28
 
  keyword = chkpt_build_keyword("Contraction coefficients");
29
 
 
30
 
  nprim = chkpt_rd_nprim();
31
 
 
32
 
  temp_contr = init_array(MAXANGMOM*nprim);
33
 
  contr = block_matrix(nprim,MAXANGMOM);
34
 
 
35
 
  psio_read_entry(PSIF_CHKPT, keyword, (char *) temp_contr,
36
 
                  MAXANGMOM*nprim*sizeof(double));
37
 
 
38
 
  /* Picking non-zero coefficients to the "master" array contr */
39
 
  for(i=0,ij=0; i < MAXANGMOM; i++) 
40
 
    for(j=0; j < nprim; j++, ij++) {
41
 
      contr[j][i] = temp_contr[ij];
42
 
    }
43
 
 
44
 
  free(temp_contr);
45
 
  free(keyword);
46
 
  return contr;
47
 
}
48