tr.execute_coarsening_and_refinement();
}
-
template <int dim>
-void reorder(DoFHandler<dim> &dofh, FiniteElement<dim> &fe)
+void check_fe(FiniteElement<dim> &fe)
{
+ deallog << fe.get_name() << std::endl;
+
+ parallel::distributed::Triangulation<dim> tr(MPI_COMM_WORLD,
+ Triangulation<dim>::none,
+ parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy);
+ setup_tria(tr);
+
+ ZeroFunction<dim> zero;
+ typename FunctionMap<dim>::type fmap;
+ fmap.insert(std::make_pair(0, &zero));
+
+ DoFHandler<dim> dofh(tr);
+ dofh.distribute_dofs(fe);
+ dofh.distribute_mg_dofs(fe);
+
+ MGConstrainedDoFs mg_constrained_dofs_ref;
+ { // reorder
parallel::distributed::Triangulation<dim> tr(MPI_COMM_SELF,
Triangulation<dim>::none,
parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy);
cell->set_mg_dof_indices(renumbered);
cell->update_cell_dof_indices_cache();
}
-
-}
-
-template <int dim>
-void check_fe(FiniteElement<dim> &fe)
-{
- deallog << fe.get_name() << std::endl;
-
- parallel::distributed::Triangulation<dim> tr(MPI_COMM_WORLD,
- Triangulation<dim>::none,
- parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy);
- setup_tria(tr);
-
- ZeroFunction<dim> zero;
- typename FunctionMap<dim>::type fmap;
- fmap.insert(std::make_pair(0, &zero));
-
- DoFHandler<dim> dofh(tr);
- dofh.distribute_dofs(fe);
- dofh.distribute_mg_dofs(fe);
-
- { // reorder
- unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
- if (numprocs > 1)
- reorder(dofh, fe);
+ typename FunctionMap<dim>::type dirichlet_boundary;
+ ZeroFunction<dim> homogeneous_dirichlet_bc (1);
+ dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
+ mg_constrained_dofs_ref.initialize(dofhref, dirichlet_boundary);
}
relevant, level);
deallog << "relevant:" << std::endl;
relevant.print(deallog);
+
+ // the indexsets should be the same when run in parallel (on the
+ // relevant subset):
+ deallog << ((rei == (relevant & mg_constrained_dofs_ref.get_refinement_edge_indices(level)))
+ ?"ok ":"FAIL ")
+ << ((bi == (relevant & mg_constrained_dofs_ref.get_boundary_indices(level)))
+ ?"ok ":"FAIL ")
+ << std::endl;
+
+
}
}
DEAL:0::{[0,3]}
DEAL:0::relevant:
DEAL:0::{[0,3]}
+DEAL:0::ok ok
DEAL:0::Level 1:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{}
DEAL:0::{[0,2], [4,8]}
DEAL:0::relevant:
DEAL:0::{[0,8]}
+DEAL:0::ok ok
DEAL:0::Level 2:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{}
DEAL:0::{[0,2], 4, 6, 9, [11,12], [14,15], [18,20], [22,24]}
DEAL:0::relevant:
DEAL:0::{[0,24]}
+DEAL:0::ok ok
DEAL:0::Level 3:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{0, 2, [6,8]}
DEAL:0::{[0,1], [4,5], 8}
DEAL:0::relevant:
DEAL:0::{[0,8]}
+DEAL:0::ok ok
DEAL:0::{[0,3]}
DEAL:0::relevant:
DEAL:0::{[0,3]}
+DEAL:0::ok ok
DEAL:0::Level 1:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{}
DEAL:0::{[0,2], [4,8]}
DEAL:0::relevant:
DEAL:0::{[0,8]}
+DEAL:0::ok ok
DEAL:0::Level 2:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{}
DEAL:0::{[0,2], 4, 6, 9, [11,12], [14,15]}
DEAL:0::relevant:
DEAL:0::{[0,17], 21}
+DEAL:0::ok ok
DEAL:0::Level 3:
DEAL:0::get_refinement_edge_indices:
DEAL:0::{}
DEAL:0::{}
DEAL:0::relevant:
DEAL:0::{}
+DEAL:0::ok ok
DEAL:1::FE_Q<2>(1)
DEAL:1::Level 0:
DEAL:1::{}
DEAL:1::relevant:
DEAL:1::{}
+DEAL:1::ok ok
DEAL:1::Level 1:
DEAL:1::get_refinement_edge_indices:
DEAL:1::{}
DEAL:1::{1, [4,5]}
DEAL:1::relevant:
DEAL:1::{1, [3,5]}
+DEAL:1::ok ok
DEAL:1::Level 2:
DEAL:1::get_refinement_edge_indices:
DEAL:1::{}
DEAL:1::{1, 4, 9, [11,12], 14, 22}
DEAL:1::relevant:
DEAL:1::{1, [3,5], [7,14], [16,17], [21,22]}
+DEAL:1::ok ok
DEAL:1::Level 3:
DEAL:1::get_refinement_edge_indices:
DEAL:1::{0, 2, [6,8]}
DEAL:1::{[0,1], [4,5], 8}
DEAL:1::relevant:
DEAL:1::{[0,8]}
+DEAL:1::ok ok
DEAL:2::FE_Q<2>(1)
DEAL:2::{[0,3]}
DEAL:2::relevant:
DEAL:2::{[0,3]}
+DEAL:2::ok ok
DEAL:2::Level 1:
DEAL:2::get_refinement_edge_indices:
DEAL:2::{}
DEAL:2::{[0,2], [4,8]}
DEAL:2::relevant:
DEAL:2::{[0,8]}
+DEAL:2::ok ok
DEAL:2::Level 2:
DEAL:2::get_refinement_edge_indices:
DEAL:2::{}
DEAL:2::{2, 6, 12, [14,15], [18,20], [22,24]}
DEAL:2::relevant:
DEAL:2::{[2,3], [5,8], 10, [12,24]}
+DEAL:2::ok ok
DEAL:2::Level 3:
DEAL:2::get_refinement_edge_indices:
DEAL:2::{}
DEAL:2::{}
DEAL:2::relevant:
DEAL:2::{}
+DEAL:2::ok ok