TrajectoryElement: initialize and rename logWritingStep_
authorAndrey Alekseenko <al42and@gmail.com>
Thu, 22 Oct 2020 06:49:25 +0000 (06:49 +0000)
committerArtem Zhmurov <zhmurov@gmail.com>
Thu, 22 Oct 2020 06:49:25 +0000 (06:49 +0000)
src/gromacs/modularsimulator/trajectoryelement.cpp
src/gromacs/modularsimulator/trajectoryelement.h

index bf00357f377b09dfd24e7c14d9a6ab3cbf7cfd3b..5a4b55cbabf164a515d282bca1642c5c52cb8272 100644 (file)
@@ -65,6 +65,7 @@ TrajectoryElement::TrajectoryElement(std::vector<ITrajectoryWriterClient*> write
                                      const bool                            simulationsShareState) :
     writeEnergyStep_(-1),
     writeStateStep_(-1),
+    writeLogStep_(-1),
     outf_(init_mdoutf(fplog,
                       nfile,
                       fnm,
@@ -122,7 +123,7 @@ void TrajectoryElement::scheduleTask(Step step, Time time, const RegisterRunFunc
 {
     const bool writeEnergyThisStep = writeEnergyStep_ == step;
     const bool writeStateThisStep  = writeStateStep_ == step;
-    const bool writeLogThisStep    = logWritingStep_ == step;
+    const bool writeLogThisStep    = writeLogStep_ == step;
     if (writeEnergyThisStep || writeStateThisStep || writeLogThisStep)
     {
         registerRunFunction([this, step, time, writeStateThisStep, writeEnergyThisStep, writeLogThisStep]() {
@@ -161,7 +162,7 @@ void TrajectoryElement::write(Step step, Time time, bool writeState, bool writeE
 
 std::optional<SignallerCallback> TrajectoryElement::registerLoggingCallback()
 {
-    return [this](Step step, Time /*unused*/) { logWritingStep_ = step; };
+    return [this](Step step, Time /*unused*/) { writeLogStep_ = step; };
 }
 
 std::optional<SignallerCallback> TrajectoryElement::registerTrajectorySignallerCallback(TrajectoryEvent event)
index a0b3d05e603d639ca96c7f160eace680781e2d04..5b3d60001948fda0823b66bcf714070214f003a0 100644 (file)
@@ -148,7 +148,7 @@ private:
     //! The next state writing step
     Step writeStateStep_;
     //! The next communicated log writing step
-    Step logWritingStep_;
+    Step writeLogStep_;
 
     //! The output object
     gmx_mdoutf* outf_;