]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tiny unit test to check that p::s::Tria::locally_owned_subdomai works in 1d 3051/head
authorDenis Davydov <davydden@gmail.com>
Thu, 1 Sep 2016 22:01:54 +0000 (00:01 +0200)
committerDenis Davydov <davydden@gmail.com>
Thu, 1 Sep 2016 22:01:54 +0000 (00:01 +0200)
tests/mpi/locally_owned_subdomain_01.cc [new file with mode: 0644]
tests/mpi/locally_owned_subdomain_01.mpirun=3.output [new file with mode: 0644]

diff --git a/tests/mpi/locally_owned_subdomain_01.cc b/tests/mpi/locally_owned_subdomain_01.cc
new file mode 100644 (file)
index 0000000..175f8d5
--- /dev/null
@@ -0,0 +1,43 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 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 that p::s::Tria.locally_owned_subdomain() works in 1d.
+
+#include "../tests.h"
+
+#include <deal.II/base/geometry_info.h>
+#include <deal.II/base/logstream.h>
+#include <deal.II/base/quadrature_lib.h>
+#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/distributed/shared_tria.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/grid_generator.h>
+
+#include <fstream>
+
+
+
+int main (int argc, char *argv[])
+{
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
+  MPILogInitAll all;
+
+  {
+    parallel::shared::Triangulation<1> tria(MPI_COMM_WORLD);
+    deallog << tria.locally_owned_subdomain() << std::endl;
+  }
+}
diff --git a/tests/mpi/locally_owned_subdomain_01.mpirun=3.output b/tests/mpi/locally_owned_subdomain_01.mpirun=3.output
new file mode 100644 (file)
index 0000000..00c8874
--- /dev/null
@@ -0,0 +1,8 @@
+
+DEAL:0::0
+
+DEAL:1::1
+
+
+DEAL:2::2
+

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.