Yes you can store/restore, but not using persistentTriangulation. It
is actually quite easy. Here is what we do in aspect (should be
possible to adapt to your problem):
/// saving:
// save Triangulation and Solution vectors:
{
std::vector<const LinearAlgebra::BlockVector *> x_system (3);
x_system[0] = &solution;
x_system[1] = &old_solution;
x_system[2] = &old_old_solution;
parallel::distributed::SolutionTransfer<dim, LinearAlgebra::BlockVector>
system_trans (dof_handler);
system_trans.prepare_serialization (x_system);
triangulation.save ((parameters.output_directory +
"restart.mesh").c_str());
}
/// resuming:
void Simulator<dim>::resume_from_snapshot()
{
triangulation.load ((parameters.output_directory +
"restart.mesh").c_str());
setup_dofs();
LinearAlgebra::BlockVector
distributed_system (system_rhs);
LinearAlgebra::BlockVector
old_distributed_system (system_rhs);
LinearAlgebra::BlockVector
old_old_distributed_system (system_rhs);
std::vector<LinearAlgebra::BlockVector *> x_system (3);
x_system[0] = & (distributed_system);
x_system[1] = & (old_distributed_system);
x_system[2] = & (old_old_distributed_system);
parallel::distributed::SolutionTransfer<dim, LinearAlgebra::BlockVector>
system_trans (dof_handler);
system_trans.deserialize (x_system);
solution = distributed_system;
old_solution = old_distributed_system;
old_old_solution = old_old_distributed_system;
> --
> 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
dealii+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
--
Timo Heister
http://www.math.clemson.edu/~heister/