]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move fullydistributed_grids/tests.h to grid/
authorPasquale Africa <pafrica@sissa.it>
Tue, 4 Jul 2023 19:40:41 +0000 (19:40 +0000)
committerPasquale Africa <pafrica@sissa.it>
Fri, 14 Jul 2023 14:50:40 +0000 (14:50 +0000)
28 files changed:
tests/fullydistributed_grids/copy_distributed_tria_01.cc
tests/fullydistributed_grids/copy_distributed_tria_02.cc
tests/fullydistributed_grids/copy_distributed_tria_03.cc
tests/fullydistributed_grids/copy_serial_tria_01.cc
tests/fullydistributed_grids/copy_serial_tria_02.cc
tests/fullydistributed_grids/copy_serial_tria_03.cc
tests/fullydistributed_grids/copy_serial_tria_04.cc
tests/fullydistributed_grids/copy_serial_tria_05.cc
tests/fullydistributed_grids/copy_serial_tria_06.cc
tests/fullydistributed_grids/copy_serial_tria_07.cc
tests/fullydistributed_grids/copy_serial_tria_08.cc
tests/fullydistributed_grids/copy_serial_tria_09.cc
tests/fullydistributed_grids/copy_serial_tria_10.cc
tests/fullydistributed_grids/copy_serial_tria_11.cc
tests/fullydistributed_grids/copy_serial_tria_12.cc
tests/fullydistributed_grids/copy_serial_tria_grouped_01.cc
tests/fullydistributed_grids/memory_consumption_01.cc
tests/fullydistributed_grids/repartitioning_01.cc
tests/fullydistributed_grids/repartitioning_02.cc
tests/fullydistributed_grids/repartitioning_03.cc
tests/fullydistributed_grids/repartitioning_04.cc
tests/fullydistributed_grids/repartitioning_05.cc
tests/fullydistributed_grids/repartitioning_06.cc
tests/fullydistributed_grids/repartitioning_07.cc
tests/fullydistributed_grids/repartitioning_08.cc
tests/fullydistributed_grids/save_load_01.cc
tests/fullydistributed_grids/solution_transfer_01.cc
tests/grid/tests.h [new file with mode: 0644]

index e6186debf68e29d659ad9bf651c7d43574d16ba8..73b19384a1e0f74feec3acf236cc64e31c054e84 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 06335095a63018119a9a5976beae519b0a20b567..c0376fde7dff62f1dc1bde5980ad7a7e110910e7 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index ff259256e9895417e9a609b82349525f788a72fa..d207fd3ab291608ec770f510c169efb80f246f36 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/grid_tools.h>
 #include <deal.II/grid/tria.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 398e8601351177c74f884b48ccd36753710315f7..d698fda036632ea1c1808d7dad9db79150b0a77d 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 1a4bb2c713c7d2d3e3340c0cb24cac59668a3bdd..1b6fc410247536dac62bb98160b095bce8a2900d 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 300c2070734a1207f123ffe59e54b2971b712b2f..1e7f6a52147fb55dc7a97bdfd6572289ff30b5af 100644 (file)
@@ -31,7 +31,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 5ac5d931740df7789d3014564b8e89279122c9e5..4bccf5921e3ef1cb3df1e69431493f43579764c3 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index f8963895543ff90e0889ee2526fbc0f58cd1740c..c4deaef27bce21860c5a6263673065911f976414 100644 (file)
@@ -31,7 +31,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 726855343b5b1e3411e605315aafae677e7bbb49..61a579ffd9e172756baa3b8c1f77fb0eaf770a1f 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <deal.II/matrix_free/matrix_free.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 0b7f7e2edde6405bd56463e7238b42061be0d0b0..043da5f5dbe38fb581f5dfe093b9db61e292cc7e 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/grid_tools.h>
 #include <deal.II/grid/tria.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index c5d8785987534fc65b2020755ddc54f74a4a74e2..afd7d1fa6ad43ddde9dd63d3af6f23835989a979 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/grid_tools.h>
 #include <deal.II/grid/tria.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 96c1d64dd44f5b8769a5dae1ac3434430b2dd817..a342679ceada7adfe98da356c5b3490279fd3850 100644 (file)
@@ -31,7 +31,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index a0a5685414386634a27b9a5573d40a438b6cfc29..d9f3a442a94c6eb4e193770c2f51a605273601c4 100644 (file)
@@ -33,7 +33,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 5584d5d40ddbc08d367382b45199553bd2c708db..12f42b78daf75e81992f2604d602d4fb7d344159 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index d07ad855522dbacedc19f42c5798e52d73adc772..56d7c21a62384c3d470169ad45927418be5c803e 100644 (file)
@@ -30,7 +30,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_description.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 324bedcf0115428197892ea3997b876b2766ad6e..53e1ac910fd918be1ae4e99441399991b5fae71a 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <boost/archive/text_oarchive.hpp>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 0df6a307bdb7341ead19ce082e7fbe26b05cc537..9f6b9cc9e0f039c2dd29246d8c03c4d4f639a7fc 100644 (file)
@@ -29,7 +29,7 @@
 #include <deal.II/grid/grid_tools.h>
 #include <deal.II/grid/tria.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 630bc2bb363a5db4a669707af7749c77f98bba3d..aa7b6881983b264db69bda2569e396df4b106812 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 671e117b54e32aa87d614602ba4b4a17096e5a4f..9cac419836af7cd91a091ff7b325ee0a132b940b 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 985fc1a613238056c40b3df4e4f50f635b0fe604..ec32f1f30dde7bba6fc7b6d64d7634eea6a1bf37 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index f705b2a78474d04626c46929a0f11d5d17546a20..34385f857d32be6c16e89d7086d396de6840be6c 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 0eaf28797495d49a57080c9278e39e1699d9a210..c7d97ef9b57819fd30ef6fb4c5eb5c8b937abf98 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 6b6ffe95a293fc9ee65e121f54164648297cb22f..28b24ac13cfab678a2ba897371339e2f6c77aa26 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 7894b08aae71d320f8eb7e25c4c33ac74d0001bc..1aaa5655b3e5f3531910b8bbe939f958d584ee01 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 400a0afca7d861d19cdebfb66b5d4a97a11a8689..81b53ee08008fed69b55606a74007339b59b9870 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <deal.II/numerics/data_out.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index c47123c6d0640e5b048945fc63fb2d1bb36c2de5..4d5ee17fd683629bc0bbd216cf85bc2852b7d40a 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <deal.II/lac/la_parallel_vector.h>
 
-#include "./tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
index 0aedae0de23ff7c0516a09b7a418f8be1763aab4..a25f7950cf56e87efa4d32fe79156325e77b7651 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <deal.II/numerics/vector_tools.h>
 
-#include "../tests.h"
+#include "../grid/tests.h"
 
 using namespace dealii;
 
diff --git a/tests/grid/tests.h b/tests/grid/tests.h
new file mode 100644 (file)
index 0000000..a138f5f
--- /dev/null
@@ -0,0 +1,78 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2019 - 2022 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.
+//
+// ---------------------------------------------------------------------
+
+#ifndef dealii_grid_tests_h
+#define dealii_grid_tests_h
+
+#include "../tests.h"
+
+
+template <int dim, int spacedim>
+void
+print_statistics(const Triangulation<dim, spacedim> &tria, bool do_mg = false)
+{
+  deallog << "n_levels:                  " << tria.n_levels() << std::endl;
+  deallog << "n_cells:                   " << tria.n_cells() << std::endl;
+  deallog << "n_active_cells:            " << tria.n_active_cells()
+          << std::endl;
+  deallog << "has_hanging_nodes:         "
+          << (tria.has_hanging_nodes() ? "true" : "false") << std::endl;
+
+  if (do_mg)
+    {
+      for (auto level = 0u; level < tria.n_levels(); ++level)
+        deallog << "n_cells on level=" << level << ":        "
+                << tria.n_cells(level) << std::endl;
+
+      for (auto level = 0u; level < tria.n_levels(); ++level)
+        deallog << "n_active_cells on level=" << level << ": "
+                << tria.n_active_cells(level) << std::endl;
+    }
+
+  deallog << std::endl;
+}
+
+template <int dim, int spacedim>
+void
+print_statistics(const DoFHandler<dim, spacedim> &dof_handler,
+                 bool                             do_mg = false)
+{
+  deallog << "n_dofs:                             " << dof_handler.n_dofs()
+          << std::endl;
+  deallog << "n_locally_owned_dofs:               "
+          << dof_handler.n_locally_owned_dofs() << std::endl;
+  deallog << "has_hanging_nodes:                  "
+          << (dof_handler.get_triangulation().has_hanging_nodes() ? "true" :
+                                                                    "false")
+          << std::endl;
+
+  const auto n_levels = dof_handler.get_triangulation().n_levels();
+
+  if (do_mg)
+    {
+      for (auto level = 0u; level < n_levels; ++level)
+        deallog << "n_dofs on level=" << level << ":                  "
+                << dof_handler.n_dofs(level) << std::endl;
+
+      for (auto level = 0u; level < n_levels; ++level)
+        deallog << "n_locally_owned_mg_dofs on level=" << level << ": "
+                << dof_handler.locally_owned_mg_dofs(level).n_elements()
+                << std::endl;
+    }
+
+  deallog << std::endl;
+}
+
+#endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.