Checkpointing with Virtual Outlet

Basically, what I am trying to do is add checkpoints (as in examples/codesByTopic/io/checkpointing.cpp) to the external-flow-around-obstacle problem (examples/showCases/externalFlowAroundObstacle).

So far, I have tried a few variations and the most succesful seems to be the following (I actually used my own code, therefore there are a few minor deviations from the externalFlowAroundObstacle example in terms of parameter names etc., but the idea should be analogous)

(instead of the equivalent to lines 482-485 in said example):

[code=“cpp”]
initializeAtEquilibrium (*lattice, lattice->getBoundingBox(),
InitialVelocityAndDensity(parameters, 0) );

if(codeInput.startT>0){
lattice->executeInternalProcessors(2);
checkpointName << “checkpointLattice” << codeInput.startT-dt << “.dat”;
loadBinaryBlock(*lattice, checkpointName.str());
checkpointName.str("");
}

// Execute all processors except the ones at level 0.
lattice->executeInternalProcessors(1);
if(codeInput.startT==0.0) lattice->executeInternalProcessors(2);
lattice->executeInternalProcessors(3);



I am checking whether everything is going as planned by printing the average energy at each iteration.

I've run the code
1) for ~1509 iterations without checkpointing and 
2) for 1009 + an additional 500 iterations (i.e. with a checkpoint save after 1009 iterations). 

If all goes well, I would expect the output to be identical for both cases. While the average energy at the 1009th iteration is identical (0.03567200244), it deviates at the 1010th iteration (0.03575590443 for case 1 vs. 0.03575481103 for case 2). Although this is no huge difference, I would like to eventually know that I have no disadvantage from running from checkpoints at all.

I would greatly appreciate any help on this matter. Sorry for the long post - but I thought I'd provide any info I have!