MyraMath
Tutorial for /io routines.

Overview

This folder contains routines for serializing primitive types (like int, float and std::complex), STL containers of primitives (like vector, list and map), and STL containers of pointers to user defined types. Most container objects in the library (like Vector, Matrix and SparseMatrix) define serialization and deserialization methods, typically in the form of an object.write(OutputStream&) member function and an Object(InputStream&) constructor.

Higher level solver objects (like SparseRCholeskySolver) provide similar methods, which serialize (and deserialize) all ancillary data (reordering, symbolic factorization structures, triangular factors) encapsulated together into one file. Modest out-of-core-like capability can be cobbled together by purging heavy data structures (like solvers and large matrices) into files on disk when they are not needed.

For instance, in a substructuring framework, direct solvers could be constructed to factor interior subdomain problems, and used to schur complement to their interfaces. Then, the subdomain solvers could be serialized to disk to free up room for preconditioner structures/long Arnoldi sequences while the interface problem is iterated using gmres(). Once the iterative solve is complete, the subdomain solvers can be pulled back in from disk to reconstruct the full solution on the interiors.

Go back to API Tutorials