]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard SUNDIALS variables more carefully 12084/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 22 Apr 2021 20:16:05 +0000 (16:16 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 22 Apr 2021 20:16:25 +0000 (16:16 -0400)
include/deal.II/sundials/sundials_backport.h

index 218d7c6f7ff8b7187bdb9e90f1c6be2e748ffcb8..3f6b01c68e67be66414514242baad692a1c9a4a2 100644 (file)
@@ -105,14 +105,18 @@ namespace SUNDIALS
       ops->nvwsqrsumlocal     = nullptr;
       ops->nvwsqrsummasklocal = nullptr;
 
+#    if DEAL_II_SUNDIALS_VERSION_GTE(5, 4, 0)
       /* XBraid interface operations */
       ops->nvbufsize   = nullptr;
       ops->nvbufpack   = nullptr;
       ops->nvbufunpack = nullptr;
+#    endif
 
+#    if DEAL_II_SUNDIALS_VERSION_GTE(5, 3, 0)
       /* debugging functions (called when SUNDIALS_DEBUG_PRINTVEC is defined) */
       ops->nvprint     = nullptr;
       ops->nvprintfile = nullptr;
+#    endif
 #  endif
 
       /* attach ops and initialize content to nullptr */
@@ -213,14 +217,18 @@ namespace SUNDIALS
       v->ops->nvwsqrsumlocal     = w->ops->nvwsqrsumlocal;
       v->ops->nvwsqrsummasklocal = w->ops->nvwsqrsummasklocal;
 
+#    if DEAL_II_SUNDIALS_VERSION_GTE(5, 4, 0)
       /* XBraid interface operations */
       v->ops->nvbufsize   = w->ops->nvbufsize;
       v->ops->nvbufpack   = w->ops->nvbufpack;
       v->ops->nvbufunpack = w->ops->nvbufunpack;
+#    endif
 
+#    if DEAL_II_SUNDIALS_VERSION_GTE(5, 3, 0)
       /* debugging functions (called when SUNDIALS_DEBUG_PRINTVEC is defined) */
       v->ops->nvprint     = w->ops->nvprint;
       v->ops->nvprintfile = w->ops->nvprintfile;
+#    endif
 #  endif
 
       return (0);

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.