QMCPACK
BranchIO.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 //
11 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 
16 
17 #ifndef QMCPLUSPLUS_BRANCHIO_H
18 #define QMCPLUSPLUS_BRANCHIO_H
19 namespace qmcplusplus
20 {
21 template<class SFNB>
22 class BranchIO
23 {
24 public:
25  using RealType = typename SFNB::RealType;
26  using BranchModeType = typename SFNB::BranchModeType;
27  using IParamType = typename SFNB::IParamType;
28  using VParamType = typename SFNB::VParamType;
29 
30  SFNB& ref;
32  BranchIO(SFNB& source, Communicate* c) : ref(source), myComm(c) {}
33 
34  bool write(const std::string& fname);
35  bool read(const std::string& fname);
36  void bcast_state();
37 
38  // TODO: names should be defined with the enum in SimpleFixedNodeBranch.h
39  static std::vector<std::string> vParamName;
40  static std::vector<std::string> iParamName;
41 
42  static void initAttributes();
43 };
44 
45 extern template class BranchIO<SimpleFixedNodeBranch>;
46 
47 } // namespace qmcplusplus
48 #endif
BranchIO(SFNB &source, Communicate *c)
Definition: BranchIO.h:32
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
static void initAttributes()
Definition: BranchIO.cpp:82
typename SFNB::BranchModeType BranchModeType
Definition: BranchIO.h:26
Wrapping information on parallelism.
Definition: Communicate.h:68
bool read(const std::string &fname)
Definition: BranchIO.cpp:166
Communicate * myComm
Definition: BranchIO.h:31
static std::vector< std::string > iParamName
Definition: BranchIO.h:40
typename SFNB::VParamType VParamType
Definition: BranchIO.h:28
typename SFNB::RealType RealType
Definition: BranchIO.h:25
QMCTraits::RealType RealType
static std::vector< std::string > vParamName
Definition: BranchIO.h:39
bool write(const std::string &fname)
Definition: BranchIO.cpp:109
typename SFNB::IParamType IParamType
Definition: BranchIO.h:27
declare a handler of DMC branching