]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix the instantiations of GridOut::write_svg().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2020 01:01:43 +0000 (18:01 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2020 01:01:43 +0000 (18:01 -0700)
By accident, we didn't instantiate the <3,3> case and users consequently
get funny linker errors that they have a hard time interpreting. Fix this.

source/grid/grid_out.inst.in

index 7af8cf2311ea2c9028451dc45dc937b5d4467339..b9d843ac1ca76369840f1a86272aada9c8502255 100644 (file)
@@ -24,11 +24,6 @@ for (deal_II_dimension : DIMENSIONS)
       const Triangulation<deal_II_dimension> &, std::ostream &) const;
 #endif
 
-#if deal_II_dimension != 2
-    template void GridOut::write_svg(const Triangulation<deal_II_dimension> &,
-                                     std::ostream &) const;
-#endif
-
     template void GridOut::write_msh(const Triangulation<deal_II_dimension> &,
                                      std::ostream &) const;
 
@@ -72,13 +67,18 @@ for (deal_II_dimension : DIMENSIONS)
 
 for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
   {
-#if deal_II_dimension < deal_II_space_dimension
-
-#  if deal_II_dimension != 2
+#if deal_II_dimension <= deal_II_space_dimension
+    // Instantiate write_svg exception for the <2,2> case for which there
+    // is an overload that takes care of that case.
+#  if !(deal_II_dimension == 2 && deal_II_space_dimension == 2)
     template void GridOut::write_svg(
       const Triangulation<deal_II_dimension, deal_II_space_dimension> &,
       std::ostream &) const;
 #  endif
+#endif
+
+
+#if deal_II_dimension < deal_II_space_dimension
 
     template void GridOut::write_msh(
       const Triangulation<deal_II_dimension, deal_II_space_dimension> &,

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.