Skip to content

[WIP] Make readBinary and writeBinary work for more generic vector types

lh1887 requested to merge feature/generic-read-write-binary into master

In the genericvectortools.hh header are static methods readBinary and writeBinary. Personally, I do not use them at all (I must admit I don't even fully understand what they do), however, they're used in the LoopSolver (well, actually only writeBinary). The way they're currently implemented prevents use of any vector type that does not have Dune::FieldVector as lowest block type. While this is certainly the most common use case, I don't see that it must be hardcoded. In particular, my proposed change allows me to use the LoopSolver with more generic vector types.

Caveat: I could not really test my code, as I don't know for sure how to use the writeBinary mechanism. I can only say the produced gibberish from writing an ISTL block vector to std::cout looks the same for the old and new implementation. So, maybe someone who is actually using this can have a look?

Merge request reports