]> https://gitweb.dealii.org/ - dealii.git/commitdiff
new test for counting and missing files
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 8 Jul 2003 10:58:45 +0000 (10:58 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 8 Jul 2003 10:58:45 +0000 (10:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@7852 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/Makefile
tests/bits/dof_tools_00a.cc [new file with mode: 0644]

index 83a171cf6bba27f60d9d2667bdacfef9c6746aa7..c12e27d5c04c927a336fe79699bd17280d0fe6d1 100644 (file)
@@ -36,6 +36,7 @@ data_out_faces_02.exe   : data_out_faces_02.g.$(OBJEXT)    $(libraries)
 data_out_rotation_01.exe: data_out_rotation_01.g.$(OBJEXT) $(libraries)
 data_out_rotation_02.exe: data_out_rotation_02.g.$(OBJEXT) $(libraries)
 data_out_stack_01.exe   : data_out_stack_01.g.$(OBJEXT)    $(libraries)
+dof_tools_00a.exe       : dof_tools_00a.g.$(OBJEXT)        $(libraries)
 dof_tools_01a.exe       : dof_tools_01a.g.$(OBJEXT)        $(libraries)
 dof_tools_01b.exe       : dof_tools_01b.g.$(OBJEXT)        $(libraries)
 dof_tools_01c.exe       : dof_tools_01c.g.$(OBJEXT)        $(libraries)
@@ -96,6 +97,7 @@ tests = anna_1 anna_2 anna_3 anna_4 anna_5 anna_6 \
        geometry_info_1 \
        data_out_01 data_out_02 data_out_faces_01 data_out_faces_02 \
        data_out_rotation_01 data_out_rotation_02 data_out_stack_01 \
+       dof_tools_00a \
         dof_tools_01a dof_tools_01b dof_tools_01c dof_tools_01d \
         dof_tools_02a dof_tools_02b dof_tools_02c dof_tools_02d \
        dof_tools_03 dof_tools_04 dof_tools_05 dof_tools_06 \
diff --git a/tests/bits/dof_tools_00a.cc b/tests/bits/dof_tools_00a.cc
new file mode 100644 (file)
index 0000000..1bb4c39
--- /dev/null
@@ -0,0 +1,62 @@
+//----------------------------  dof_tools_1c.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2003 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.
+//
+//----------------------------  dof_tools_1c.cc  ---------------------------
+
+#include "dof_tools_common.cc"
+#include <lac/block_sparsity_pattern.h>
+
+// check
+//   DoFTools::
+//   count_dofs_per_component (...);
+
+std::string output_file_name = "dof_tools_00a.output";
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler)
+{
+  const unsigned int n_components = dof_handler.get_fe().n_components();
+
+  deallog << "n_dofs:" << dof_handler.n_dofs() << std::endl;
+  
+  std::vector<unsigned int> dofs_per_component(n_components);
+  DoFTools::count_dofs_per_component (dof_handler,
+                                     dofs_per_component);
+
+  for (unsigned int i=0;i<n_components;++i)
+    deallog << ' ' << dofs_per_component[i];
+  deallog << std::endl;
+
+  if (n_components>1)
+    {
+      std::vector<unsigned int> target_component(n_components,0U);
+
+      DoFTools::count_dofs_per_component (dof_handler,
+                                         dofs_per_component,
+                                         target_component);
+      for (unsigned int i=0;i<n_components;++i)
+       deallog << ' ' << dofs_per_component[i];
+      deallog << std::endl;
+
+      for (unsigned int i=n_components/2;i<n_components;++i)
+       target_component[i] = 1;
+      
+      DoFTools::count_dofs_per_component (dof_handler,
+                                         dofs_per_component,
+                                         target_component);
+      for (unsigned int i=0;i<n_components;++i)
+       deallog << ' ' << dofs_per_component[i];
+      deallog << 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.