Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions source/postprocess/visualization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,13 @@ namespace aspect
void
Visualization<dim>::save (std::map<std::string, std::string> &status_strings) const
{
// First let all the visualization postprocessors save their data in a
// map that we can then serialize:
std::map<std::string,std::string> saved_postprocessors;
for (const auto &p : postprocessors)
p->save (saved_postprocessors);


// Serialize into a stringstream. Put the following into a code
// block of its own to ensure the destruction of the 'oa'
// archive triggers a flush() on the stringstream so we can
Expand All @@ -1476,11 +1483,10 @@ namespace aspect
{
aspect::oarchive oa (os);
oa << (*this);
oa << saved_postprocessors;
}

status_strings["Visualization"] = os.str();

//TODO: do something about the visualization postprocessor plugins
}


Expand All @@ -1494,9 +1500,14 @@ namespace aspect
std::istringstream is (status_strings.find("Visualization")->second);
aspect::iarchive ia (is);
ia >> (*this);
}

//TODO: do something about the visualization postprocessor plugins
// Now also retrieve information about visualization postprocessors we
// may have serialized
std::map<std::string,std::string> saved_postprocessors;
ia >> saved_postprocessors;
for (auto &p : postprocessors)
p->load (saved_postprocessors);
}
}


Expand Down