diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index 1f569b48356b0d209a7bf89aba14c3652edf26c9..92937712b2a7c2613972ddfa321970721e6e8c76 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -123,8 +123,9 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
       localb = <b - Au, v>
     */
 
-    MyDirectionalConvexFunction<Dune::GlobalNonlinearity<block_size>> const psi(
-        localA, localb, problem.phi, u, v);
+    MyDirectionalConvexFunction<
+        Dune::GlobalNonlinearity<block_size, VectorType, MatrixType>> const
+    psi(localA, localb, problem.phi, u, v);
 
     Interval<double> D;
     psi.subDiff(0, D);
@@ -197,7 +198,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
       linearization.A.mv(direction, tmp);    //  Av
       double const localb = tmp * direction; // <Av,v>
 
-      MyDirectionalConvexFunction<Dune::GlobalNonlinearity<block_size>> const
+      MyDirectionalConvexFunction<
+          Dune::GlobalNonlinearity<block_size, VectorType, MatrixType>> const
       psi(localA, localb, problem.phi, u, direction);
 
       Interval<double> D;
diff --git a/dune/tectonic/myconvexproblem.hh b/dune/tectonic/myconvexproblem.hh
index c2142dace0cc592df4ca1267c5ec7c6c91bda933..48b45d723ca3bfd7278a54bb8879a2e8e38ee6f7 100644
--- a/dune/tectonic/myconvexproblem.hh
+++ b/dune/tectonic/myconvexproblem.hh
@@ -21,13 +21,14 @@ class MyConvexProblem {
       \param f The linear functional
       \param u The solution vector
   */
-  MyConvexProblem(MatrixType const &A,
-                  Dune::GlobalNonlinearity<block_size> const &phi,
-                  VectorType const &f)
+  MyConvexProblem(
+      MatrixType const &A,
+      Dune::GlobalNonlinearity<block_size, VectorType, MatrixType> const &phi,
+      VectorType const &f)
       : A(A), phi(phi), f(f) {};
 
   MatrixType const &A;
-  Dune::GlobalNonlinearity<block_size> const &phi;
+  Dune::GlobalNonlinearity<block_size, VectorType, MatrixType> const &phi;
 
   VectorType const &f;
 };
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 18705856c822ddf74b2b10b8415c42660d971e31..e0f44bf86e64b492c25269d1e675416f9b61f95f 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -136,9 +136,11 @@ void assemble_frictional(
       true); // whether to resize the output vector and zero all of its entries
 }
 
+template <class VectorType, class MatrixType>
 void assemble_nonlinearity(
     int size, Dune::ParameterTree const &parset,
-    Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const> &myGlobalNonlinearity,
+    Dune::shared_ptr<Dune::GlobalNonlinearity<
+        dim, VectorType, MatrixType> const> &myGlobalNonlinearity,
     Dune::shared_ptr<Dune::BlockVector<Dune::FieldVector<double, 1>>>
         nodalIntegrals) {
   typedef Dune::BlockVector<Dune::FieldVector<double, 1>> SingletonVectorType;
@@ -159,13 +161,14 @@ void assemble_nonlinearity(
     auto eta = Dune::make_shared<SingletonVectorType>(size);
     *eta = parset.get<double>("boundary.friction.eta");
 
-    myGlobalNonlinearity =
-        Dune::make_shared<Dune::GlobalRuinaNonlinearity<dim> const>(
-            nodalIntegrals, a, mu, eta, normalStress);
+    myGlobalNonlinearity = Dune::make_shared<
+        Dune::GlobalRuinaNonlinearity<dim, VectorType, MatrixType> const>(
+        nodalIntegrals, a, mu, eta, normalStress);
   } else if (friction_model == std::string("Laursen")) {
     myGlobalNonlinearity = Dune::make_shared<
-        Dune::GlobalLaursenNonlinearity<dim, Dune::LinearFunction> const>(
-        mu, normalStress, nodalIntegrals);
+        Dune::GlobalLaursenNonlinearity<dim, Dune::LinearFunction, VectorType,
+                                        MatrixType> const>(mu, normalStress,
+                                                           nodalIntegrals);
   } else {
     assert(false);
   }
@@ -266,9 +269,11 @@ int main(int argc, char *argv[]) {
     assemble_frictional<GridType, GridView, SmallVector, P1Basis>(
         leafView, p1Basis, frictionalNodes, *nodalIntegrals);
 
-    Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const> myGlobalNonlinearity;
-    assemble_nonlinearity(grid.size(grid.maxLevel(), dim), parset,
-                          myGlobalNonlinearity, nodalIntegrals);
+    Dune::shared_ptr<Dune::GlobalNonlinearity<
+        dim, VectorType, OperatorType> const> myGlobalNonlinearity;
+    assemble_nonlinearity<VectorType, OperatorType>(
+        grid.size(grid.maxLevel(), dim), parset, myGlobalNonlinearity,
+        nodalIntegrals);
 
     // {{{ Set up TNNMG solver
     // linear iteration step components