// to connect to a vertex that is 'dim' hops away from the locally owned
// cell. Depending on the order of the periodic face map, we might
// connect to that point by chance or miss it. However, after looping
- // through all the periodict directions (which are at most as many as
+ // through all the periodic directions (which are at most as many as
// the number of space dimensions) we can be sure that all connections
// to vertices have been created.
for (unsigned int repetition = 0; repetition < dim; ++repetition)
Assert(this->n_levels() == 1,
ExcMessage("The triangulation is refined!"));
+ // call the base class for storing the periodicity information; we must
+ // do this before going to p4est and rebuilding the triangulation to get
+ // the level subdomain ids correct in the multigrid case
+ dealii::Triangulation<dim, spacedim>::add_periodicity(periodicity_vector);
+
for (const auto &face_pair : periodicity_vector)
{
const cell_iterator first_cell = face_pair.cell[0];
/* user_data_constructor = */ nullptr,
/* user_pointer */ this);
-
try
{
copy_local_forest_to_triangulation();
Assert(false, ExcInternalError());
}
- // finally call the base class for storing the periodicity information
- dealii::Triangulation<dim, spacedim>::add_periodicity(periodicity_vector);
-
// The range of ghost_owners might have changed so update that information
this->update_number_cache();
}