]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add zoltan tests
authorNivesh Dommaraju <nidhinivesh.d@gmail.com>
Sun, 26 Nov 2017 17:49:02 +0000 (11:49 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sun, 26 Nov 2017 17:49:02 +0000 (11:49 -0600)
tests/zoltan/CMakeLists.txt [new file with mode: 0644]
tests/zoltan/zoltan_01.cc [new file with mode: 0644]
tests/zoltan/zoltan_01.output [new file with mode: 0644]

diff --git a/tests/zoltan/CMakeLists.txt b/tests/zoltan/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2d40baa
--- /dev/null
@@ -0,0 +1,7 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
+INCLUDE(../setup_testsubproject.cmake)
+PROJECT(testsuite CXX)
+
+IF(DEAL_II_WITH_TRILINOS AND DEAL_II_TRILINOS_WITH_ZOLTAN)
+  DEAL_II_PICKUP_TESTS()
+ENDIF()
diff --git a/tests/zoltan/zoltan_01.cc b/tests/zoltan/zoltan_01.cc
new file mode 100644 (file)
index 0000000..2f7141d
--- /dev/null
@@ -0,0 +1,59 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2004 - 2015 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 at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+
+// check GridTools::partition_triangulation using ZOLTAN as partitioner
+// Test 1 (metis_01.cc) of metis is used as model for this test
+
+#include "../tests.h"
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/grid_generator.h>
+
+
+template <int dim>
+void test ()
+{
+  Triangulation<dim> triangulation;
+  GridGenerator::hyper_cube (triangulation);
+  triangulation.refine_global (5-dim);
+
+  // subdivides into 5 subdomains
+  deallog << "Partitioning" << std::endl;
+  GridTools::partition_triangulation (5, triangulation, SparsityTools::Partitioner::zoltan);
+  for (typename Triangulation<dim>::active_cell_iterator
+       cell = triangulation.begin_active();
+       cell != triangulation.end(); ++cell)
+    deallog << cell << ' ' << cell->subdomain_id() << std::endl;
+
+}
+
+
+
+int main (int argc, char **argv)
+{
+  initlog();
+
+  //Initialize MPI and Zoltan
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv);
+
+  //tests
+  test<1> ();
+  test<2> ();
+  test<3> ();
+}
diff --git a/tests/zoltan/zoltan_01.output b/tests/zoltan/zoltan_01.output
new file mode 100644 (file)
index 0000000..079cb44
--- /dev/null
@@ -0,0 +1,148 @@
+
+DEAL::Partitioning
+DEAL::4.0 4
+DEAL::4.1 4
+DEAL::4.2 4
+DEAL::4.3 3
+DEAL::4.4 3
+DEAL::4.5 3
+DEAL::4.6 2
+DEAL::4.7 2
+DEAL::4.8 2
+DEAL::4.9 1
+DEAL::4.10 1
+DEAL::4.11 1
+DEAL::4.12 1
+DEAL::4.13 0
+DEAL::4.14 0
+DEAL::4.15 0
+DEAL::Partitioning
+DEAL::3.0 4
+DEAL::3.1 4
+DEAL::3.2 4
+DEAL::3.3 4
+DEAL::3.4 4
+DEAL::3.5 2
+DEAL::3.6 4
+DEAL::3.7 2
+DEAL::3.8 4
+DEAL::3.9 4
+DEAL::3.10 4
+DEAL::3.11 4
+DEAL::3.12 4
+DEAL::3.13 2
+DEAL::3.14 4
+DEAL::3.15 1
+DEAL::3.16 2
+DEAL::3.17 2
+DEAL::3.18 2
+DEAL::3.19 2
+DEAL::3.20 2
+DEAL::3.21 2
+DEAL::3.22 2
+DEAL::3.23 2
+DEAL::3.24 2
+DEAL::3.25 2
+DEAL::3.26 1
+DEAL::3.27 0
+DEAL::3.28 0
+DEAL::3.29 0
+DEAL::3.30 0
+DEAL::3.31 0
+DEAL::3.32 3
+DEAL::3.33 3
+DEAL::3.34 3
+DEAL::3.35 3
+DEAL::3.36 3
+DEAL::3.37 1
+DEAL::3.38 3
+DEAL::3.39 1
+DEAL::3.40 3
+DEAL::3.41 3
+DEAL::3.42 3
+DEAL::3.43 3
+DEAL::3.44 3
+DEAL::3.45 1
+DEAL::3.46 3
+DEAL::3.47 1
+DEAL::3.48 1
+DEAL::3.49 0
+DEAL::3.50 1
+DEAL::3.51 1
+DEAL::3.52 0
+DEAL::3.53 0
+DEAL::3.54 0
+DEAL::3.55 0
+DEAL::3.56 1
+DEAL::3.57 1
+DEAL::3.58 1
+DEAL::3.59 1
+DEAL::3.60 0
+DEAL::3.61 0
+DEAL::3.62 0
+DEAL::3.63 0
+DEAL::Partitioning
+DEAL::2.0 4
+DEAL::2.1 4
+DEAL::2.2 4
+DEAL::2.3 4
+DEAL::2.4 3
+DEAL::2.5 3
+DEAL::2.6 3
+DEAL::2.7 3
+DEAL::2.8 4
+DEAL::2.9 4
+DEAL::2.10 2
+DEAL::2.11 2
+DEAL::2.12 4
+DEAL::2.13 4
+DEAL::2.14 2
+DEAL::2.15 2
+DEAL::2.16 0
+DEAL::2.17 0
+DEAL::2.18 0
+DEAL::2.19 0
+DEAL::2.20 0
+DEAL::2.21 0
+DEAL::2.22 0
+DEAL::2.23 0
+DEAL::2.24 2
+DEAL::2.25 2
+DEAL::2.26 2
+DEAL::2.27 2
+DEAL::2.28 1
+DEAL::2.29 2
+DEAL::2.30 1
+DEAL::2.31 1
+DEAL::2.32 3
+DEAL::2.33 3
+DEAL::2.34 3
+DEAL::2.35 3
+DEAL::2.36 3
+DEAL::2.37 3
+DEAL::2.38 3
+DEAL::2.39 3
+DEAL::2.40 4
+DEAL::2.41 4
+DEAL::2.42 2
+DEAL::2.43 2
+DEAL::2.44 4
+DEAL::2.45 4
+DEAL::2.46 2
+DEAL::2.47 2
+DEAL::2.48 0
+DEAL::2.49 0
+DEAL::2.50 0
+DEAL::2.51 0
+DEAL::2.52 0
+DEAL::2.53 1
+DEAL::2.54 0
+DEAL::2.55 1
+DEAL::2.56 1
+DEAL::2.57 1
+DEAL::2.58 1
+DEAL::2.59 1
+DEAL::2.60 1
+DEAL::2.61 1
+DEAL::2.62 1
+DEAL::2.63 1

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.