]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a problem where we can not forward declare an overloaded version of a template...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Oct 2006 02:04:55 +0000 (02:04 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Oct 2006 02:04:55 +0000 (02:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@14026 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/data_out_faces_01.cc
tests/bits/data_out_faces_02.cc
tests/bits/data_out_faces_03.cc
tests/bits/data_out_rotation_01.cc
tests/bits/data_out_rotation_02.cc
tests/bits/data_out_rotation_03.cc
tests/bits/dof_tools_18a.cc
tests/bits/dof_tools_18b.cc
tests/bits/dof_tools_18c.cc
tests/bits/dof_tools_18d.cc

index fdb3b4b611b1f26b8118a21aa9b49435324cf8db..0b11cc9a45d3cef6ff7c083145b5db7369ae3fc8 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -22,7 +22,7 @@ std::string output_file_name = "data_out_faces_01/output";
 
 
 void
-check_this (const DoFHandler<1>   &,
+my_check_this (const DoFHandler<1>   &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -32,7 +32,7 @@ check_this (const DoFHandler<1>   &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node,
             const Vector<double>  &v_cell)
 {
@@ -55,3 +55,19 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 22f5b3137f5deab4d212092a603a1fea48d4c7c5..f78399a6512633388ccfb9c6394617896b35add8 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -24,7 +24,7 @@ std::string output_file_name = "data_out_faces_02/output";
 
 
 void
-check_this (const DoFHandler<1>   &,
+my_check_this (const DoFHandler<1>   &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -34,7 +34,7 @@ check_this (const DoFHandler<1>   &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node_x,
             const Vector<double>  &v_cell_x)
 {
@@ -61,3 +61,21 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 276e26ce53a060deb94f5e0bfa0a13a2184295c4..e3ec61306d42c6cc494f4f1e6bd065f0c90273e7 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -57,7 +57,7 @@ class XDataOutReader : public DataOutReader<dim-1,dim>
 
 
 void
-check_this (const DoFHandler<1> &,
+my_check_this (const DoFHandler<1> &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -69,7 +69,7 @@ check_this (const DoFHandler<1> &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node,
             const Vector<double>  &v_cell)
 {
@@ -110,3 +110,21 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 0b256280985def70768b1acba86b0f251820f56b..c6546e791a6834db9e3674c2f7bc236e63f44bac 100644 (file)
@@ -22,7 +22,7 @@ std::string output_file_name = "data_out_rotation_01/output";
 
 
 void
-check_this (const DoFHandler<3>   &,
+my_check_this (const DoFHandler<3>   &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -32,7 +32,7 @@ check_this (const DoFHandler<3>   &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node,
             const Vector<double>  &v_cell)
 {
@@ -60,3 +60,19 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 50a07c906ff5574668a83d5399b8d63d26e6bc63..2d25af25d285a3fd860d9969970a52553db1a757 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -25,7 +25,7 @@ std::string output_file_name = "data_out_rotation_02/output";
 
 
 void
-check_this (const DoFHandler<3>   &,
+my_check_this (const DoFHandler<3>   &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -35,7 +35,7 @@ check_this (const DoFHandler<3>   &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node_x,
             const Vector<double>  &v_cell_x)
 {
@@ -67,3 +67,19 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 75a7830c67f687ed6a8738c80a8b9a7934432974..ad335d9241978855f486122b72b11e388605e87b 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -56,7 +56,7 @@ class XDataOutReader : public DataOutReader<dim+1>
 
 
 void
-check_this (const DoFHandler<3> &,
+my_check_this (const DoFHandler<3> &,
             const Vector<double>  &,
             const Vector<double>  &)
 {
@@ -67,7 +67,7 @@ check_this (const DoFHandler<3> &,
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler,
+my_check_this (const DoFHandler<dim> &dof_handler,
             const Vector<double>  &v_node,
             const Vector<double>  &v_cell)
 {
@@ -111,3 +111,19 @@ check_this (const DoFHandler<dim> &dof_handler,
 }
 
 
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &v_cell)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in data_out_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler, v_node, v_cell);
+}
index 143c8de56f1f7b279d06f1a93bd9b59e0d9b149a..9b954d09dad76267eb3526f4a0c197f5f4edb2e0 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2003, 2004, 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
@@ -40,13 +40,13 @@ make_masks (const unsigned int n,
 
   
 void
-check_this (const DoFHandler<1> &) 
+my_check_this (const DoFHandler<1> &) 
 {}
 
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler)
+my_check_this (const DoFHandler<dim> &dof_handler)
 {
   Table<2,DoFTools::Coupling> mask_int;
   Table<2,DoFTools::Coupling> mask_ext;
@@ -86,3 +86,19 @@ check_this (const DoFHandler<dim> &dof_handler)
                                        (sp.row_length(l)>1 ? 1 : 0)]);
   deallog << hash << std::endl;
 }
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in dof_tools_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler);
+}
index 327fee7334bb3bf3c4809b05ae99d67a188ccb2d..8f62bf955a35cdfe5ff7aba5be19708b86e89ca6 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2003, 2004, 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
@@ -39,14 +39,14 @@ make_masks (const unsigned int n,
 
   
 void
-check_this (const DoFHandler<1> &) 
+my_check_this (const DoFHandler<1> &) 
 {}
 
 
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler)
+my_check_this (const DoFHandler<dim> &dof_handler)
 {
   Table<2, DoFTools::Coupling> mask_int;
   Table<2, DoFTools::Coupling> mask_ext;
@@ -81,3 +81,18 @@ check_this (const DoFHandler<dim> &dof_handler)
     hash += l*sp.row_length(l);
   deallog << hash << std::endl;
 }
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in dof_tools_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler);
+}
index 23d1958420b9ced369561287a81df713d9c249c8..5b10b70c5211261c16cb437df1eac1648ff4d1f9 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2003, 2004, 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
@@ -39,13 +39,13 @@ make_masks (const unsigned int n,
 
   
 void
-check_this (const DoFHandler<1> &) 
+my_check_this (const DoFHandler<1> &) 
 {}
 
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler)
+my_check_this (const DoFHandler<dim> &dof_handler)
 {
                                    // we split up the matrix into
                                    // blocks according to the number
@@ -115,3 +115,19 @@ check_this (const DoFHandler<dim> &dof_handler)
       }
 }
 
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in dof_tools_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler);
+}
index 1dd177c428b8cabfd25713681e370f67a5d37376..8bea3e6076c001d723019f05f387415680ba8049 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$ 
 //
-//    Copyright (C) 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2003, 2004, 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
@@ -39,14 +39,14 @@ make_masks (const unsigned int n,
 
   
 void
-check_this (const DoFHandler<1> &) 
+my_check_this (const DoFHandler<1> &) 
 {}
 
 
 
 template <int dim>
 void
-check_this (const DoFHandler<dim> &dof_handler)
+my_check_this (const DoFHandler<dim> &dof_handler)
 {
                                    // we split up the matrix into
                                    // blocks according to the number
@@ -115,3 +115,18 @@ check_this (const DoFHandler<dim> &dof_handler)
       }
 }
 
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler)
+{
+                                  // since we can't forward declare
+                                  // check_this in this file (it is forward
+                                  // declared in dof_tools_common.cc), we
+                                  // also can't make the driver file aware of
+                                  // the overload for 1d. to avoid linker
+                                  // errors, we can consequently not overload
+                                  // check_this, and need this forwarder
+                                  // function
+  my_check_this (dof_handler);
+}

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.