Simpatico  v1.10
LogProgress.cpp
1 /*
2 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
3 *
4 * Copyright 2010 - 2017, The Regents of the University of Minnesota
5 * Distributed under the terms of the GNU General Public License.
6 */
7 
8 #include "LogProgress.h"
9 #include <util/misc/Log.h>
10 
11 namespace McMd
12 {
13 
14  using namespace Util;
15 
16  /*
17  * Constructor.
18  */
20  { setClassName("LogProgress"); }
21 
22  /*
23  * Read interval.
24  */
25  void LogProgress::readParameters(std::istream& in)
26  { readInterval(in); }
27 
28  /*
29  * Load interval and empty outputFileName.
30  */
32  {
33  loadInterval(ar); // Load value and add to param file format.
34  ar & outputFileName_; // Load empty string, don't add to format.
35  }
36 
37  /*
38  * Dump configuration to file
39  */
40  void LogProgress::sample(long iStep)
41  {
42  if (isAtInterval(iStep)) {
43  Log::file() << "iStep = " << iStep << std::endl;
44  }
45  }
46 
47 }
LogProgress()
Constructor.
Definition: LogProgress.cpp:19
void sample(long iStep)
Write iStep to Log file.
Definition: LogProgress.cpp:40
Utility classes for scientific computation.
Definition: accumulators.mod:1
virtual void readParameters(std::istream &in)
Read interval parameter.
Definition: LogProgress.cpp:25
static std::ostream & file()
Get log ostream by reference.
Definition: Log.cpp:57
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
virtual void loadParameters(Serializable::IArchive &ar)
Load interval from archive.
Definition: LogProgress.cpp:31