Package: dolfin / 2018.1.0.post1-16

PETSc_3.10_SNESTEST_removed.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: dolfin/dolfin/la/PETScOptions.h
===================================================================
--- dolfin.orig/dolfin/la/PETScOptions.h
+++ dolfin/dolfin/la/PETScOptions.h
@@ -22,7 +22,7 @@
 
 #include <string>
 #include <boost/lexical_cast.hpp>
-#include <petscoptions.h>
+#include <petscsys.h>
 #include <dolfin/common/SubSystemsManager.h>
 #include <dolfin/log/log.h>
 #include "PETScObject.h"
Index: dolfin/dolfin/la/PETScVector.cpp
===================================================================
--- dolfin.orig/dolfin/la/PETScVector.cpp
+++ dolfin/dolfin/la/PETScVector.cpp
@@ -749,7 +749,11 @@ void PETScVector::gather(GenericVector&
 
   // Perform scatter
   VecScatter scatter;
+#if PETSC_VERSION_GE(3,11,0)
+  ierr = VecScatterCreateWithData(_x, from, _y.vec(), to, &scatter);
+#else
   ierr = VecScatterCreate(_x, from, _y.vec(), to, &scatter);
+#endif
   CHECK_ERROR("VecScatterCreate");
   ierr = VecScatterBegin(scatter, _x, _y.vec(), INSERT_VALUES,
                          SCATTER_FORWARD);
Index: dolfin/dolfin/nls/PETScSNESSolver.cpp
===================================================================
--- dolfin.orig/dolfin/nls/PETScSNESSolver.cpp
+++ dolfin/dolfin/nls/PETScSNESSolver.cpp
@@ -48,7 +48,9 @@ PETScSNESSolver::_methods
 = { {"default",      {"default SNES method", ""}},
     {"newtonls",     {"Line search method", SNESNEWTONLS}},
     {"newtontr",     {"Trust region method", SNESNEWTONTR}},
+#if PETSC_VERSION_LT(3,10,0)
     {"test",         {"Tool to verify Jacobian approximation", SNESTEST}},
+#endif
     {"ngmres",       {"Nonlinear generalised minimum residual method",
                       SNESNGMRES}},
     {"nrichardson",  {"Richardson nonlinear method (Picard iteration)",