From 4d2707410f8275f93f1b2650dfcac16840623012 Mon Sep 17 00:00:00 2001
From: podlesny <podlesny@zedat.fu-berlin.de>
Date: Fri, 26 Feb 2021 22:09:22 +0100
Subject: [PATCH] allow use of ZeroNonlinearity for debugging purposes

---
 .../spatial-solving/fixedpointiterator_tmpl.cc         | 10 +++++++++-
 .../tectonic/spatial-solving/tnnmg/zerononlinearity.hh |  3 +++
 dune/tectonic/time-stepping/coupledtimestepper_tmpl.cc |  9 ++++++++-
 dune/tectonic/time-stepping/uniformtimestepper_tmpl.cc |  8 ++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/dune/tectonic/spatial-solving/fixedpointiterator_tmpl.cc b/dune/tectonic/spatial-solving/fixedpointiterator_tmpl.cc
index c434a9b2..5e66f407 100644
--- a/dune/tectonic/spatial-solving/fixedpointiterator_tmpl.cc
+++ b/dune/tectonic/spatial-solving/fixedpointiterator_tmpl.cc
@@ -9,6 +9,7 @@
 #include <dune/solvers/solvers/loopsolver.hh>
 
 #include "../spatial-solving/solverfactory.hh"
+#include "../spatial-solving/tnnmg/zerononlinearity.hh"
 #include "../data-structures/network/contactnetwork.hh"
 #include "../data-structures/friction/globalfriction.hh"
 
@@ -36,6 +37,13 @@ using MyFunctional = Functional<Matrix&, Vector&, MyGlobalFriction&, Vector&, Ve
 using MySolverFactory = SolverFactory<MyFunctional, BitVector>;
 
 template class FixedPointIterator<MySolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>;
-
 template FixedPointIterationCounter FixedPointIterator<MySolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>::run<LinearSolver>(
     MyUpdaters, std::shared_ptr<LinearSolver>&, const std::vector<Matrix>&, const std::vector<Vector>&, std::vector<Vector>&);
+
+using NoFriction = ZeroNonlinearity;
+using NoFrictionFunctional = Functional<Matrix&, Vector&, NoFriction&, Vector&, Vector&, double>;
+using NoFrictionSolverFactory = SolverFactory<NoFrictionFunctional, BitVector>;
+
+template class FixedPointIterator<NoFrictionSolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>;
+template FixedPointIterationCounter FixedPointIterator<NoFrictionSolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>::run<LinearSolver>(
+    MyUpdaters, std::shared_ptr<LinearSolver>&, const std::vector<Matrix>&, const std::vector<Vector>&, std::vector<Vector>&);
diff --git a/dune/tectonic/spatial-solving/tnnmg/zerononlinearity.hh b/dune/tectonic/spatial-solving/tnnmg/zerononlinearity.hh
index 2ea3e459..2c3f11fa 100644
--- a/dune/tectonic/spatial-solving/tnnmg/zerononlinearity.hh
+++ b/dune/tectonic/spatial-solving/tnnmg/zerononlinearity.hh
@@ -71,6 +71,9 @@ class ZeroNonlinearity
 
     template <class BitVector>
     void setIgnore(const BitVector& ignore) {}
+
+    template <class StateVector>
+    void updateAlpha(const StateVector& alpha) {}
 };
 
 #endif
diff --git a/dune/tectonic/time-stepping/coupledtimestepper_tmpl.cc b/dune/tectonic/time-stepping/coupledtimestepper_tmpl.cc
index a2b7fc84..8fa4e7fb 100644
--- a/dune/tectonic/time-stepping/coupledtimestepper_tmpl.cc
+++ b/dune/tectonic/time-stepping/coupledtimestepper_tmpl.cc
@@ -10,6 +10,7 @@
 
 #include "../spatial-solving/tnnmg/functional.hh"
 #include "../spatial-solving/solverfactory.hh"
+#include "../spatial-solving/tnnmg/zerononlinearity.hh"
 
 #include "../data-structures/network/contactnetwork.hh"
 #include "../data-structures/friction/globalfriction.hh"
@@ -36,5 +37,11 @@ using MyFunctional = Functional<Matrix&, Vector&, MyGlobalFriction&, Vector&, Ve
 using MySolverFactory = SolverFactory<MyFunctional, BitVector>;
 
 template class CoupledTimeStepper<MySolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>;
-
 template FixedPointIterationCounter CoupledTimeStepper<MySolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>::step<LinearSolver>(std::shared_ptr<LinearSolver>&, double, double);
+
+using NoFriction = ZeroNonlinearity;
+using NoFrictionFunctional = Functional<Matrix&, Vector&, NoFriction&, Vector&, Vector&, double>;
+using NoFrictionSolverFactory = SolverFactory<NoFrictionFunctional, BitVector>;
+
+template class CoupledTimeStepper<NoFrictionSolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>;
+template FixedPointIterationCounter CoupledTimeStepper<NoFrictionSolverFactory, MyNBodyAssembler, MyUpdaters, ErrorNorms>::step<LinearSolver>(std::shared_ptr<LinearSolver>&, double, double);
diff --git a/dune/tectonic/time-stepping/uniformtimestepper_tmpl.cc b/dune/tectonic/time-stepping/uniformtimestepper_tmpl.cc
index fd863d18..94d258b4 100644
--- a/dune/tectonic/time-stepping/uniformtimestepper_tmpl.cc
+++ b/dune/tectonic/time-stepping/uniformtimestepper_tmpl.cc
@@ -16,6 +16,7 @@
 
 #include "../data-structures/network/contactnetwork.hh"
 #include "../data-structures/friction/globalfriction.hh"
+#include "../spatial-solving/tnnmg/zerononlinearity.hh"
 
 #include "rate/rateupdater.hh"
 #include "state/stateupdater.hh"
@@ -40,6 +41,13 @@ using MySolverFactory = SolverFactory<MyFunctional, BitVector>;
 
 template class UniformTimeStepper<MySolverFactory, MyContactNetwork, MyUpdaters, ErrorNorms>;
 
+
+using NoFriction = ZeroNonlinearity;
+using NoFrictionFunctional = Functional<Matrix&, Vector&, NoFriction&, Vector&, Vector&, double>;
+using NoFrictionSolverFactory = SolverFactory<NoFrictionFunctional, BitVector>;
+
+template class UniformTimeStepper<NoFrictionSolverFactory, MyContactNetwork, MyUpdaters, ErrorNorms>;
+
 /*
 template std::packaged_task<typename AdaptiveTimeStepper<MySolverFactory, MyContactNetwork, MyUpdaters, ErrorNorms>::UpdatersWithCount()>
 AdaptiveTimeStepper<MySolverFactory, MyContactNetwork, MyUpdaters, ErrorNorms>::step<LinearSolver>(
-- 
GitLab