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

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/puream.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
bool Chkpt::rd_puream(void)
 
17
{
 
18
        int puream;
 
19
        char *keyword;
 
20
        keyword = build_keyword("Pure Harmonics?");
 
21
 
 
22
        psio->read_entry(PSIF_CHKPT, keyword, (char *) &puream, sizeof(int));
 
23
 
 
24
        free(keyword);
 
25
        return (puream == 1);
 
26
}
 
27
 
 
28
void Chkpt::wt_puream(bool puream)
 
29
{
 
30
        char *keyword;
 
31
        keyword = build_keyword("Pure Harmonics?");
 
32
 
 
33
        int p = puream ? 1 : 0;
 
34
        psio->write_entry(PSIF_CHKPT, keyword, (char *) &p, sizeof(int));
 
35
 
 
36
        free(keyword);
 
37
}
 
38
 
 
39
extern "C" {
 
40
/*!
 
41
**  int chkpt_rd_puream()
 
42
**  Reads whether cartesian or spherical harmonics are used (Psi is currently
 
43
**  limited to only using one type of functions at a time)
 
44
**
 
45
**  returns: 1 (harmonics) or 0 (cartesian)
 
46
**  \ingroup CHKPT
 
47
*/
 
48
        int chkpt_rd_puream(void)
 
49
        {
 
50
                return _default_chkpt_lib_->rd_puream() ? 1 : 0;
 
51
        }
 
52
 
 
53
/*!
 
54
**  void chkpt_wt_puream(int)
 
55
**  Writes whether cartesian or spherical harmonics are used (Psi is currently
 
56
**  limited to only using one type of functions at a time)
 
57
**
 
58
**  \param 1 (harmonics) or 0 (cartesian)
 
59
**
 
60
**  returns: none
 
61
**  \ingroup CHKPT
 
62
*/
 
63
        void chkpt_wt_puream(int puream)
 
64
        {
 
65
                _default_chkpt_lib_->wt_puream(puream == 1);
 
66
        }
 
67
}