From f19e58097eff63d9245cf078a4e7bbe2e8dfe87b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maximilian=20H=C3=B6rl?=
 <maximilian.hoerl@mathematik.uni-stuttgart.de>
Date: Wed, 8 Apr 2020 23:48:52 +0200
Subject: [PATCH] use solver Cholmod instead of UMFPack

---
 dune/mmdg/dg.hh                    | 5 +++--
 dune/mmdg/mmdg.hh                  | 3 ++-
 dune/mmdg/problems/mmdgproblem3.hh | 7 ++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dune/mmdg/dg.hh b/dune/mmdg/dg.hh
index 8b277d9..c842b35 100644
--- a/dune/mmdg/dg.hh
+++ b/dune/mmdg/dg.hh
@@ -13,7 +13,7 @@
 
 #include <dune/istl/bcrsmatrix.hh>
 #include <dune/istl/solver.hh>
-#include <dune/istl/umfpack.hh>
+#include <dune/istl/cholmod.hh>
 
 #include <dune/mmdg/nonconformingp1vtkfunction.hh>
 #include <dune/mmdg/eigenvaluehelper.hh>
@@ -57,7 +57,8 @@ public:
     A->compress();
 
     Dune::InverseOperatorResult result;
-    Dune::UMFPack<Matrix> solver(*A);
+    Dune::Cholmod<Vector> solver;
+    solver.setMatrix(*A);
     solver.apply(d, b, result);
 
     //write solution to a vtk file
diff --git a/dune/mmdg/mmdg.hh b/dune/mmdg/mmdg.hh
index 3511adf..a83541d 100644
--- a/dune/mmdg/mmdg.hh
+++ b/dune/mmdg/mmdg.hh
@@ -41,7 +41,8 @@ public:
     Base::A->compress();
 
     Dune::InverseOperatorResult result;
-    Dune::UMFPack<Matrix> solver(*Base::A); //TODO: ilu0bicgSTAB, cg (ilo0, ssor), gmres
+    Dune::Cholmod<Vector> solver;
+    solver.setMatrix(*Base::A);
     solver.apply(Base::d, Base::b, result);
 
     //write solution to a vtk file
diff --git a/dune/mmdg/problems/mmdgproblem3.hh b/dune/mmdg/problems/mmdgproblem3.hh
index d3f284c..cf7f896 100644
--- a/dune/mmdg/problems/mmdgproblem3.hh
+++ b/dune/mmdg/problems/mmdgproblem3.hh
@@ -20,7 +20,7 @@ public:
   //the exact bulk solution at position pos
   Scalar exactSolution (const Coordinate& pos) const
   {
-    Scalar xPlusy = pos[0] + pos[1];// pos * Coordinate(1.0);
+    Scalar xPlusy = pos[0] + pos[1];
     Scalar solution = std::exp(xPlusy);
     return (xPlusy < 1.0) ? solution :
       0.5 * solution + std::exp(1.0) * (0.5 + 1.5 / sqrt(2.0) * d_);
@@ -41,7 +41,7 @@ public:
   //bulk source term at position pos
   Scalar q (const Coordinate& pos) const
   {
-    Scalar xPlusy = pos[0] + pos[1]; //pos * Coordinate(1.0);
+    Scalar xPlusy = pos[0] + pos[1];
     Scalar source = -std::exp(xPlusy);
     return (xPlusy < 1.0) ? 2.0 * source : source;
   }
@@ -59,7 +59,8 @@ public:
     return d_;
   }
 
-  //permeability per aperture of the fracture in normal direction at position pos
+  //permeability per aperture of the fracture in normal direction
+  //at position pos
   Scalar Kperp (const Coordinate& pos) const
   {
     return 1.0 / d_;
-- 
GitLab