[cig-commits] [commit] master: Fixed sweep index counting and recording (891d1af)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Oct 8 17:06:04 PDT 2014


Repository : https://github.com/geodynamics/vc

On branch  : master
Link       : https://github.com/geodynamics/vc/compare/23464fca3efa2b6ad7ee0ce8f60c225b18b49741...e4325192ad1118379f46ba66899cb98143d09e04

>---------------------------------------------------------------

commit 891d1af44cfeaa917b42f734568cd386020042d3
Author: Eric Heien <emheien at ucdavis.edu>
Date:   Thu Sep 25 14:12:32 2014 -0700

    Fixed sweep index counting and recording


>---------------------------------------------------------------

891d1af44cfeaa917b42f734568cd386020042d3
 src/io/EventOutput.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/io/EventOutput.cpp b/src/io/EventOutput.cpp
index ac54e32..04a9b1b 100644
--- a/src/io/EventOutput.cpp
+++ b/src/io/EventOutput.cpp
@@ -136,16 +136,16 @@ void EventOutput::init(SimFramework *_sim) {
 SimRequest EventOutput::run(SimFramework *_sim) {
     VCSimulation        *sim = static_cast<VCSimulation *>(_sim);
 
+    unsigned int num_sweeps = sim->getCurrentEvent().getSweeps().size();
+    sim->getCurrentEvent().setStartEndSweep(sweep_count, sweep_count+num_sweeps);
+    sweep_count += num_sweeps;
     if (sim->getEventOutfileType() == "hdf5") {
 #ifdef HDF5_FOUND
         sim->getCurrentEvent().append_event_hdf5(data_file);
 #endif
     } else if (sim->getEventOutfileType() == "text") {
-        unsigned int num_sweeps = sim->getCurrentEvent().getSweeps().size();
         // Write the event details
         sim->getCurrentEvent().write_ascii(event_outfile);
-        sim->getCurrentEvent().setStartEndSweep(sweep_count, sweep_count+num_sweeps);
-        sweep_count += num_sweeps;
         event_outfile.flush();
 
         // Write the sweep details



More information about the CIG-COMMITS mailing list