Added new test for parallel-hp-paper.
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2021 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+#include <deal.II/dofs/dof_handler.h>
+
+#include "../tests.h"
+
+
+template <int dim, int spacedim = dim>
+void
+log_dof_diagnostics(const DoFHandler<dim, spacedim> &dof_handler)
+{
+ // locally relevant cells and dof indices on each
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (!cell->is_artificial())
+ {
+ deallog << "Cell: " << cell << std::endl;
+ deallog << " ";
+ if (cell->is_locally_owned())
+ deallog << "locally owned";
+ else if (cell->is_ghost())
+ deallog << "ghost";
+ else
+ Assert(false, ExcInternalError());
+ deallog << std::endl;
+
+ std::vector<types::global_dof_index> dof_indices(
+ cell->get_fe().dofs_per_cell);
+ cell->get_dof_indices(dof_indices);
+ deallog << " ";
+ for (auto i : dof_indices)
+ deallog << ' ' << i;
+ deallog << std::endl;
+ }
+
+ // dof indices that are locally owned
+ deallog << "locally_owned_dofs: ";
+ dof_handler.locally_owned_dofs().print(deallog);
+
+ // number of dof indices that are locally owned
+ deallog << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
+ << std::endl;
+
+ // number of all dof indices
+ deallog << "n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+}
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
(++dof_handler.begin_active())->set_active_fe_index(1);
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- deallog << " Cell: " << cell << std::endl;
-
- std::vector<types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
- cell->get_dof_indices(dof_indices);
- deallog << " ";
- for (auto i : dof_indices)
- deallog << i << ' ';
- deallog << std::endl;
- }
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:0:2d:: Cell: 0.1
-DEAL:0:2d:: 1 9 3 10 5 11 12 13 14
-DEAL:0:2d:: n_locally_owned_dofs: 15
-DEAL:0:2d:: n_global_dofs: 15
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:0:3d:: Cell: 0.1
-DEAL:0:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
-DEAL:0:3d:: n_locally_owned_dofs: 45
-DEAL:0:3d:: n_global_dofs: 45
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 9 3 10 5 11 12 13 14
+DEAL:0:2d::locally_owned_dofs: {[0,14]}
+DEAL:0:2d::n_locally_owned_dofs: 15
+DEAL:0:2d::n_global_dofs: 15
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
+DEAL:0:3d::locally_owned_dofs: {[0,44]}
+DEAL:0:3d::n_locally_owned_dofs: 45
+DEAL:0:3d::n_global_dofs: 45
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:0:2d:: Cell: 0.1
-DEAL:0:2d:: 1 9 3 10 5 11 12 13 14
-DEAL:0:2d:: n_locally_owned_dofs: 9
-DEAL:0:2d:: n_global_dofs: 15
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:0:3d:: Cell: 0.1
-DEAL:0:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
-DEAL:0:3d:: n_locally_owned_dofs: 27
-DEAL:0:3d:: n_global_dofs: 45
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 1 9 3 10 5 11 12 13 14
+DEAL:0:2d::locally_owned_dofs: {[0,8]}
+DEAL:0:2d::n_locally_owned_dofs: 9
+DEAL:0:2d::n_global_dofs: 15
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
+DEAL:0:3d::locally_owned_dofs: {[0,26]}
+DEAL:0:3d::n_locally_owned_dofs: 27
+DEAL:0:3d::n_global_dofs: 45
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: Cell: 0.0
-DEAL:1:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:1:2d:: Cell: 0.1
-DEAL:1:2d:: 1 9 3 10 5 11 12 13 14
-DEAL:1:2d:: n_locally_owned_dofs: 6
-DEAL:1:2d:: n_global_dofs: 15
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: Cell: 0.0
-DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:1:3d:: Cell: 0.1
-DEAL:1:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
-DEAL:1:3d:: n_locally_owned_dofs: 18
-DEAL:1:3d:: n_global_dofs: 45
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 1 9 3 10 5 11 12 13 14
+DEAL:1:2d::locally_owned_dofs: {[9,14]}
+DEAL:1:2d::n_locally_owned_dofs: 6
+DEAL:1:2d::n_global_dofs: 15
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 1 27 3 28 5 29 7 30 9 31 32 33 13 34 35 36 17 37 19 38 21 39 40 41 42 43 44
+DEAL:1:3d::locally_owned_dofs: {[27,44]}
+DEAL:1:3d::n_locally_owned_dofs: 18
+DEAL:1:3d::n_global_dofs: 45
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FE_Q<dim>(2));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(2);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(0);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(2);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(0);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- deallog << " Cell: " << cell << std::endl;
-
- std::vector<types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
- cell->get_dof_indices(dof_indices);
- deallog << " ";
- for (auto i : dof_indices)
- deallog << i << ' ';
- deallog << std::endl;
- }
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:0:2d:: Cell: 0.1
-DEAL:0:2d:: 1 9 3 17 5 10 11 22 12
-DEAL:0:2d:: Cell: 0.2
-DEAL:0:2d:: 2 3 13 18 14 20 7 15 16
-DEAL:0:2d:: Cell: 0.3
-DEAL:0:2d:: 3 17 18 19 20 21 22 23 24
-DEAL:0:2d:: n_locally_owned_dofs: 25
-DEAL:0:2d:: n_global_dofs: 25
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:0:3d:: Cell: 0.1
-DEAL:0:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
-DEAL:0:3d:: Cell: 0.2
-DEAL:0:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
-DEAL:0:3d:: Cell: 0.3
-DEAL:0:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
-DEAL:0:3d:: n_locally_owned_dofs: 75
-DEAL:0:3d:: n_global_dofs: 75
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 9 3 17 5 10 11 22 12
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 2 3 13 18 14 20 7 15 16
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 3 17 18 19 20 21 22 23 24
+DEAL:0:2d::locally_owned_dofs: {[0,24]}
+DEAL:0:2d::n_locally_owned_dofs: 25
+DEAL:0:2d::n_global_dofs: 25
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
+DEAL:0:3d::locally_owned_dofs: {[0,74]}
+DEAL:0:3d::n_locally_owned_dofs: 75
+DEAL:0:3d::n_global_dofs: 75
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:0:2d:: Cell: 0.1
-DEAL:0:2d:: 1 9 3 17 5 10 11 22 12
-DEAL:0:2d:: Cell: 0.2
-DEAL:0:2d:: 2 3 13 18 14 20 7 15 16
-DEAL:0:2d:: Cell: 0.3
-DEAL:0:2d:: 3 17 18 19 20 21 22 23 24
-DEAL:0:2d:: n_locally_owned_dofs: 13
-DEAL:0:2d:: n_global_dofs: 25
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:0:3d:: Cell: 0.1
-DEAL:0:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
-DEAL:0:3d:: Cell: 0.2
-DEAL:0:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
-DEAL:0:3d:: Cell: 0.3
-DEAL:0:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
-DEAL:0:3d:: n_locally_owned_dofs: 39
-DEAL:0:3d:: n_global_dofs: 75
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 9 3 17 5 10 11 22 12
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 2 3 13 18 14 20 7 15 16
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 3 17 18 19 20 21 22 23 24
+DEAL:0:2d::locally_owned_dofs: {[0,12]}
+DEAL:0:2d::n_locally_owned_dofs: 13
+DEAL:0:2d::n_global_dofs: 25
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
+DEAL:0:3d::locally_owned_dofs: {[0,38]}
+DEAL:0:3d::n_locally_owned_dofs: 39
+DEAL:0:3d::n_global_dofs: 75
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: Cell: 0.0
-DEAL:1:2d:: 0 1 2 3 4 5 6 7 8
-DEAL:1:2d:: Cell: 0.1
-DEAL:1:2d:: 1 9 3 17 5 10 11 22 12
-DEAL:1:2d:: Cell: 0.2
-DEAL:1:2d:: 2 3 13 18 14 20 7 15 16
-DEAL:1:2d:: Cell: 0.3
-DEAL:1:2d:: 3 17 18 19 20 21 22 23 24
-DEAL:1:2d:: n_locally_owned_dofs: 12
-DEAL:1:2d:: n_global_dofs: 25
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: Cell: 0.0
-DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
-DEAL:1:3d:: Cell: 0.1
-DEAL:1:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
-DEAL:1:3d:: Cell: 0.2
-DEAL:1:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
-DEAL:1:3d:: Cell: 0.3
-DEAL:1:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
-DEAL:1:3d:: n_locally_owned_dofs: 36
-DEAL:1:3d:: n_global_dofs: 75
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 1 9 3 17 5 10 11 22 12
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 2 3 13 18 14 20 7 15 16
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 3 17 18 19 20 21 22 23 24
+DEAL:1:2d::locally_owned_dofs: {[13,24]}
+DEAL:1:2d::n_locally_owned_dofs: 12
+DEAL:1:2d::n_global_dofs: 25
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 1 27 3 51 5 28 7 54 9 29 30 59 13 31 32 63 17 33 19 65 21 34 35 70 36 37 38
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 2 3 39 52 6 7 40 55 41 57 11 42 43 61 15 44 18 19 45 66 46 68 23 47 48 49 50
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 3 51 52 53 7 54 55 56 57 58 59 60 61 62 63 64 19 65 66 67 68 69 70 71 72 73 74
+DEAL:1:3d::locally_owned_dofs: {[39,74]}
+DEAL:1:3d::n_locally_owned_dofs: 36
+DEAL:1:3d::n_global_dofs: 75
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FE_Q<dim>(2));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(0);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(0);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 57
-DEAL:0:2d:: n_global_dofs: 57
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 282
-DEAL:0:3d:: n_global_dofs: 282
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 20 29 22 1 2 3 4 24 5 6 7 8 9 34 10 11 12 13 14 15 16 17 18 19
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 20 21 22 23 24 25 26 27 28
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 29 22 30 31 32 33 34 35 36
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 22 23 31 37 38 33 39 40 41 42 43 27 44 45 46 47 48 49 50 51 52 53 54 55 56
+DEAL:0:2d::locally_owned_dofs: {[0,56]}
+DEAL:0:2d::n_locally_owned_dofs: 57
+DEAL:0:2d::n_global_dofs: 57
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 117 144 119 1 121 147 123 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 137 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 163 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 144 119 145 146 147 123 148 149 150 151 152 153 154 155 156 157 158 135 159 160 161 162 163 164 165 166 167
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 119 120 146 168 123 124 149 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 35 36 37 194 195 196 197 198 199 200 201 202 203 204 205 206 162 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 140 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
+DEAL:0:3d::locally_owned_dofs: {[0,281]}
+DEAL:0:3d::n_locally_owned_dofs: 282
+DEAL:0:3d::n_global_dofs: 282
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 29
-DEAL:0:2d:: n_global_dofs: 57
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 144
-DEAL:0:3d:: n_global_dofs:282
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 20 29 22 1 2 3 4 24 5 6 7 8 9 34 10 11 12 13 14 15 16 17 18 19
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 20 21 22 23 24 25 26 27 28
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 29 22 30 31 32 33 34 35 36
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 22 23 31 37 38 33 39 40 41 42 43 27 44 45 46 47 48 49 50 51 52 53 54 55 56
+DEAL:0:2d::locally_owned_dofs: {[0,28]}
+DEAL:0:2d::n_locally_owned_dofs: 29
+DEAL:0:2d::n_global_dofs: 57
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 117 144 119 1 121 147 123 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 137 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 163 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 144 119 145 146 147 123 148 149 150 151 152 153 154 155 156 157 158 135 159 160 161 162 163 164 165 166 167
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 119 120 146 168 123 124 149 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 35 36 37 194 195 196 197 198 199 200 201 202 203 204 205 206 162 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 140 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
+DEAL:0:3d::locally_owned_dofs: {[0,143]}
+DEAL:0:3d::n_locally_owned_dofs: 144
+DEAL:0:3d::n_global_dofs: 282
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_locally_owned_dofs: 28
-DEAL:1:2d:: n_global_dofs: 57
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_locally_owned_dofs: 138
-DEAL:1:3d:: n_global_dofs: 282
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 20 29 22 1 2 3 4 24 5 6 7 8 9 34 10 11 12 13 14 15 16 17 18 19
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 20 21 22 23 24 25 26 27 28
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 29 22 30 31 32 33 34 35 36
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 22 23 31 37 38 33 39 40 41 42 43 27 44 45 46 47 48 49 50 51 52 53 54 55 56
+DEAL:1:2d::locally_owned_dofs: {[29,56]}
+DEAL:1:2d::n_locally_owned_dofs: 28
+DEAL:1:2d::n_global_dofs: 57
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 117 144 119 1 121 147 123 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 137 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 163 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 144 119 145 146 147 123 148 149 150 151 152 153 154 155 156 157 158 135 159 160 161 162 163 164 165 166 167
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 119 120 146 168 123 124 149 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 35 36 37 194 195 196 197 198 199 200 201 202 203 204 205 206 162 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 140 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
+DEAL:1:3d::locally_owned_dofs: {[144,281]}
+DEAL:1:3d::n_locally_owned_dofs: 138
+DEAL:1:3d::n_global_dofs: 282
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FE_Q<dim>(2));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(1);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(1);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 55
-DEAL:0:2d:: n_global_dofs: 55
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 262
-DEAL:0:3d:: n_global_dofs: 262
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 40 41 2 3 4 5 6 7 8 9 10 11 46 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 22 41 49 5 6 7 23 24 25 26 27 28 29 52 30 31 32 33 34 35 36 37 38 39
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 41 49 43 50 45 51 52 53 54
+DEAL:0:2d::locally_owned_dofs: {[0,54]}
+DEAL:0:2d::n_locally_owned_dofs: 55
+DEAL:0:2d::n_global_dofs: 55
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 217 218 2 3 221 222 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 239 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 120 218 244 3 121 222 246 7 8 9 122 123 124 125 126 127 128 129 130 19 20 21 131 132 133 134 135 136 137 138 139 31 32 33 140 141 142 37 38 39 143 144 145 49 50 51 52 53 54 55 56 57 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 257 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 218 244 220 245 222 246 224 247 226 248 249 250 230 251 252 253 234 254 236 255 238 256 257 258 259 260 261
+DEAL:0:3d::locally_owned_dofs: {[0,261]}
+DEAL:0:3d::n_locally_owned_dofs: 262
+DEAL:0:3d::n_global_dofs: 262
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 40
-DEAL:0:2d:: n_global_dofs: 55
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 217
-DEAL:0:3d:: n_global_dofs: 262
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 40 41 2 3 4 5 6 7 8 9 10 11 46 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 22 41 49 5 6 7 23 24 25 26 27 28 29 52 30 31 32 33 34 35 36 37 38 39
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 41 49 43 50 45 51 52 53 54
+DEAL:0:2d::locally_owned_dofs: {[0,39]}
+DEAL:0:2d::n_locally_owned_dofs: 40
+DEAL:0:2d::n_global_dofs: 55
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 217 218 2 3 221 222 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 239 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 120 218 244 3 121 222 246 7 8 9 122 123 124 125 126 127 128 129 130 19 20 21 131 132 133 134 135 136 137 138 139 31 32 33 140 141 142 37 38 39 143 144 145 49 50 51 52 53 54 55 56 57 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 257 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 218 244 220 245 222 246 224 247 226 248 249 250 230 251 252 253 234 254 236 255 238 256 257 258 259 260 261
+DEAL:0:3d::locally_owned_dofs: {[0,216]}
+DEAL:0:3d::n_locally_owned_dofs: 217
+DEAL:0:3d::n_global_dofs: 262
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_locally_owned_dofs: 15
-DEAL:1:2d:: n_global_dofs: 55
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_locally_owned_dofs: 45
-DEAL:1:3d:: n_global_dofs: 262
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 40 41 2 3 4 5 6 7 8 9 10 11 46 12 13 14 15 16 17 18 19 20 21
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 1 22 41 49 5 6 7 23 24 25 26 27 28 29 52 30 31 32 33 34 35 36 37 38 39
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 40 41 42 43 44 45 46 47 48
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 41 49 43 50 45 51 52 53 54
+DEAL:1:2d::locally_owned_dofs: {[40,54]}
+DEAL:1:2d::n_locally_owned_dofs: 15
+DEAL:1:2d::n_global_dofs: 55
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 217 218 2 3 221 222 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 239 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 1 120 218 244 3 121 222 246 7 8 9 122 123 124 125 126 127 128 129 130 19 20 21 131 132 133 134 135 136 137 138 139 31 32 33 140 141 142 37 38 39 143 144 145 49 50 51 52 53 54 55 56 57 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 257 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 218 244 220 245 222 246 224 247 226 248 249 250 230 251 252 253 234 254 236 255 238 256 257 258 259 260 261
+DEAL:1:3d::locally_owned_dofs: {[217,261]}
+DEAL:1:3d::n_locally_owned_dofs: 45
+DEAL:1:3d::n_global_dofs: 262
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FE_Q<dim>(2));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(1);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(1);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 55
-DEAL:0:2d:: n_global_dofs: 55
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 262
-DEAL:0:3d:: n_global_dofs: 262
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 22 1 24 2 3 4 5 26 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 22 23 24 25 26 27 28 29 30
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 24 31 49 32 33 34 35 51 36 10 11 12 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 24 25 49 50 51 52 29 53 54
+DEAL:0:2d::locally_owned_dofs: {[0,54]}
+DEAL:0:2d::n_locally_owned_dofs: 55
+DEAL:0:2d::n_global_dofs: 55
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 120 1 122 2 124 3 126 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 140 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 122 147 244 3 126 148 246 149 150 151 152 153 154 13 14 15 155 156 157 158 159 160 161 162 163 25 26 27 164 165 166 34 35 36 37 38 39 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 256 186 187 188 189 66 67 68 69 70 71 72 73 74 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 122 123 244 245 126 127 246 247 248 249 131 250 251 252 135 253 138 139 254 255 256 257 143 258 259 260 261
+DEAL:0:3d::locally_owned_dofs: {[0,261]}
+DEAL:0:3d::n_locally_owned_dofs: 262
+DEAL:0:3d::n_global_dofs: 262
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 31
-DEAL:0:2d:: n_global_dofs: 55
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 147
-DEAL:0:3d:: n_global_dofs: 262
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 22 1 24 2 3 4 5 26 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 22 23 24 25 26 27 28 29 30
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 1 24 31 49 32 33 34 35 51 36 10 11 12 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 24 25 49 50 51 52 29 53 54
+DEAL:0:2d::locally_owned_dofs: {[0,30]}
+DEAL:0:2d::n_locally_owned_dofs: 31
+DEAL:0:2d::n_global_dofs: 55
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 120 1 122 2 124 3 126 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 140 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 1 122 147 244 3 126 148 246 149 150 151 152 153 154 13 14 15 155 156 157 158 159 160 161 162 163 25 26 27 164 165 166 34 35 36 37 38 39 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 256 186 187 188 189 66 67 68 69 70 71 72 73 74 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 122 123 244 245 126 127 246 247 248 249 131 250 251 252 135 253 138 139 254 255 256 257 143 258 259 260 261
+DEAL:0:3d::locally_owned_dofs: {[0,146]}
+DEAL:0:3d::n_locally_owned_dofs: 147
+DEAL:0:3d::n_global_dofs: 262
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_locally_owned_dofs: 24
-DEAL:1:2d:: n_global_dofs: 55
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_locally_owned_dofs: 115
-DEAL:1:3d:: n_global_dofs: 262
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 22 1 24 2 3 4 5 26 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 22 23 24 25 26 27 28 29 30
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 1 24 31 49 32 33 34 35 51 36 10 11 12 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 24 25 49 50 51 52 29 53 54
+DEAL:1:2d::locally_owned_dofs: {[31,54]}
+DEAL:1:2d::n_locally_owned_dofs: 24
+DEAL:1:2d::n_global_dofs: 55
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 120 1 122 2 124 3 126 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 140 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 1 122 147 244 3 126 148 246 149 150 151 152 153 154 13 14 15 155 156 157 158 159 160 161 162 163 25 26 27 164 165 166 34 35 36 37 38 39 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 256 186 187 188 189 66 67 68 69 70 71 72 73 74 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 122 123 244 245 126 127 246 247 248 249 131 250 251 252 135 253 138 139 254 255 256 257 143 258 259 260 261
+DEAL:1:3d::locally_owned_dofs: {[147,261]}
+DEAL:1:3d::n_locally_owned_dofs: 115
+DEAL:1:3d::n_global_dofs: 262
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(0);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(0);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 69
-DEAL:0:2d:: n_global_dofs: 69
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 344
-DEAL:0:3d:: n_global_dofs: 344
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 42 43 2 3 4 5 6 7 8 9 10 11 48 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 22 43 23 5 6 7 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 42 43 44 45 46 47 48 49 50
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 43 23 45 51 52 47 53 54 55 56 30 31 32 57 58 59 60 61 62 63 64 65 66 67 68
+DEAL:0:2d::locally_owned_dofs: {[0,68]}
+DEAL:0:2d::n_locally_owned_dofs: 69
+DEAL:0:2d::n_global_dofs: 69
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 220 221 2 3 224 225 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 242 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 120 221 121 3 122 225 123 7 8 9 124 125 126 127 128 129 130 131 132 19 20 21 133 134 135 136 137 138 139 140 141 31 32 33 142 143 144 37 38 39 145 146 147 49 50 51 52 53 54 55 56 57 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 221 121 223 247 225 123 227 248 249 250 251 252 253 254 130 131 132 255 256 257 258 259 260 261 262 263 139 140 141 264 265 266 37 38 39 145 146 147 267 268 269 270 271 272 273 274 275 276 241 277 278 279 280 281 282 283 284 285 286 287 288 289 166 167 168 169 170 171 172 173 174 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
+DEAL:0:3d::locally_owned_dofs: {[0,343]}
+DEAL:0:3d::n_locally_owned_dofs: 344
+DEAL:0:3d::n_global_dofs: 344
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 42
-DEAL:0:2d:: n_global_dofs: 69
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 220
-DEAL:0:3d:: n_global_dofs: 344
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 42 43 2 3 4 5 6 7 8 9 10 11 48 12 13 14 15 16 17 18 19 20 21
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 22 43 23 5 6 7 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 42 43 44 45 46 47 48 49 50
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 43 23 45 51 52 47 53 54 55 56 30 31 32 57 58 59 60 61 62 63 64 65 66 67 68
+DEAL:0:2d::locally_owned_dofs: {[0,41]}
+DEAL:0:2d::n_locally_owned_dofs: 42
+DEAL:0:2d::n_global_dofs: 69
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 220 221 2 3 224 225 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 242 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 120 221 121 3 122 225 123 7 8 9 124 125 126 127 128 129 130 131 132 19 20 21 133 134 135 136 137 138 139 140 141 31 32 33 142 143 144 37 38 39 145 146 147 49 50 51 52 53 54 55 56 57 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 221 121 223 247 225 123 227 248 249 250 251 252 253 254 130 131 132 255 256 257 258 259 260 261 262 263 139 140 141 264 265 266 37 38 39 145 146 147 267 268 269 270 271 272 273 274 275 276 241 277 278 279 280 281 282 283 284 285 286 287 288 289 166 167 168 169 170 171 172 173 174 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
+DEAL:0:3d::locally_owned_dofs: {[0,219]}
+DEAL:0:3d::n_locally_owned_dofs: 220
+DEAL:0:3d::n_global_dofs: 344
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_locally_owned_dofs: 27
-DEAL:1:2d:: n_global_dofs: 69
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_locally_owned_dofs: 124
-DEAL:1:3d:: n_global_dofs: 344
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 42 43 2 3 4 5 6 7 8 9 10 11 48 12 13 14 15 16 17 18 19 20 21
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 1 22 43 23 5 6 7 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 42 43 44 45 46 47 48 49 50
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 43 23 45 51 52 47 53 54 55 56 30 31 32 57 58 59 60 61 62 63 64 65 66 67 68
+DEAL:1:2d::locally_owned_dofs: {[42,68]}
+DEAL:1:2d::n_locally_owned_dofs: 27
+DEAL:1:2d::n_global_dofs: 69
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 220 221 2 3 224 225 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 242 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 1 120 221 121 3 122 225 123 7 8 9 124 125 126 127 128 129 130 131 132 19 20 21 133 134 135 136 137 138 139 140 141 31 32 33 142 143 144 37 38 39 145 146 147 49 50 51 52 53 54 55 56 57 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 221 121 223 247 225 123 227 248 249 250 251 252 253 254 130 131 132 255 256 257 258 259 260 261 262 263 139 140 141 264 265 266 37 38 39 145 146 147 267 268 269 270 271 272 273 274 275 276 241 277 278 279 280 281 282 283 284 285 286 287 288 289 166 167 168 169 170 171 172 173 174 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
+DEAL:1:3d::locally_owned_dofs: {[220,343]}
+DEAL:1:3d::n_locally_owned_dofs: 124
+DEAL:1:3d::n_global_dofs: 344
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
deallog << "n_dofs: " << dof_handler.n_dofs() << std::endl;
deallog << "n_constraints: " << constraints.n_constraints() << std::endl;
constraints.print(deallog.get_file_stream());
-DEAL:0:2d::Processor: 0
DEAL:0:2d::n_dofs: 15
DEAL:0:2d::n_constraints: 0
-DEAL:0:3d::Processor: 0
DEAL:0:3d::n_dofs: 45
DEAL:0:3d::n_constraints: 0
-DEAL:0:2d::Processor: 0
DEAL:0:2d::n_dofs: 15
DEAL:0:2d::n_constraints: 0
-DEAL:0:3d::Processor: 0
DEAL:0:3d::n_dofs: 45
DEAL:0:3d::n_constraints: 0
-DEAL:1:2d::Processor: 1
DEAL:1:2d::n_dofs: 15
DEAL:1:2d::n_constraints: 0
-DEAL:1:3d::Processor: 1
DEAL:1:3d::n_dofs: 45
DEAL:1:3d::n_constraints: 0
// that to build a hash value from it that is then used to assign an
// active_fe_index
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
+ for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->is_locally_owned())
cell->set_active_fe_index(
(cell->active_cell_index() +
fe.size());
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_globally_active_cells: "
+ deallog << "n_globally_active_cells: "
<< triangulation.n_global_active_cells() << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
+ deallog << "n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
<< std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ deallog << "n_global_dofs: " << dof_handler.n_dofs() << std::endl;
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_globally_active_cells: 29035
-DEAL:0:2d:: n_locally_owned_dofs: 485573
-DEAL:0:2d:: n_global_dofs: 485573
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_globally_active_cells: 13824
-DEAL:0:3d:: n_locally_owned_dofs: 1125219
-DEAL:0:3d:: n_global_dofs: 1125219
+DEAL:0:2d::n_globally_active_cells: 29035
+DEAL:0:2d::n_locally_owned_dofs: 485573
+DEAL:0:2d::n_global_dofs: 485573
+DEAL:0:3d::n_globally_active_cells: 13824
+DEAL:0:3d::n_locally_owned_dofs: 1125219
+DEAL:0:3d::n_global_dofs: 1125219
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_globally_active_cells: 29035
-DEAL:0:2d:: n_locally_owned_dofs: 242831
-DEAL:0:2d:: n_global_dofs: 485573
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_globally_active_cells: 13824
-DEAL:0:3d:: n_locally_owned_dofs: 567265
-DEAL:0:3d:: n_global_dofs: 1125219
+DEAL:0:2d::n_globally_active_cells: 29035
+DEAL:0:2d::n_locally_owned_dofs: 242831
+DEAL:0:2d::n_global_dofs: 485573
+DEAL:0:3d::n_globally_active_cells: 13824
+DEAL:0:3d::n_locally_owned_dofs: 567265
+DEAL:0:3d::n_global_dofs: 1125219
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_globally_active_cells: 29035
-DEAL:1:2d:: n_locally_owned_dofs: 242742
-DEAL:1:2d:: n_global_dofs: 485573
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_globally_active_cells: 13824
-DEAL:1:3d:: n_locally_owned_dofs: 557954
-DEAL:1:3d:: n_global_dofs: 1125219
+DEAL:1:2d::n_globally_active_cells: 29035
+DEAL:1:2d::n_locally_owned_dofs: 242742
+DEAL:1:2d::n_global_dofs: 485573
+DEAL:1:3d::n_globally_active_cells: 13824
+DEAL:1:3d::n_locally_owned_dofs: 557954
+DEAL:1:3d::n_global_dofs: 1125219
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_globally_active_cells: 29035
-DEAL:0:2d:: n_locally_owned_dofs: 68397
-DEAL:0:2d:: n_global_dofs: 485573
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_globally_active_cells: 13824
-DEAL:0:3d:: n_locally_owned_dofs: 162762
-DEAL:0:3d:: n_global_dofs: 1125219
-
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_globally_active_cells: 29035
-DEAL:1:2d:: n_locally_owned_dofs: 72246
-DEAL:1:2d:: n_global_dofs: 485573
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_globally_active_cells: 13824
-DEAL:1:3d:: n_locally_owned_dofs: 162413
-DEAL:1:3d:: n_global_dofs: 1125219
-
-
-DEAL:2:2d::Processor: 2
-DEAL:2:2d:: n_globally_active_cells: 29035
-DEAL:2:2d:: n_locally_owned_dofs: 67840
-DEAL:2:2d:: n_global_dofs: 485573
-DEAL:2:3d::Processor: 2
-DEAL:2:3d:: n_globally_active_cells: 13824
-DEAL:2:3d:: n_locally_owned_dofs: 161549
-DEAL:2:3d:: n_global_dofs: 1125219
-
-
-DEAL:3:2d::Processor: 3
-DEAL:3:2d:: n_globally_active_cells: 29035
-DEAL:3:2d:: n_locally_owned_dofs: 69235
-DEAL:3:2d:: n_global_dofs: 485573
-DEAL:3:3d::Processor: 3
-DEAL:3:3d:: n_globally_active_cells: 13824
-DEAL:3:3d:: n_locally_owned_dofs: 160833
-DEAL:3:3d:: n_global_dofs: 1125219
-
-
-DEAL:4:2d::Processor: 4
-DEAL:4:2d:: n_globally_active_cells: 29035
-DEAL:4:2d:: n_locally_owned_dofs: 69494
-DEAL:4:2d:: n_global_dofs: 485573
-DEAL:4:3d::Processor: 4
-DEAL:4:3d:: n_globally_active_cells: 13824
-DEAL:4:3d:: n_locally_owned_dofs: 161477
-DEAL:4:3d:: n_global_dofs: 1125219
-
-
-DEAL:5:2d::Processor: 5
-DEAL:5:2d:: n_globally_active_cells: 29035
-DEAL:5:2d:: n_locally_owned_dofs: 70925
-DEAL:5:2d:: n_global_dofs: 485573
-DEAL:5:3d::Processor: 5
-DEAL:5:3d:: n_globally_active_cells: 13824
-DEAL:5:3d:: n_locally_owned_dofs: 159501
-DEAL:5:3d:: n_global_dofs: 1125219
-
-
-DEAL:6:2d::Processor: 6
-DEAL:6:2d:: n_globally_active_cells: 29035
-DEAL:6:2d:: n_locally_owned_dofs: 67436
-DEAL:6:2d:: n_global_dofs: 485573
-DEAL:6:3d::Processor: 6
-DEAL:6:3d:: n_globally_active_cells: 13824
-DEAL:6:3d:: n_locally_owned_dofs: 156684
-DEAL:6:3d:: n_global_dofs: 1125219
+DEAL:0:2d::n_globally_active_cells: 29035
+DEAL:0:2d::n_locally_owned_dofs: 68397
+DEAL:0:2d::n_global_dofs: 485573
+DEAL:0:3d::n_globally_active_cells: 13824
+DEAL:0:3d::n_locally_owned_dofs: 162762
+DEAL:0:3d::n_global_dofs: 1125219
+
+DEAL:1:2d::n_globally_active_cells: 29035
+DEAL:1:2d::n_locally_owned_dofs: 72246
+DEAL:1:2d::n_global_dofs: 485573
+DEAL:1:3d::n_globally_active_cells: 13824
+DEAL:1:3d::n_locally_owned_dofs: 162413
+DEAL:1:3d::n_global_dofs: 1125219
+
+
+DEAL:2:2d::n_globally_active_cells: 29035
+DEAL:2:2d::n_locally_owned_dofs: 67840
+DEAL:2:2d::n_global_dofs: 485573
+DEAL:2:3d::n_globally_active_cells: 13824
+DEAL:2:3d::n_locally_owned_dofs: 161549
+DEAL:2:3d::n_global_dofs: 1125219
+
+
+DEAL:3:2d::n_globally_active_cells: 29035
+DEAL:3:2d::n_locally_owned_dofs: 69235
+DEAL:3:2d::n_global_dofs: 485573
+DEAL:3:3d::n_globally_active_cells: 13824
+DEAL:3:3d::n_locally_owned_dofs: 160833
+DEAL:3:3d::n_global_dofs: 1125219
+
+
+DEAL:4:2d::n_globally_active_cells: 29035
+DEAL:4:2d::n_locally_owned_dofs: 69494
+DEAL:4:2d::n_global_dofs: 485573
+DEAL:4:3d::n_globally_active_cells: 13824
+DEAL:4:3d::n_locally_owned_dofs: 161477
+DEAL:4:3d::n_global_dofs: 1125219
+
+
+DEAL:5:2d::n_globally_active_cells: 29035
+DEAL:5:2d::n_locally_owned_dofs: 70925
+DEAL:5:2d::n_global_dofs: 485573
+DEAL:5:3d::n_globally_active_cells: 13824
+DEAL:5:3d::n_locally_owned_dofs: 159501
+DEAL:5:3d::n_global_dofs: 1125219
+
+
+DEAL:6:2d::n_globally_active_cells: 29035
+DEAL:6:2d::n_locally_owned_dofs: 67436
+DEAL:6:2d::n_global_dofs: 485573
+DEAL:6:3d::n_globally_active_cells: 13824
+DEAL:6:3d::n_locally_owned_dofs: 156684
+DEAL:6:3d::n_global_dofs: 1125219
dof_handler.distribute_dofs(fe);
if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
- deallog << " n_procs/n_dofs: "
+ deallog << "n_procs/n_dofs: "
<< Utilities::MPI::n_mpi_processes(mpi_communicator) << '/'
<< dof_handler.n_dofs() << std::endl;
}
-DEAL:0:: n_procs/n_dofs: 1/1089
-DEAL:0:: n_procs/n_dofs: 2/1089
-DEAL:0:: n_procs/n_dofs: 3/1089
-DEAL:0:: n_procs/n_dofs: 4/1089
-DEAL:0:: n_procs/n_dofs: 5/1089
-DEAL:0:: n_procs/n_dofs: 6/1089
-DEAL:0:: n_procs/n_dofs: 7/1089
-DEAL:0:: n_procs/n_dofs: 8/1089
-DEAL:0:: n_procs/n_dofs: 9/1089
-DEAL:0:: n_procs/n_dofs: 10/1089
+DEAL:0::n_procs/n_dofs: 1/1089
+DEAL:0::n_procs/n_dofs: 2/1089
+DEAL:0::n_procs/n_dofs: 3/1089
+DEAL:0::n_procs/n_dofs: 4/1089
+DEAL:0::n_procs/n_dofs: 5/1089
+DEAL:0::n_procs/n_dofs: 6/1089
+DEAL:0::n_procs/n_dofs: 7/1089
+DEAL:0::n_procs/n_dofs: 8/1089
+DEAL:0::n_procs/n_dofs: 9/1089
+DEAL:0::n_procs/n_dofs: 10/1089
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FESystem<dim>(FE_Q<dim>(2), dim));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(1);
- if (cell->id().to_string() == "2_0:")
- cell->set_active_fe_index(2);
- if (cell->id().to_string() == "3_0:")
- cell->set_active_fe_index(0);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(2);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(0);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 50
-DEAL:0:2d:: n_global_dofs: 50
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 225
-DEAL:0:3d:: n_global_dofs: 225
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 2 3 18 19 6 7 34 35 10 11 20 21 22 23 44 45 24 25
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 4 5 6 7 26 27 36 37 28 29 40 41 14 15 30 31 32 33
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 6 7 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+DEAL:0:2d::locally_owned_dofs: {[0,49]}
+DEAL:0:2d::n_locally_owned_dofs: 50
+DEAL:0:2d::n_global_dofs: 50
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 3 4 5 81 82 83 9 10 11 153 154 155 15 16 17 84 85 86 21 22 23 162 163 164 27 28 29 87 88 89 90 91 92 177 178 179 39 40 41 93 94 95 96 97 98 189 190 191 51 52 53 99 100 101 57 58 59 195 196 197 63 64 65 102 103 104 105 106 107 210 211 212 108 109 110 111 112 113 114 115 116
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 6 7 8 9 10 11 117 118 119 156 157 158 18 19 20 21 22 23 120 121 122 165 166 167 123 124 125 171 172 173 33 34 35 126 127 128 129 130 131 183 184 185 45 46 47 132 133 134 54 55 56 57 58 59 135 136 137 198 199 200 138 139 140 204 205 206 69 70 71 141 142 143 144 145 146 147 148 149 150 151 152
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 9 10 11 153 154 155 156 157 158 159 160 161 21 22 23 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 57 58 59 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
+DEAL:0:3d::locally_owned_dofs: {[0,224]}
+DEAL:0:3d::n_locally_owned_dofs: 225
+DEAL:0:3d::n_global_dofs: 225
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: n_locally_owned_dofs: 26
-DEAL:0:2d:: n_global_dofs: 50
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: n_locally_owned_dofs: 117
-DEAL:0:3d:: n_global_dofs: 225
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 2 3 18 19 6 7 34 35 10 11 20 21 22 23 44 45 24 25
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 4 5 6 7 26 27 36 37 28 29 40 41 14 15 30 31 32 33
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 6 7 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+DEAL:0:2d::locally_owned_dofs: {[0,25]}
+DEAL:0:2d::n_locally_owned_dofs: 26
+DEAL:0:2d::n_global_dofs: 50
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 3 4 5 81 82 83 9 10 11 153 154 155 15 16 17 84 85 86 21 22 23 162 163 164 27 28 29 87 88 89 90 91 92 177 178 179 39 40 41 93 94 95 96 97 98 189 190 191 51 52 53 99 100 101 57 58 59 195 196 197 63 64 65 102 103 104 105 106 107 210 211 212 108 109 110 111 112 113 114 115 116
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 6 7 8 9 10 11 117 118 119 156 157 158 18 19 20 21 22 23 120 121 122 165 166 167 123 124 125 171 172 173 33 34 35 126 127 128 129 130 131 183 184 185 45 46 47 132 133 134 54 55 56 57 58 59 135 136 137 198 199 200 138 139 140 204 205 206 69 70 71 141 142 143 144 145 146 147 148 149 150 151 152
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 9 10 11 153 154 155 156 157 158 159 160 161 21 22 23 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 57 58 59 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
+DEAL:0:3d::locally_owned_dofs: {[0,116]}
+DEAL:0:3d::n_locally_owned_dofs: 117
+DEAL:0:3d::n_global_dofs: 225
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: n_locally_owned_dofs: 24
-DEAL:1:2d:: n_global_dofs: 50
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: n_locally_owned_dofs: 108
-DEAL:1:3d:: n_global_dofs: 225
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 2 3 18 19 6 7 34 35 10 11 20 21 22 23 44 45 24 25
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 4 5 6 7 26 27 36 37 28 29 40 41 14 15 30 31 32 33
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 6 7 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
+DEAL:1:2d::locally_owned_dofs: {[26,49]}
+DEAL:1:2d::n_locally_owned_dofs: 24
+DEAL:1:2d::n_global_dofs: 50
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 3 4 5 81 82 83 9 10 11 153 154 155 15 16 17 84 85 86 21 22 23 162 163 164 27 28 29 87 88 89 90 91 92 177 178 179 39 40 41 93 94 95 96 97 98 189 190 191 51 52 53 99 100 101 57 58 59 195 196 197 63 64 65 102 103 104 105 106 107 210 211 212 108 109 110 111 112 113 114 115 116
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 6 7 8 9 10 11 117 118 119 156 157 158 18 19 20 21 22 23 120 121 122 165 166 167 123 124 125 171 172 173 33 34 35 126 127 128 129 130 131 183 184 185 45 46 47 132 133 134 54 55 56 57 58 59 135 136 137 198 199 200 138 139 140 204 205 206 69 70 71 141 142 143 144 145 146 147 148 149 150 151 152
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 9 10 11 153 154 155 156 157 158 159 160 161 21 22 23 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 57 58 59 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
+DEAL:1:3d::locally_owned_dofs: {[117,224]}
+DEAL:1:3d::n_locally_owned_dofs: 108
+DEAL:1:3d::n_global_dofs: 225
#include "../tests.h"
+#include "hp_unify_dof_indices.h"
+
template <int dim>
void
fe.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1));
DoFHandler<dim> dof_handler(triangulation);
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- if (cell->is_locally_owned())
- {
- if (cell->id().to_string() == "0_0:")
- cell->set_active_fe_index(0);
- if (cell->id().to_string() == "1_0:")
- cell->set_active_fe_index(1);
- }
- }
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(1);
+ }
dof_handler.distribute_dofs(fe);
- deallog << "Processor: " << Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)
- << std::endl;
- for (auto &cell : dof_handler.active_cell_iterators())
- {
- deallog << " Cell: " << cell;
- if (cell->is_locally_owned())
- deallog << " is locally owned";
- else if (cell->is_ghost())
- deallog << " is ghost";
- deallog << std::endl;
-
- std::vector<types::global_dof_index> dof_indices(
- cell->get_fe().dofs_per_cell);
- cell->get_dof_indices(dof_indices);
- deallog << " ";
- for (auto i : dof_indices)
- deallog << i << ' ';
- deallog << std::endl;
- }
- deallog << " n_locally_owned_dofs: " << dof_handler.n_locally_owned_dofs()
- << std::endl;
- deallog << " n_global_dofs: " << dof_handler.n_dofs() << std::endl;
+ log_dof_diagnostics(dof_handler);
}
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0 is locally owned
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
-DEAL:0:2d:: Cell: 0.1 is locally owned
-DEAL:0:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
-DEAL:0:2d:: n_locally_owned_dofs: 22
-DEAL:0:2d:: n_global_dofs: 22
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0 is locally owned
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
-DEAL:0:3d:: Cell: 0.1 is locally owned
-DEAL:0:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
-DEAL:0:3d:: n_locally_owned_dofs: 62
-DEAL:0:3d:: n_global_dofs: 62
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
+DEAL:0:2d::locally_owned_dofs: {[0,21]}
+DEAL:0:2d::n_locally_owned_dofs: 22
+DEAL:0:2d::n_global_dofs: 22
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+DEAL:0:3d::locally_owned_dofs: {[0,61]}
+DEAL:0:3d::n_locally_owned_dofs: 62
+DEAL:0:3d::n_global_dofs: 62
-DEAL:0:2d::Processor: 0
-DEAL:0:2d:: Cell: 0.0 is locally owned
-DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
-DEAL:0:2d:: Cell: 0.1 is ghost
-DEAL:0:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
-DEAL:0:2d:: n_locally_owned_dofs: 13
-DEAL:0:2d:: n_global_dofs: 22
-DEAL:0:3d::Processor: 0
-DEAL:0:3d:: Cell: 0.0 is locally owned
-DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
-DEAL:0:3d:: Cell: 0.1 is ghost
-DEAL:0:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
-DEAL:0:3d:: n_locally_owned_dofs: 35
-DEAL:0:3d:: n_global_dofs: 62
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
+DEAL:0:2d::locally_owned_dofs: {[0,12]}
+DEAL:0:2d::n_locally_owned_dofs: 13
+DEAL:0:2d::n_global_dofs: 22
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+DEAL:0:3d::locally_owned_dofs: {[0,34]}
+DEAL:0:3d::n_locally_owned_dofs: 35
+DEAL:0:3d::n_global_dofs: 62
-DEAL:1:2d::Processor: 1
-DEAL:1:2d:: Cell: 0.0 is ghost
-DEAL:1:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
-DEAL:1:2d:: Cell: 0.1 is locally owned
-DEAL:1:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
-DEAL:1:2d:: n_locally_owned_dofs: 9
-DEAL:1:2d:: n_global_dofs: 22
-DEAL:1:3d::Processor: 1
-DEAL:1:3d:: Cell: 0.0 is ghost
-DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
-DEAL:1:3d:: Cell: 0.1 is locally owned
-DEAL:1:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
-DEAL:1:3d:: n_locally_owned_dofs: 27
-DEAL:1:3d:: n_global_dofs: 62
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 2 3 4 5 6 7 8 9 10 11 12
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 2 3 13 14 6 7 15 16 17 18 19 20 21
+DEAL:1:2d::locally_owned_dofs: {[13,21]}
+DEAL:1:2d::n_locally_owned_dofs: 9
+DEAL:1:2d::n_global_dofs: 22
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 2 3 35 36 6 7 37 38 10 11 39 40 14 15 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+DEAL:1:3d::locally_owned_dofs: {[35,61]}
+DEAL:1:3d::n_locally_owned_dofs: 27
+DEAL:1:3d::n_global_dofs: 62
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2021 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+
+
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
+// case with an FECollection that contains a FE_Q(4) and a FE_Q(2) element.
+// the hp-code will unify DoF indices on boundaries between all subdomains.
+//
+// same as hp_unify_dof_indices_03, but with inverted active FE indices. same
+// scenario is for the demonstration in the parallel-hp-paper.
+
+
+#include <deal.II/distributed/tria.h>
+
+#include <deal.II/dofs/dof_handler.h>
+
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_system.h>
+
+#include <deal.II/grid/grid_generator.h>
+
+#include <deal.II/hp/fe_collection.h>
+
+#include "../tests.h"
+
+#include "hp_unify_dof_indices.h"
+
+
+template <int dim>
+void
+test()
+{
+ parallel::distributed::Triangulation<dim> triangulation(
+ MPI_COMM_WORLD, Triangulation<dim>::limit_level_difference_at_vertices);
+
+ std::vector<unsigned int> reps(dim, 1U);
+ reps[0] = 2;
+ reps[1] = 2;
+ Point<dim> top_right;
+ for (unsigned int d = 0; d < dim; ++d)
+ top_right[d] = (d == 0 ? 2 : 1);
+ GridGenerator::subdivided_hyper_rectangle(triangulation,
+ reps,
+ Point<dim>(),
+ top_right);
+ Assert(triangulation.n_global_active_cells() == 4, ExcInternalError());
+ Assert(triangulation.n_active_cells() == 4, ExcInternalError());
+
+ hp::FECollection<dim> fe;
+ fe.push_back(FE_Q<dim>(4));
+ fe.push_back(FE_Q<dim>(2));
+
+ DoFHandler<dim> dof_handler(triangulation);
+ for (const auto &cell : dof_handler.active_cell_iterators())
+ if (cell->is_locally_owned())
+ {
+ if (cell->id().to_string() == "0_0:")
+ cell->set_active_fe_index(1);
+ if (cell->id().to_string() == "1_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "2_0:")
+ cell->set_active_fe_index(0);
+ if (cell->id().to_string() == "3_0:")
+ cell->set_active_fe_index(1);
+ }
+ dof_handler.distribute_dofs(fe);
+
+ log_dof_diagnostics(dof_handler);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+ MPILogInitAll log;
+
+ deallog.push("2d");
+ test<2>();
+ deallog.pop();
+
+ deallog.push("3d");
+ test<3>();
+ deallog.pop();
+}
--- /dev/null
+
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 9 3 49 10 5 11 12 13 14 15 16 17 18 54 19 20 21 22 23 24 25 26 27 28
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 2 3 29 50 30 31 32 33 52 34 35 7 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 3 49 50 51 52 53 54 55 56
+DEAL:0:2d::locally_owned_dofs: {[0,56]}
+DEAL:0:2d::n_locally_owned_dofs: 57
+DEAL:0:2d::n_global_dofs: 57
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 27 3 258 5 28 7 261 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 21 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 277 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 2 3 144 259 6 7 145 262 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 59 60 61 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 275 192 193 194 195 196 197 198 199 23 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 3 258 259 260 7 261 262 263 264 265 266 267 268 269 270 271 19 272 273 274 275 276 277 278 279 280 281
+DEAL:0:3d::locally_owned_dofs: {[0,281]}
+DEAL:0:3d::n_locally_owned_dofs: 282
+DEAL:0:3d::n_global_dofs: 282
--- /dev/null
+
+DEAL:0:2d::Cell: 0.0
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:0:2d::Cell: 0.1
+DEAL:0:2d:: locally owned
+DEAL:0:2d:: 1 9 3 49 10 5 11 12 13 14 15 16 17 18 54 19 20 21 22 23 24 25 26 27 28
+DEAL:0:2d::Cell: 0.2
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 2 3 29 50 30 31 32 33 52 34 35 7 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:0:2d::Cell: 0.3
+DEAL:0:2d:: ghost
+DEAL:0:2d:: 3 49 50 51 52 53 54 55 56
+DEAL:0:2d::locally_owned_dofs: {[0,28]}
+DEAL:0:2d::n_locally_owned_dofs: 29
+DEAL:0:2d::n_global_dofs: 57
+DEAL:0:3d::Cell: 0.0
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:0:3d::Cell: 0.1
+DEAL:0:3d:: locally owned
+DEAL:0:3d:: 1 27 3 258 5 28 7 261 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 21 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 277 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:0:3d::Cell: 0.2
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 2 3 144 259 6 7 145 262 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 59 60 61 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 275 192 193 194 195 196 197 198 199 23 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
+DEAL:0:3d::Cell: 0.3
+DEAL:0:3d:: ghost
+DEAL:0:3d:: 3 258 259 260 7 261 262 263 264 265 266 267 268 269 270 271 19 272 273 274 275 276 277 278 279 280 281
+DEAL:0:3d::locally_owned_dofs: {[0,143]}
+DEAL:0:3d::n_locally_owned_dofs: 144
+DEAL:0:3d::n_global_dofs: 282
+
+DEAL:1:2d::Cell: 0.0
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 0 1 2 3 4 5 6 7 8
+DEAL:1:2d::Cell: 0.1
+DEAL:1:2d:: ghost
+DEAL:1:2d:: 1 9 3 49 10 5 11 12 13 14 15 16 17 18 54 19 20 21 22 23 24 25 26 27 28
+DEAL:1:2d::Cell: 0.2
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 2 3 29 50 30 31 32 33 52 34 35 7 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:1:2d::Cell: 0.3
+DEAL:1:2d:: locally owned
+DEAL:1:2d:: 3 49 50 51 52 53 54 55 56
+DEAL:1:2d::locally_owned_dofs: {[29,56]}
+DEAL:1:2d::n_locally_owned_dofs: 28
+DEAL:1:2d::n_global_dofs: 57
+DEAL:1:3d::Cell: 0.0
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+DEAL:1:3d::Cell: 0.1
+DEAL:1:3d:: ghost
+DEAL:1:3d:: 1 27 3 258 5 28 7 261 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 21 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 277 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
+DEAL:1:3d::Cell: 0.2
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 2 3 144 259 6 7 145 262 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 59 60 61 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 275 192 193 194 195 196 197 198 199 23 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
+DEAL:1:3d::Cell: 0.3
+DEAL:1:3d:: locally owned
+DEAL:1:3d:: 3 258 259 260 7 261 262 263 264 265 266 267 268 269 270 271 19 272 273 274 275 276 277 278 279 280 281
+DEAL:1:3d::locally_owned_dofs: {[144,281]}
+DEAL:1:3d::n_locally_owned_dofs: 138
+DEAL:1:3d::n_global_dofs: 282
+