Jonathan,
> I am implementing an algorithm in which I need to save some data and the > distributed solution vector at each time increment for later use. Since this > is potentially a lot of data that I cannot store in available memory I would > like to be able to write this data out to binary files which I may read back > in later. Is there a good data structure in dealii that might allow me to do > this? I see "block_write" in the non-distributed Vector<double> class but I > do > not see this write/read functionality in the FullMatrix or distributed vector > classes. Perhaps there is a better way to do what I want with some data > structure I am unfamiliar with. I suspect that no way currently exists for what you want to do with these two classes. But it shouldn't be very hard to do. If you take a look at the implementation of Vector::block_write/read(), you will immediately see how to do that in FullMatrix as well. We'd definitely like to integrate any patch you come up with in this regard! distributed::Vector may be more complicated because the data structures that store such vectors are more complicated than in the case of FullMatrix (which really only stores the sizes of the matrix, plus the actual data in a flat array). But it should be possible to write such functions nonetheless. A more elegant way may, however, be to use the serialization functionality we have for many classes. Take a look, for example, at this test, for example: https://github.com/dealii/dealii/blob/master/tests/serialization/table_2.cc The verify() function is defined here: https://github.com/dealii/dealii/blob/master/tests/serialization/serialization.h The test shows how to serialize data for a Table<2,T>, which the base class for FullMatrix<T>. We use serialization of objects in several large projects. It works pretty well. Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: [email protected] www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
