@@ -297,14 +297,16 @@ void evolve(Grid &par,
297297 }
298298 // Write out the newly specified potential
299299 // and exp potential to files
300- FileIO::writeOutDouble (buffer, data_dir + " V_opt_1" ,
301- V_opt, xDim * yDim, 0 );
302- FileIO::writeOut (buffer, data_dir + " EV_opt_1" , EV_opt,
303- xDim * yDim, 0 );
304-
305- // Store necessary parameters to Params.dat file.
306- FileIO::writeOutParam (buffer, par,
307- data_dir + " Params.dat" );
300+ if (write_it){
301+ FileIO::writeOutDouble (buffer, data_dir + " V_opt_1" ,
302+ V_opt, xDim * yDim, 0 );
303+ FileIO::writeOut (buffer, data_dir + " EV_opt_1" , EV_opt,
304+ xDim * yDim, 0 );
305+
306+ // Store necessary parameters to Params.dat file.
307+ FileIO::writeOutParam (buffer, par,
308+ data_dir + " Params.dat" );
309+ }
308310 }
309311 // If i!=0 and the number of vortices changes
310312 // if num_vortices[1] < num_vortices[0] ... Fewer vortices
@@ -316,8 +318,10 @@ void evolve(Grid &par,
316318 wfc, xDim);
317319 Tracker::vortArrange (vortCoords->getVortices (),
318320 vortCoordsP->getVortices ());
319- FileIO::writeOutInt (buffer, data_dir + " vLoc_" ,
320- vortexLocation, xDim * yDim, i);
321+ if (write_it){
322+ FileIO::writeOutInt (buffer, data_dir + " vLoc_" ,
323+ vortexLocation, xDim * yDim, i);
324+ }
321325 }
322326 }
323327
@@ -408,9 +412,11 @@ void evolve(Grid &par,
408412 lattice.getVortices ().size (),
409413 sizeof (double ));
410414 lattice.genAdjMat (adjMat);
411- FileIO::writeOutAdjMat (buffer, data_dir + " graph" ,
412- adjMat, uids,
413- lattice.getVortices ().size (), i);
415+ if (write_it){
416+ FileIO::writeOutAdjMat (buffer, data_dir + " graph" ,
417+ adjMat, uids,
418+ lattice.getVortices ().size (), i);
419+ }
414420
415421 // Free and clear all memory blocks
416422 free (adjMat);
@@ -421,8 +427,10 @@ void evolve(Grid &par,
421427 }
422428
423429 // Write out the vortex locations
424- FileIO::writeOutVortex (buffer, data_dir + " vort_arr" ,
425- vortCoords->getVortices (), i);
430+ if (write_it){
431+ FileIO::writeOutVortex (buffer, data_dir + " vort_arr" ,
432+ vortCoords->getVortices (), i);
433+ }
426434 printf (" Located %d vortices\n " ,
427435 vortCoords->getVortices ().size ());
428436
0 commit comments