Commit dffb4df9 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[ALUGrid] Replace write/readGrid with BackupRestoreFactory.

This is needed for dune-alugrid, cf. FS#237.
(reviewed by fetzer)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13414 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent e46649bd
......@@ -37,6 +37,8 @@
#if HAVE_ALBERTA
#include <dune/grid/albertagrid/agrid.hh>
#endif
#include <dune/grid/common/backuprestore.hh>
#include <dune/grid/utility/grapedataioformattypes.hh>
namespace Dumux
......@@ -131,9 +133,8 @@ public:
template<class Problem>
static void serializeGrid(Problem& problem)
{
std::string gridName = restartGridFileName_(problem);
double time = problem.timeManager().time();
problem.grid().template writeGrid<Dune::xdr> (gridName, time);
Dune::BackupRestoreFacility<Grid>::backup(
problem.grid(), restartGridFileName_(problem));
}
/*!
* \brief Restart the grid from the file.
......@@ -142,9 +143,8 @@ public:
template<class Problem>
static void restartGrid(Problem& problem)
{
std::string gridName = restartGridFileName_(problem);
double time = problem.timeManager().time();
problem.grid().template readGrid<Dune::xdr> (gridName, time);
problem.setGrid(*Dune::BackupRestoreFacility<Grid>::restore(
restartGridFileName_(problem)));
}
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment