Skip to content

fix a problem with mixing ascii and binary output

Andreas Dedner requested to merge bugfix/backuprestore into master

The howto/example-dataio doesn't work any more (using yaspgrid). Problem seems to be that in datawriter.hh in the lines 283 std::ostream& stream = PersistenceManager :: backupStream().stream(); 284 Dune::BackupRestoreFacility< GridType > :: backup( grid_, stream); the ostream on which StandardOutStream is based is passed into the BackupRestore implementation of yaspgrid. The last bytes that adds to the stream is stream << " " << std::endl; Those two bytes are not picked up during restore so the persistent objects stored in the same file get corrupted (the timeprovider in this case).

This patch adds a tag (with a fixed whitespace). This might not be optimal but it seems to fix the problem

should be backported into 2.5

Merge request reports