]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
The test is invalid if the DoFTools::dof_indices_with_subdomain_association function...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 20 Oct 2009 16:30:55 +0000 (16:30 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 20 Oct 2009 16:30:55 +0000 (16:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@19962 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/subdomain_ids_08.cc [deleted file]
tests/bits/subdomain_ids_08/cmp/generic [deleted file]

diff --git a/tests/bits/subdomain_ids_08.cc b/tests/bits/subdomain_ids_08.cc
deleted file mode 100644 (file)
index 719ddab..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-//----------------------------  subdomain_ids_08.cc  ---------------------------
-//    $Id$
-//    Version: $Name$
-//
-//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 by the deal.II authors
-//
-//    This file is subject to QPL and may not be  distributed
-//    without copyright and license information. Please refer
-//    to the file deal.II/doc/license.html for the  text  and
-//    further information on this license.
-//
-//----------------------------  subdomain_ids_08.cc  ---------------------------
-
-// check DoFTools::dof_indices_with_subdomain_association. after
-// reordering based on subdomain, the index range should be contiguous
-
-
-#include "../tests.h"
-#include <base/logstream.h>
-#include <grid/tria.h>
-#include <grid/grid_generator.h>
-#include <grid/tria_iterator.h>
-#include <dofs/dof_handler.h>
-#include <dofs/dof_accessor.h>
-#include <dofs/dof_tools.h>
-#include <dofs/dof_renumbering.h>
-#include <fe/fe_dgq.h>
-#include <fe/fe_q.h>
-#include <fe/fe_system.h>
-#include <dofs/dof_tools.h>
-
-#include <fstream>
-#include <algorithm>
-#include <cmath>
-
-
-std::ofstream logfile("subdomain_ids_08/output");
-
-
-template <int dim>
-void test ()
-{
-  deallog << dim << 'D' << std::endl;
-  Triangulation<dim> tria;
-  GridGenerator::hyper_cube(tria, -1, 1);
-  tria.refine_global (2);
-
-                                  // we now have a number of cells,
-                                  // flag them with some subdomain
-                                  // ids based on their position, in
-                                  // particular we take the quadrant
-                                  // (octant)
-  typename Triangulation<dim>::active_cell_iterator
-    cell = tria.begin_active (),
-    endc = tria.end ();
-  for (; cell!=endc; ++cell)
-    {
-      unsigned int subdomain = 0;
-      for (unsigned int d=0; d<dim; ++d)
-       if (cell->center()(d) > 0)
-         subdomain |= (1<<d);
-      Assert (subdomain < (1<<dim), ExcInternalError());
-
-      cell->set_subdomain_id (subdomain);
-    };
-
-                                  // distribute some degrees of freedom and
-                                  // output some information on them
-  FESystem<dim> fe(FE_Q<dim>(2),dim, FE_DGQ<dim>(1), 1);
-  DoFHandler<dim> dof_handler (tria);
-  dof_handler.distribute_dofs (fe);
-  deallog << dof_handler.n_dofs() << std::endl;
-
-
-  DoFRenumbering::subdomain_wise (dof_handler);
-
-  std::vector<unsigned int> subdomain_association (dof_handler.n_dofs());
-  DoFTools::get_subdomain_association (dof_handler,
-                                       subdomain_association);
-  for (unsigned int subdomain=0; subdomain<(1<<dim); ++subdomain)
-    {
-      const IndexSet index_set
-       = DoFTools::dof_indices_with_subdomain_association (dof_handler,
-                                                           subdomain);
-
-      deallog << "Index set is "
-             << (index_set.is_contiguous() ? "" : "not ")
-             << "contiguous."
-             << std::endl;
-
-      Assert (index_set.is_contiguous() == true,
-             ExcInternalError());
-
-      for (unsigned int i=0; i<dof_handler.n_dofs(); ++i)
-       Assert ((subdomain_association[i] == subdomain)
-               ==
-               (index_set.is_element(i) == true),
-               ExcInternalError());
-    }
-
-  deallog << "OK" << std::endl;
-}
-
-
-int main ()
-{
-  deallog << std::setprecision(4);
-  deallog.attach(logfile);
-  deallog.depth_console(0);
-  deallog.threshold_double(1.e-10);
-
-  test<1> ();
-  test<2> ();
-  test<3> ();
-
-  return 0;
-}
diff --git a/tests/bits/subdomain_ids_08/cmp/generic b/tests/bits/subdomain_ids_08/cmp/generic
deleted file mode 100644 (file)
index 04d0daf..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-DEAL::1D
-DEAL::17
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::OK
-DEAL::2D
-DEAL::226
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::OK
-DEAL::3D
-DEAL::2699
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::Index set is contiguous.
-DEAL::OK

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.