am2canon_shell_order.cc

Go to the documentation of this file.
00001 
00008 #include <stdlib.h>
00009 #include <psifiles.h>
00010 #include <libpsio/psio.hpp>
00011 extern "C" {
00012         #include <libchkpt/chkpt.h>
00013 }
00014 #include <libchkpt/chkpt.hpp>
00015 
00016 using namespace psi;
00017 
00028 int *Chkpt::rd_am2canon_shell_order(void)
00029 {
00030         int *am2can_sh_ord, nshell;
00031         char *keyword;
00032         keyword = build_keyword("AM -> canonical shell map"); 
00033 
00034         nshell = rd_nshell();
00035         am2can_sh_ord = array<int>(nshell);
00036 
00037         psio->read_entry(PSIF_CHKPT, keyword, (char *) am2can_sh_ord,
00038                 nshell*sizeof(int));
00039 
00040         free(keyword);
00041         return am2can_sh_ord;
00042 }
00043 
00056 void Chkpt::wt_am2canon_shell_order(int *am2can_sh_ord)
00057 {
00058         int nshell;
00059         char *keyword;
00060         keyword = build_keyword("AM -> canonical shell map");
00061 
00062         nshell = rd_nshell();
00063 
00064         psio->write_entry(PSIF_CHKPT, keyword, (char *) am2can_sh_ord,
00065                 nshell*sizeof(int));
00066 
00067   free(keyword);
00068 }
00069 
00070 extern "C" {
00081         int *chkpt_rd_am2canon_shell_order(void)
00082         {
00083                 return _default_chkpt_lib_->rd_am2canon_shell_order();
00084         }
00085 
00098         void chkpt_wt_am2canon_shell_order(int *am2can_sh_ord)
00099         {
00100                 _default_chkpt_lib_->wt_am2canon_shell_order(am2can_sh_ord);
00101         }
00102 }
00103 

Generated on Wed Feb 13 16:35:39 2008 for PSI by  doxygen 1.5.4