]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add new test that presently fails
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 26 Apr 2006 03:53:40 +0000 (03:53 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 26 Apr 2006 03:53:40 +0000 (03:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@12901 0785d39b-7218-0410-832d-ea1e28bc413d

tests/hp/Makefile
tests/hp/continuous_2d_01.cc [new file with mode: 0644]

index 1f9a74bafc261d0ab0fb77a9bd907f6e703d67d2..f3cbd0d93772938350b6e472224921c8bf453085 100644 (file)
@@ -25,7 +25,8 @@ tests_x = hp_dof_handler \
          crash_* \
          q_collection_* \
          mapping_collection_* \
-         fe_collection_*
+         fe_collection_* \
+         continuous_2d_*
 
 # from above list of regular expressions, generate the real set of
 # tests
diff --git a/tests/hp/continuous_2d_01.cc b/tests/hp/continuous_2d_01.cc
new file mode 100644 (file)
index 0000000..822ef61
--- /dev/null
@@ -0,0 +1,75 @@
+//----------------------------  continuous_2d_01.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 2006 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.
+//
+//----------------------------  continuous_2d_01.cc  ---------------------------
+
+
+// check hp::DoFHandler<2>::reserve_space for continuous elements, but
+// where we use the same element on all cells
+
+
+#include <base/logstream.h>
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_accessor.h>
+#include <grid/grid_out.h>
+#include <grid/tria_iterator.h>
+#include <dofs/hp_dof_handler.h>
+#include <dofs/dof_accessor.h>
+#include <fe/fe_q.h>
+
+#include <fstream>
+
+
+
+template <int dim>
+void test ()
+{
+  Triangulation<dim> tria;
+  GridGenerator::hyper_cube(tria);
+  tria.refine_global (2);
+  tria.begin_active()->set_refine_flag ();
+  tria.execute_coarsening_and_refinement ();
+  tria.refine_global (1);  
+
+  const hp::FECollection<dim> fe_collection (FE_Q<dim> (1));
+
+  hp::DoFHandler<dim> dof_handler(tria);
+  dof_handler.distribute_dofs(fe_collection);
+
+  std::vector<unsigned int> local_dof_indices (fe_collection[0].dofs_per_cell);
+  for (typename hp::DoFHandler<dim>::active_cell_iterator
+         cell=dof_handler.begin_active();
+       cell!=dof_handler.end(); ++cell)
+    {
+      cell->get_dof_indices (local_dof_indices);
+
+      deallog << cell << std::endl;
+      for (unsigned int i=0; i<local_dof_indices.size(); ++i)
+        deallog << local_dof_indices[i] << ' ';
+      deallog << std::endl;
+    }
+}
+
+
+int main ()
+{
+  std::ofstream logfile("continuous_2d_01/output");
+  logfile.precision(2);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);  
+
+  test<2> ();
+  
+  deallog << "OK" << std::endl;
+}

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.