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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/shells_per_am.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
/*!
 
2
  \file
 
3
  \ingroup CHKPT
 
4
*/
 
5
 
 
6
#include <cstdlib>
 
7
#include <psifiles.h>
 
8
#include <libpsio/psio.hpp>
 
9
extern "C" {
 
10
        #include <libchkpt/chkpt.h>
 
11
}
 
12
#include <libchkpt/chkpt.hpp>
 
13
 
 
14
using namespace psi;
 
15
 
 
16
int *Chkpt::rd_shells_per_am(void)
 
17
{
 
18
        int *shells_per_am;
 
19
        int max_am;
 
20
        char *keyword;
 
21
        keyword = build_keyword("Shells per am");
 
22
 
 
23
        max_am = rd_max_am();
 
24
        shells_per_am = array<int>(max_am+1);
 
25
 
 
26
        psio->read_entry(PSIF_CHKPT, keyword, (char *) shells_per_am,
 
27
                (max_am+1)*sizeof(int));
 
28
 
 
29
        free(keyword);
 
30
        return shells_per_am; 
 
31
}
 
32
 
 
33
void Chkpt::wt_shells_per_am(int *shells_per_am)
 
34
{
 
35
        int max_am;
 
36
        char *keyword;
 
37
        keyword = build_keyword("Shells per am");
 
38
 
 
39
        max_am = rd_max_am();
 
40
 
 
41
        psio->write_entry(PSIF_CHKPT, keyword, (char *) shells_per_am,
 
42
                (max_am+1)*sizeof(int));
 
43
 
 
44
        free(keyword);
 
45
}
 
46
 
 
47
extern "C" {
 
48
/*!
 
49
** int *chkpt_rd_shells_per_am() 
 
50
** Reads in the numbers of shells of each angular momentum.
 
51
**
 
52
** returns: shells_per_am = array of shells per angular momentum
 
53
**
 
54
** \ingroup CHKPT
 
55
*/
 
56
        int *chkpt_rd_shells_per_am(void)
 
57
        {
 
58
                return _default_chkpt_lib_->rd_shells_per_am();
 
59
        }
 
60
 
 
61
/*!
 
62
** void chkpt_wt_shells_per_am(int *) 
 
63
** Writes out the numbers of shells of each angular momentum.
 
64
**
 
65
** \param shells_per_am = array of shells per angular momentum
 
66
**
 
67
** returns: none
 
68
**
 
69
** \ingroup CHKPT
 
70
*/
 
71
        void chkpt_wt_shells_per_am(int *shells_per_am)
 
72
        {
 
73
                _default_chkpt_lib_->wt_shells_per_am(shells_per_am);
 
74
        }
 
75
}