void Triangulation<dim, spacedim>::save(const std::string &filename) const
{
#ifdef DEAL_II_WITH_MPI
- AssertThrow(this->cell_attached_data.pack_callbacks_variable.size() == 0,
- ExcNotImplemented());
+ //AssertThrow(this->cell_attached_data.pack_callbacks_variable.size() == 0,
+ // ExcNotImplemented());
Assert(
this->cell_attached_data.n_attached_deserialize == 0,
// First prepare container for insertion
clear();
-#ifdef DEAL_II_WITH_P4EST
+//#ifdef DEAL_II_WITH_P4EST
// If we are resuming from a checkpoint, we first have to register the
// store function again, to set the triangulation to the same state as
// before the serialization. Only afterwards we know how to deserialize the
handle = numbers::invalid_unsigned_int;
update_cached_numbers();
}
-#else
- (void)serialization;
-#endif
+//#else
+// (void)serialization;
+//#endif
}
+++ /dev/null
-
-DEAL:0:2d/2d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:2d/2d::Before serialization particle id 3 is in cell 2.1
-DEAL:0:2d/2d::Before serialization particle id 1 is in cell 2.2
-DEAL:0:2d/2d::Before serialization particle id 4 is in cell 2.3
-DEAL:0:2d/2d::Before serialization particle id 6 is in cell 2.5
-DEAL:0:2d/2d::Before serialization particle id 7 is in cell 2.7
-DEAL:0:2d/2d::Before serialization particle id 2 is in cell 2.10
-DEAL:0:2d/2d::Before serialization particle id 5 is in cell 2.11
-DEAL:0:2d/2d::Before serialization particle id 8 is in cell 2.15
-DEAL:0:2d/2d::0 0 9 1 9
-
-DEAL:0:2d/2d::After serialization particle id 0 is in cell 2.0
-DEAL:0:2d/2d::After serialization particle id 3 is in cell 2.1
-DEAL:0:2d/2d::After serialization particle id 1 is in cell 2.2
-DEAL:0:2d/2d::After serialization particle id 4 is in cell 2.3
-DEAL:0:2d/2d::After serialization particle id 6 is in cell 2.5
-DEAL:0:2d/2d::After serialization particle id 7 is in cell 2.7
-DEAL:0:2d/2d::After serialization particle id 2 is in cell 2.10
-DEAL:0:2d/2d::After serialization particle id 5 is in cell 2.11
-DEAL:0:2d/2d::After serialization particle id 8 is in cell 2.15
-DEAL:0:2d/2d::OK
-DEAL:0:2d/2d::
-DEAL:0:2d/3d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:2d/3d::Before serialization particle id 3 is in cell 2.1
-DEAL:0:2d/3d::Before serialization particle id 1 is in cell 2.2
-DEAL:0:2d/3d::Before serialization particle id 4 is in cell 2.3
-DEAL:0:2d/3d::Before serialization particle id 6 is in cell 2.5
-DEAL:0:2d/3d::Before serialization particle id 7 is in cell 2.7
-DEAL:0:2d/3d::Before serialization particle id 2 is in cell 2.10
-DEAL:0:2d/3d::Before serialization particle id 5 is in cell 2.11
-DEAL:0:2d/3d::Before serialization particle id 8 is in cell 2.15
-DEAL:0:2d/3d::0 0 9 1 9
-
-DEAL:0:2d/3d::After serialization particle id 0 is in cell 2.0
-DEAL:0:2d/3d::After serialization particle id 3 is in cell 2.1
-DEAL:0:2d/3d::After serialization particle id 1 is in cell 2.2
-DEAL:0:2d/3d::After serialization particle id 4 is in cell 2.3
-DEAL:0:2d/3d::After serialization particle id 6 is in cell 2.5
-DEAL:0:2d/3d::After serialization particle id 7 is in cell 2.7
-DEAL:0:2d/3d::After serialization particle id 2 is in cell 2.10
-DEAL:0:2d/3d::After serialization particle id 5 is in cell 2.11
-DEAL:0:2d/3d::After serialization particle id 8 is in cell 2.15
-DEAL:0:2d/3d::OK
-DEAL:0:2d/3d::
-DEAL:0:3d/3d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 1 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 2 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 9 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 10 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 11 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 3 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 4 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 5 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 12 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 13 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 14 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 18 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 19 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 20 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 21 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 22 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 23 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 6 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 7 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 8 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 15 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 16 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 17 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 24 is in cell 2.63
-DEAL:0:3d/3d::Before serialization particle id 25 is in cell 2.63
-DEAL:0:3d/3d::Before serialization particle id 26 is in cell 2.63
-DEAL:0:3d/3d::0 0 27 3 27
-
-DEAL:0:3d/3d::After serialization particle id 0 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 1 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 2 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 9 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 10 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 11 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 3 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 4 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 5 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 12 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 13 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 14 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 18 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 19 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 20 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 21 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 22 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 23 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 6 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 7 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 8 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 15 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 16 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 17 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 24 is in cell 2.63
-DEAL:0:3d/3d::After serialization particle id 25 is in cell 2.63
-DEAL:0:3d/3d::After serialization particle id 26 is in cell 2.63
-DEAL:0:3d/3d::OK
-DEAL:0:3d/3d::
<< " is in cell " << particle->get_surrounding_cell(tr)
<< std::endl;
+ particle_handler.prepare_for_serialization();
+
// save data to archive
- std::ostringstream oss;
+ std::ofstream oss("data.particles");
{
- //boost::archive::text_oarchive oa(oss, boost::archive::no_header);
+ boost::archive::text_oarchive oa(oss, boost::archive::no_header);
- //oa << particle_handler;
- particle_handler.prepare_for_serialization();
+ oa << particle_handler;
tr.save("checkpoint");
// archive and stream closed when
// destructors are called
}
- deallog << oss.str() << std::endl;
+ oss.close();
+ //deallog << oss.str() << std::endl;
// Now remove all information in tr and particle_handler,
// this is like creating new objects after a restart
// does not know if something was stored in the user data of the
// triangulation).
{
- // std::istringstream iss(oss.str());
- // boost::archive::text_iarchive ia(iss, boost::archive::no_header);
+ std::ifstream iss("data.particles");
+ boost::archive::text_iarchive ia(iss, boost::archive::no_header);
- // ia >> particle_handler;
+ ia >> particle_handler;
tr.load("checkpoint");
particle_handler.deserialize();
}
DEAL:0:2d/2d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:2d/2d::Before serialization particle id 3 is in cell 2.1
-DEAL:0:2d/2d::Before serialization particle id 1 is in cell 2.2
-DEAL:0:2d/2d::Before serialization particle id 4 is in cell 2.3
-DEAL:0:2d/2d::Before serialization particle id 6 is in cell 2.5
-DEAL:0:2d/2d::Before serialization particle id 7 is in cell 2.7
-DEAL:0:2d/2d::Before serialization particle id 2 is in cell 2.10
-DEAL:0:2d/2d::Before serialization particle id 5 is in cell 2.11
-DEAL:0:2d/2d::Before serialization particle id 8 is in cell 2.15
-DEAL:0:2d/2d::0 0 9 1 9
-
+DEAL:0:2d/2d::Before serialization particle id 1 is in cell 2.12
+DEAL:0:2d/2d::After deserialization global number of particles is: 2
DEAL:0:2d/2d::After serialization particle id 0 is in cell 2.0
-DEAL:0:2d/2d::After serialization particle id 3 is in cell 2.1
-DEAL:0:2d/2d::After serialization particle id 1 is in cell 2.2
-DEAL:0:2d/2d::After serialization particle id 4 is in cell 2.3
-DEAL:0:2d/2d::After serialization particle id 6 is in cell 2.5
-DEAL:0:2d/2d::After serialization particle id 7 is in cell 2.7
-DEAL:0:2d/2d::After serialization particle id 2 is in cell 2.10
-DEAL:0:2d/2d::After serialization particle id 5 is in cell 2.11
-DEAL:0:2d/2d::After serialization particle id 8 is in cell 2.15
+DEAL:0:2d/2d::After serialization particle id 1 is in cell 2.12
DEAL:0:2d/2d::OK
DEAL:0:2d/2d::
DEAL:0:2d/3d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:2d/3d::Before serialization particle id 3 is in cell 2.1
-DEAL:0:2d/3d::Before serialization particle id 1 is in cell 2.2
-DEAL:0:2d/3d::Before serialization particle id 4 is in cell 2.3
-DEAL:0:2d/3d::Before serialization particle id 6 is in cell 2.5
-DEAL:0:2d/3d::Before serialization particle id 7 is in cell 2.7
-DEAL:0:2d/3d::Before serialization particle id 2 is in cell 2.10
-DEAL:0:2d/3d::Before serialization particle id 5 is in cell 2.11
-DEAL:0:2d/3d::Before serialization particle id 8 is in cell 2.15
-DEAL:0:2d/3d::0 0 9 1 9
-
+DEAL:0:2d/3d::Before serialization particle id 1 is in cell 2.12
+DEAL:0:2d/3d::After deserialization global number of particles is: 2
DEAL:0:2d/3d::After serialization particle id 0 is in cell 2.0
-DEAL:0:2d/3d::After serialization particle id 3 is in cell 2.1
-DEAL:0:2d/3d::After serialization particle id 1 is in cell 2.2
-DEAL:0:2d/3d::After serialization particle id 4 is in cell 2.3
-DEAL:0:2d/3d::After serialization particle id 6 is in cell 2.5
-DEAL:0:2d/3d::After serialization particle id 7 is in cell 2.7
-DEAL:0:2d/3d::After serialization particle id 2 is in cell 2.10
-DEAL:0:2d/3d::After serialization particle id 5 is in cell 2.11
-DEAL:0:2d/3d::After serialization particle id 8 is in cell 2.15
+DEAL:0:2d/3d::After serialization particle id 1 is in cell 2.12
DEAL:0:2d/3d::OK
DEAL:0:2d/3d::
DEAL:0:3d/3d::Before serialization particle id 0 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 1 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 2 is in cell 2.0
-DEAL:0:3d/3d::Before serialization particle id 9 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 10 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 11 is in cell 2.1
-DEAL:0:3d/3d::Before serialization particle id 3 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 4 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 5 is in cell 2.6
-DEAL:0:3d/3d::Before serialization particle id 12 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 13 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 14 is in cell 2.7
-DEAL:0:3d/3d::Before serialization particle id 18 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 19 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 20 is in cell 2.9
-DEAL:0:3d/3d::Before serialization particle id 21 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 22 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 23 is in cell 2.15
-DEAL:0:3d/3d::Before serialization particle id 6 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 7 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 8 is in cell 2.54
-DEAL:0:3d/3d::Before serialization particle id 15 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 16 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 17 is in cell 2.55
-DEAL:0:3d/3d::Before serialization particle id 24 is in cell 2.63
-DEAL:0:3d/3d::Before serialization particle id 25 is in cell 2.63
-DEAL:0:3d/3d::Before serialization particle id 26 is in cell 2.63
-DEAL:0:3d/3d::0 0 27 3 27
-
+DEAL:0:3d/3d::Before serialization particle id 1 is in cell 2.56
+DEAL:0:3d/3d::After deserialization global number of particles is: 2
DEAL:0:3d/3d::After serialization particle id 0 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 1 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 2 is in cell 2.0
-DEAL:0:3d/3d::After serialization particle id 9 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 10 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 11 is in cell 2.1
-DEAL:0:3d/3d::After serialization particle id 3 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 4 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 5 is in cell 2.6
-DEAL:0:3d/3d::After serialization particle id 12 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 13 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 14 is in cell 2.7
-DEAL:0:3d/3d::After serialization particle id 18 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 19 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 20 is in cell 2.9
-DEAL:0:3d/3d::After serialization particle id 21 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 22 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 23 is in cell 2.15
-DEAL:0:3d/3d::After serialization particle id 6 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 7 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 8 is in cell 2.54
-DEAL:0:3d/3d::After serialization particle id 15 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 16 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 17 is in cell 2.55
-DEAL:0:3d/3d::After serialization particle id 24 is in cell 2.63
-DEAL:0:3d/3d::After serialization particle id 25 is in cell 2.63
-DEAL:0:3d/3d::After serialization particle id 26 is in cell 2.63
+DEAL:0:3d/3d::After serialization particle id 1 is in cell 2.56
DEAL:0:3d/3d::OK
DEAL:0:3d/3d::