Simpatico  v1.10
SerializeConfigIo.h
1 #ifndef DDMD_DDMD_SERIALIZE_CONFIG_IO_H
2 #define DDMD_DDMD_SERIALIZE_CONFIG_IO_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <ddMd/configIos/ConfigIo.h>
12 #include <util/archives/Serializable.h>
13 
14 namespace DdMd
15 {
16 
17  class Simulation;
18 
19  using namespace Util;
20 
31  class SerializeConfigIo : public ConfigIo
32  {
33 
34  public:
35 
40 
46  SerializeConfigIo(Simulation& simulation);
47 
60  virtual void readConfig(std::ifstream& file, MaskPolicy maskPolicy);
61 
72  virtual void writeConfig(std::ofstream& file);
73 
88  void loadConfig(Serializable::IArchive& ar, MaskPolicy maskPolicy);
89 
109  void saveConfig(Serializable::OArchive& ar);
110 
111  private:
112 
116  template <int N>
117  int loadGroups(Serializable::IArchive& ar,
118  GroupDistributor<N>& distributor);
119 
123  template <int N>
124  int saveGroups(Serializable::OArchive& ar,
125  GroupStorage<N>& storage, GroupCollector<N>& collector);
126 
127  };
128 
129 }
130 #endif
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
Saving / output archive for binary ostream.
Class for collecting Groups from processors to master processor.
Utility classes for scientific computation.
Definition: accumulators.mod:1
MaskPolicy
Enumeration of policies for suppressing ("masking") some pair interactions.
A container for all the Group<N> objects on this processor.
Saving archive for binary istream.
Abstract reader/writer for configuration files.
Save / load configuration from / to an archive.
Class template for distributing Group<N> objects among processors.