]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Patch by Lukas Korous: Work around a couple of problems with Microsoft Visual Studio...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 3 Dec 2014 13:13:26 +0000 (07:13 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 3 Dec 2014 13:13:26 +0000 (07:13 -0600)
include/deal.II/grid/grid_generator.h
source/grid/grid_generator.cc
source/grid/grid_generator.inst.in

index 490e390b746fad8f6652498f31f6000f9d265773..dcb647d9811df5475383141993175cb61e0d225a 100644 (file)
@@ -279,7 +279,11 @@ namespace GridGenerator
   template <int dim>
   void
   subdivided_parallelepiped (Triangulation<dim>  &tria,
-                             const unsigned int  (n_subdivisions) [dim],
+#ifndef _MSC_VER
+                             const unsigned int(&n_subdivisions)[dim],
+#else
+                             const unsigned int *n_subdivisions,
+#endif
                              const Point<dim>   (&corners) [dim],
                              const bool           colorize = false);
 
index b38a38a5652974320c6b0c0032eba6c9e12a9c56..147d5d6357523eef1dcbd3c6892a9ddf284b1c73 100644 (file)
@@ -775,9 +775,9 @@ namespace GridGenerator
                              const Point<dim>   (&corners) [dim],
                              const bool           colorize)
   {
-    // Equalise number of subdivisions in each dim-direction, heir
+    // Equalise number of subdivisions in each dim-direction, their
     // validity will be checked later
-    unsigned int (n_subdivisions_) [dim];
+    unsigned int n_subdivisions_ [dim];
     for (unsigned int i=0; i<dim; ++i)
       n_subdivisions_[i] = n_subdivisions;
 
@@ -790,7 +790,11 @@ namespace GridGenerator
   template<int dim>
   void
   subdivided_parallelepiped (Triangulation<dim>  &tria,
-                             const unsigned int    ( n_subdivisions) [dim],
+#ifndef _MSC_VER
+                             const unsigned int(&n_subdivisions)[dim],
+#else
+                             const unsigned int *n_subdivisions,
+#endif
                              const Point<dim>   (&corners) [dim],
                              const bool           colorize)
   {
index 74f78a621d69ee094d350b9bad11b1696ad142fc..c74fb017ea700b31fdf069f4f181304cb927650f 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1999 - 2013 by the deal.II authors
+// Copyright (C) 1999 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -111,12 +111,21 @@ namespace GridGenerator \{
        const Point<deal_II_dimension> (&) [deal_II_dimension], 
        const bool);  
 
+  #ifndef _MSC_VER
     template void
       subdivided_parallelepiped<deal_II_dimension> (
        Triangulation<deal_II_dimension>&,
-       const unsigned int [deal_II_dimension], 
+       const unsigned int (&) [deal_II_dimension], 
        const Point<deal_II_dimension> (&) [deal_II_dimension], 
-       const bool);  
+       const bool);
+  #else
+  template void
+      subdivided_parallelepiped<deal_II_dimension> (
+       Triangulation<deal_II_dimension>&,
+       const unsigned int*, 
+       const Point<deal_II_dimension> (&) [deal_II_dimension], 
+       const bool);
+  #endif
   
 #if deal_II_dimension > 1
   template void

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.