From 745023a8ac20e218207fd4a31344983e127dc1b3 Mon Sep 17 00:00:00 2001
From: podlesny <podlesny@zedat.fu-berlin.de>
Date: Thu, 21 Jan 2021 11:43:39 +0100
Subject: [PATCH] switch to multi threading

---
 dune/tectonic/time-stepping/adaptivetimestepper.cc | 10 +++++-----
 src/strikeslip/strikeslip-2D.cfg                   |  4 ++--
 src/strikeslip/strikeslip.cfg                      |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dune/tectonic/time-stepping/adaptivetimestepper.cc b/dune/tectonic/time-stepping/adaptivetimestepper.cc
index 4514cade..7fa35eea 100644
--- a/dune/tectonic/time-stepping/adaptivetimestepper.cc
+++ b/dune/tectonic/time-stepping/adaptivetimestepper.cc
@@ -78,7 +78,7 @@ int AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNorms>::coarsen(
 
       setDeformation(current_);
       auto C_Step = Step(stepBase_, current_, currentNBodyAssembler, relativeTime_, 2 * relativeTau_, iterationRegister_);
-      C_Step.run(Step::Mode::sameThread); //newThread
+      C_Step.run(Step::Mode::newThread); //newThread
 
       //updateReductionFactors(reductionFactors);
       //std::cout << "AdaptiveTimeStepper C computed!" << std::endl << std::endl;
@@ -92,7 +92,7 @@ int AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNorms>::coarsen(
       //auto R2_linearSolver = makeLinearSolver();
       auto&& nBodyAssembler = step(currentNBodyAssembler);
       auto R2_Step = Step(stepBase_, R1_.updaters, nBodyAssembler, relativeTime_ + relativeTau_, relativeTau_, iterationRegister_);
-      R2_Step.run(Step::Mode::sameThread); //newThread
+      R2_Step.run(Step::Mode::newThread); //newThread
 
       //updateReductionFactors(reductionFactors);
       //std::cout << "AdaptiveTimeStepper R2 computed!" << std::endl << std::endl;
@@ -195,7 +195,7 @@ int AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNorms>::determin
     setDeformation(current_);
     //auto C_linearSolver = makeLinearSolver();
     auto C_Step = Step(stepBase_, current_, currentNBodyAssembler, relativeTime_, 2 * relativeTau_, iterationRegister_);
-    C_Step.run(Step::Mode::sameThread); // newThread
+    C_Step.run(Step::Mode::newThread); // newThread
     //updateReductionFactors(reductionFactors);
     //std::cout << "AdaptiveTimeStepper C computed!" << std::endl << std::endl;
 
@@ -203,7 +203,7 @@ int AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNorms>::determin
     //auto R2_linearSolver = makeLinearSolver();
     auto&& nBodyAssembler = step(currentNBodyAssembler);
     auto R2_Step = Step(stepBase_, R1_.updaters, nBodyAssembler, relativeTime_ + relativeTau_, relativeTau_, iterationRegister_);
-    R2_Step.run(Step::Mode::sameThread); //newThread
+    R2_Step.run(Step::Mode::newThread); //newThread
 
     //updateReductionFactors(reductionFactors);
     //std::cout << "AdaptiveTimeStepper R2 computed!" << std::endl << std::endl;
@@ -221,7 +221,7 @@ int AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNorms>::determin
         setDeformation(current_);
         //auto F1_linearSolver = makeLinearSolver();
         auto F1_Step = Step(stepBase_, current_, currentNBodyAssembler, relativeTime_, relativeTau_ / 2.0, iterationRegister_);
-        F1_Step.run(Step::Mode::sameThread); //newThread
+        F1_Step.run(Step::Mode::newThread); //newThread
         //updateReductionFactors(reductionFactors);
         //std::cout << "AdaptiveTimeStepper F1 computed!" << std::endl << std::endl;
 
diff --git a/src/strikeslip/strikeslip-2D.cfg b/src/strikeslip/strikeslip-2D.cfg
index 26eb8519..9fd7ce5c 100644
--- a/src/strikeslip/strikeslip-2D.cfg
+++ b/src/strikeslip/strikeslip-2D.cfg
@@ -6,7 +6,7 @@ smallestDiameter = 0.02 # 2e-3 [m]
 smallestDiameter = 0.02  # 2e-3 [m]
 
 [timeSteps]
-refinementTolerance = 1e-5 # 1e-5
+refinementTolerance = 1e-3# 1e-5
 
 [u0.solver]
 tolerance         = 1e-8
@@ -18,7 +18,7 @@ tolerance         = 1e-8
 tolerance         = 1e-8
 
 [v.fpi]
-tolerance         = 1e-5    # 1e-5
+tolerance         = 1e-3    # 1e-5
 
 [solver.tnnmg.preconditioner.basesolver]
 tolerance          = 1e-10
diff --git a/src/strikeslip/strikeslip.cfg b/src/strikeslip/strikeslip.cfg
index 25e4d47c..1aae1ac3 100644
--- a/src/strikeslip/strikeslip.cfg
+++ b/src/strikeslip/strikeslip.cfg
@@ -69,11 +69,11 @@ bodyCount       = 2
 [initialTime]
 timeStep = 0
 relativeTime = 0.0
-relativeTau = 2e-4 # 1e-6
+relativeTau = 2e-2 # 1e-6
 
 [timeSteps]
 scheme = newmark
-timeSteps = 5000
+timeSteps = 5
 
 [u0.solver]
 maximumIterations = 100
-- 
GitLab