summarylogtreecommitdiffstats
path: root/d6891c9.patch
blob: 00a8e3da2ced97e66df350e98f199fc3a1e1f39e (plain)
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
From d6891c90f49d809cc3150d1b6e36c9d74df8f664 Mon Sep 17 00:00:00 2001
From: Christophe Prud'homme <christophe.prudhomme@feelpp.org>
Date: Fri, 6 Oct 2017 08:28:49 +0200
Subject: [PATCH] petsc 3.8 seems to work fine with feel++ fixes #1068

---
 feel/feelalg/preconditionerpetsc.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/feel/feelalg/preconditionerpetsc.cpp b/feel/feelalg/preconditionerpetsc.cpp
index f9d5287b7f..0ad7bf4f36 100644
--- a/feel/feelalg/preconditionerpetsc.cpp
+++ b/feel/feelalg/preconditionerpetsc.cpp
@@ -2954,8 +2954,12 @@ ConfigurePCGAMG::run( PC& pc )
         this->check( PCGAMGSetProcEqLim( pc, M_procEqLim ) );
         // Set max number of equations on coarse grids
         this->check( PCGAMGSetCoarseEqLim( pc, M_coarseEqLim ) );
+#if PETSC_VERSION_GREATER_OR_EQUAL_THAN( 3,8,0 )
+        this->check( PCGAMGSetThresholdScale( pc, M_threshold ) );
+#else
         // Relative threshold to use for dropping edges in aggregation graph
         this->check( PCGAMGSetThreshold( pc, M_threshold ) );
+#endif
         // not works!!(seems to be missing PetscObjectComposeFunction with this function)
         //this->check( PCGAMGSetSymGraph( pc, ( M_setSymGraph )?PETSC_TRUE : PETSC_FALSE ) );
         // Reuse prolongation operator