MPQC  3.0.0-alpha
mpqcinit.h
1 
2 #ifndef _mpqcinit_h
3 #define _mpqcinit_h
4 
5 #include <mpqc_config.h>
6 #include <util/options/GetLongOpt.h>
7 #include <util/keyval/keyval.h>
8 #include <util/group/message.h>
9 #include <util/group/thread.h>
10 #include <util/group/memory.h>
11 #include <string>
12 
13 namespace sc {
14 
17 
21  class MPQCInit {
22  GetLongOpt& opt_;
23  char **argv_;
24  int &argc_;
25 
27  static MPQCInit* instance_;
28 
29  public:
30 
38  MPQCInit(GetLongOpt&opt, int &argc, char **argv);
39 
40  ~MPQCInit();
41 
43  static MPQCInit* instance() { return instance_; }
44 
46  void init_fp();
48  void init_limits();
53  const std::string &filename);
54 
59 
67  void init_integrals(Ref<KeyVal> keyval = Ref<KeyVal>());
69  void init_resources(Ref<KeyVal> keyval = Ref<KeyVal>());
71  void init_timer(const Ref<MessageGrp> &grp, Ref<KeyVal> keyval = Ref<KeyVal>());
73 
75  void init_io(const sc::Ref<sc::MessageGrp> &grp);
77  void init_basename(const std::string &input_filename,
78  const std::string &output_filename = "");
82  sc::Ref<sc::KeyVal> init(const std::string &input_filename,
83  const std::string &output_filename = "");
84 
85 
86  private:
89  void finalize();
90 
91  };
92 
94  // end of addtogroup Init
95 
96 }
97 
98 #endif
sc::MPQCInit::init_limits
void init_limits()
Initialize the resource limits.
sc::MPQCInit::init_timer
void init_timer(const Ref< MessageGrp > &grp, Ref< KeyVal > keyval=Ref< KeyVal >())
Initialize the default region timer.
sc::MPQCInit
This helper class simplifies initialization of MPQC.
Definition: mpqcinit.h:21
sc::MPQCInit::init_integrals
void init_integrals(Ref< KeyVal > keyval=Ref< KeyVal >())
Initialize the default integral factory.
sc::MPQCInit::init_basename
void init_basename(const std::string &input_filename, const std::string &output_filename="")
Initialize the name used to construct data file names.
sc::Ref< sc::MessageGrp >
sc::MPQCInit::init
sc::Ref< sc::KeyVal > init(const std::string &input_filename, const std::string &output_filename="")
Calls all of the initialize routines in the proper sequence.
sc::MPQCInit::init_memorygrp
sc::Ref< sc::MemoryGrp > init_memorygrp(Ref< sc::KeyVal > keyval=Ref< KeyVal >())
Return the initial MemoryGrp.
sc::MPQCInit::init_keyval
sc::Ref< sc::KeyVal > init_keyval(const sc::Ref< sc::MessageGrp > &grp, const std::string &filename)
Return the initial KeyVal object.
sc::MPQCInit::instance
static MPQCInit * instance()
returns ptr to the only instance of this object; 0 if has not been constructed
Definition: mpqcinit.h:43
sc::MPQCInit::init_messagegrp
sc::Ref< sc::MessageGrp > init_messagegrp()
Return the initial MessageGrp object.
sc::MPQCInit::init_fp
void init_fp()
Initialize the floating point control word.
sc::MPQCInit::init_resources
void init_resources(Ref< KeyVal > keyval=Ref< KeyVal >())
Initialize the default ConsumableResources object.
sc::MPQCInit::MPQCInit
MPQCInit(GetLongOpt &opt, int &argc, char **argv)
Create the initializer.
sc::MPQCInit::init_io
void init_io(const sc::Ref< sc::MessageGrp > &grp)
Initialize formatted I/O.
sc::MPQCInit::init_threadgrp
sc::Ref< sc::ThreadGrp > init_threadgrp(Ref< sc::KeyVal > keyval=Ref< KeyVal >())
Return the initial ThreadGrp.
sc::GetLongOpt
Parse command line options.
Definition: GetLongOpt.h:16
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

Generated at Sun Jan 26 2020 23:23:56 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.