]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Adjust p4est interface. 749/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Apr 2015 12:09:32 +0000 (07:09 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Apr 2015 12:11:12 +0000 (07:11 -0500)
The p4est_connectivity_load function used to take an unsigned long as argument,
but this has been changed to size_t in p4est 1.0. This makes no difference on
64 bit systems, but leads to compiler errors on 32 bit systems. Fix this.

doc/news/changes.h
source/distributed/tria.cc

index 6cc62c39aaa857ea2800587200e6e00c1aab1517..88acfbe755ff3fee68aaf1504cabefdda8c3afd1 100644 (file)
@@ -410,6 +410,12 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Fixed: deal.II did not compile on 32-bit systems when using newer
+  p4est versions (1.0 and later) due to a type mismatch. This is now fixed.
+  <br>
+  (Wolfgang Bangerth, 2015/04/08)
+  <li>
+
   <li> Changed: In the spirit of the changes made to the distinction
   between Point and Tensor objects discussed above, the first argument
   to GridTools::shift() has been changed from a Point to a Tensor@<1,dim@>.
index 32d0d9d4a368f1e1e2c946a3357e9ec707a4896a..f56143f2f25535837a4474d432ebca0004156a24 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2008 - 2014 by the deal.II authors
+// Copyright (C) 2008 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -204,7 +204,11 @@ namespace internal
       static
       int (&connectivity_is_valid) (types<2>::connectivity *connectivity);
 
-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
+      static
+      types<2>::connectivity *(&connectivity_load) (const char *filename,
+                                                    size_t *length);
+#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
       static
       types<2>::connectivity *(&connectivity_load) (const char *filename,
                                                     long unsigned *length);
@@ -384,7 +388,12 @@ namespace internal
                                                 *connectivity)
       = p4est_connectivity_is_valid;
 
-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
+    types<2>::connectivity *
+    (&functions<2>::connectivity_load) (const char *filename,
+                                        size_t *length)
+      = p4est_connectivity_load;
+#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
     types<2>::connectivity *
     (&functions<2>::connectivity_load) (const char *filename,
                                         long unsigned *length)
@@ -564,7 +573,11 @@ namespace internal
       static
       int (&connectivity_is_valid) (types<3>::connectivity *connectivity);
 
-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
+      static
+      types<3>::connectivity *(&connectivity_load) (const char *filename,
+                                                    size_t *length);
+#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
       static
       types<3>::connectivity *(&connectivity_load) (const char *filename,
                                                     long unsigned *length);
@@ -747,7 +760,12 @@ namespace internal
                                                 *connectivity)
       = p8est_connectivity_is_valid;
 
-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
+    types<3>::connectivity *
+    (&functions<3>::connectivity_load) (const char *filename,
+                                        size_t *length)
+      = p8est_connectivity_load;
+#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
     types<3>::connectivity *
     (&functions<3>::connectivity_load) (const char *filename,
                                         long unsigned *length)

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.