]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Exclude one function from compilation in other dimensions than the one it is used...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Jul 2001 07:40:18 +0000 (07:40 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Jul 2001 07:40:18 +0000 (07:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@4815 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_generator.cc

index 9f9f0124514805445636c17eb54aa7619706b850..882333eba957b453fb7db1a76b773c363f482658 100644 (file)
@@ -116,6 +116,8 @@ GridGenerator::hyper_rectangle (Triangulation<dim> &tria,
 
 
 
+#if deal_II_dimension == 1
+
 void
 GridGenerator::colorize_hyper_rectangle (Triangulation<1> &)
 {
@@ -123,7 +125,7 @@ GridGenerator::colorize_hyper_rectangle (Triangulation<1> &)
 };
 
 
-#if deal_II_dimension != 1
+#else
 
 template <int dim>
 void
@@ -815,6 +817,13 @@ void GridGenerator::laplace_transformation (Triangulation<dim> &tria,
 
 #endif
 
+
+// make the following function inline. this is so that it becomes marked
+// internal/weak for the linker and we don't get multiply defined errors
+// when linking with more than one dimension at a time. Usually we used
+// the trick of putting these functions in a .all_dimensions.cc file, but
+// this is not necessary here as this is an internal only function.
+inline
 void GridGenerator::laplace_solve (const SparseMatrix<double> &S,
                                   const std::map<unsigned int,double> &m,
                                   Vector<double> &u)

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.