diff --git a/dune/tectonic/body.hh b/dune/tectonic/body.hh
index f98d50685822aa209f8256404efb7e5b48c7aabc..2c2ed7214d673c3f91b1448463834634b111ffb9 100644
--- a/dune/tectonic/body.hh
+++ b/dune/tectonic/body.hh
@@ -2,8 +2,9 @@
 #define DUNE_TECTONIC_BODY_HH
 
 template <int dimension> struct Body {
-  using ScalarFunction = Dune::VirtualFunction<
-      Dune::FieldVector<double, dimension>, Dune::FieldVector<double, 1>>;
+  using ScalarFunction =
+      Dune::VirtualFunction<Dune::FieldVector<double, dimension>,
+                            Dune::FieldVector<double, 1>>;
   using VectorField =
       Dune::VirtualFunction<Dune::FieldVector<double, dimension>,
                             Dune::FieldVector<double, dimension>>;
diff --git a/dune/tectonic/globalfriction.hh b/dune/tectonic/globalfriction.hh
index 3aff30217892e26b551c2abade26ecabcbd1b89b..db9cec0eabb9a89015c49a11db8319efbfefe7e9 100644
--- a/dune/tectonic/globalfriction.hh
+++ b/dune/tectonic/globalfriction.hh
@@ -36,8 +36,8 @@ template <class Matrix, class Vector> class GlobalFriction {
   /*
     Return a restriction of the outer function to the i'th node.
   */
-  std::shared_ptr<LocalFriction<block_size>> virtual restriction(size_t i)
-      const = 0;
+  std::shared_ptr<LocalFriction<block_size>> virtual restriction(
+      size_t i) const = 0;
 
   void addHessian(Vector const &v, Matrix &hessian) const {
     for (size_t i = 0; i < v.size(); ++i) {
@@ -52,9 +52,9 @@ template <class Matrix, class Vector> class GlobalFriction {
     dom[1] = std::numeric_limits<double>::max();
   }
 
-  void directionalSubDiff(Vector const &u, Vector const &v,
-                          Dune::Solvers::Interval<double> &subdifferential)
-      const {
+  void directionalSubDiff(
+      Vector const &u, Vector const &v,
+      Dune::Solvers::Interval<double> &subdifferential) const {
     subdifferential[0] = subdifferential[1] = 0;
     for (size_t i = 0; i < u.size(); ++i) {
       Dune::Solvers::Interval<double> D;
diff --git a/dune/tectonic/globalfrictiondata.hh b/dune/tectonic/globalfrictiondata.hh
index 4482e8f601f5e30e253b90b6b692b66a7c8b9400..f3851f99f474141c695623f79003d221acb52eb9 100644
--- a/dune/tectonic/globalfrictiondata.hh
+++ b/dune/tectonic/globalfrictiondata.hh
@@ -23,8 +23,9 @@ template <int dimension> class GlobalFrictionData {
   }
 
 protected:
-  using VirtualFunction = Dune::VirtualFunction<
-      Dune::FieldVector<double, dimension>, Dune::FieldVector<double, 1>>;
+  using VirtualFunction =
+      Dune::VirtualFunction<Dune::FieldVector<double, dimension>,
+                            Dune::FieldVector<double, 1>>;
 
   double virtual const &C() const = 0;
   double virtual const &L() const = 0;
diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index 1b28db48c5941fde80c19d5004da8d0e9292cdfc..2091f0258e512402f9e50998986fccfcf2d3d607 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -105,8 +105,9 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
     v /= vnorm; // Rescale for numerical stability
 
     MyDirectionalConvexFunction<GlobalFriction<MatrixType, VectorType>> const
-    psi(computeDirectionalA(problem_.A, v),
-        computeDirectionalb(problem_.A, problem_.f, u, v), problem_.phi, u, v);
+        psi(computeDirectionalA(problem_.A, v),
+            computeDirectionalb(problem_.A, problem_.f, u, v), problem_.phi, u,
+            v);
 
     Dune::Solvers::Interval<double> D;
     psi.subDiff(0, D);
@@ -263,7 +264,7 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
           ui[j] = 0;
 
       QuadraticEnergy<typename ConvexProblem::NonlinearityType::Friction>
-      localJ(maxEigenvalues_[m], localb, problem.phi.restriction(m));
+          localJ(maxEigenvalues_[m], localb, problem.phi.restriction(m));
       minimise(localJ, ui, bisection_);
     }
   }
diff --git a/src/assemblers.cc b/src/assemblers.cc
index b2fea9b0d992a8239483ee6dc924c99a0251f72c..496c12a35e5b5c5fe296319a7b7e0421885a36aa 100644
--- a/src/assemblers.cc
+++ b/src/assemblers.cc
@@ -36,7 +36,7 @@ void MyAssembler<GridView, dimension>::assembleFrictionalBoundaryMass(
     ScalarMatrix &frictionalBoundaryMass) {
   BoundaryMassAssembler<Grid, BoundaryPatch<GridView>, LocalVertexBasis,
                         LocalVertexBasis, Dune::FieldMatrix<double, 1, 1>> const
-  frictionalBoundaryMassAssembler(frictionalBoundary);
+      frictionalBoundaryMassAssembler(frictionalBoundary);
   vertexAssembler.assembleOperator(frictionalBoundaryMassAssembler,
                                    frictionalBoundaryMass);
 }
@@ -52,7 +52,7 @@ void MyAssembler<GridView, dimension>::assembleMass(
   WeightedMassAssembler<Grid, LocalVertexBasis, LocalVertexBasis,
                         Dune::VirtualFunction<LocalVector, LocalScalarVector>,
                         Dune::ScaledIdentityMatrix<double, dimension>>
-  localWeightedMass(gridView.grid(), densityFunction, quadKey);
+      localWeightedMass(gridView.grid(), densityFunction, quadKey);
   vertexAssembler.assembleOperator(localWeightedMass, M);
 }
 
@@ -60,7 +60,7 @@ template <class GridView, int dimension>
 void MyAssembler<GridView, dimension>::assembleElasticity(double E, double nu,
                                                           Matrix &A) {
   StVenantKirchhoffAssembler<Grid, LocalVertexBasis, LocalVertexBasis> const
-  localStiffness(E, nu);
+      localStiffness(E, nu);
   vertexAssembler.assembleOperator(localStiffness, A);
 }
 
@@ -75,8 +75,8 @@ void MyAssembler<GridView, dimension>::assembleViscosity(
   VariableCoefficientViscosityAssembler<
       Grid, LocalVertexBasis, LocalVertexBasis,
       Dune::VirtualFunction<LocalVector, LocalScalarVector>> const
-  localViscosity(gridView.grid(), shearViscosity, bulkViscosity,
-                 shearViscosityKey, bulkViscosityKey);
+      localViscosity(gridView.grid(), shearViscosity, bulkViscosity,
+                     shearViscosityKey, bulkViscosityKey);
   vertexAssembler.assembleOperator(localViscosity, C);
 }
 
@@ -85,7 +85,7 @@ void MyAssembler<GridView, dimension>::assembleBodyForce(
     Dune::VirtualFunction<LocalVector, LocalVector> const &gravityField,
     Vector &f) {
   L2FunctionalAssembler<Grid, LocalVertexBasis, LocalVector>
-  gravityFunctionalAssembler(gravityField);
+      gravityFunctionalAssembler(gravityField);
   vertexAssembler.assembleFunctional(gravityFunctionalAssembler, f);
 }
 
@@ -135,9 +135,9 @@ auto MyAssembler<GridView, dimension>::assembleFrictionNonlinearity(
   ScalarVector weights;
   {
     ConstantFunction<LocalVector, typename ScalarVector::block_type> const
-    constantOneFunction(1);
+        constantOneFunction(1);
     NeumannBoundaryAssembler<Grid, typename ScalarVector::block_type>
-    frictionalBoundaryAssembler(constantOneFunction);
+        frictionalBoundaryAssembler(constantOneFunction);
     vertexAssembler.assembleBoundaryFunctional(frictionalBoundaryAssembler,
                                                weights, frictionalBoundary);
   }
diff --git a/src/coupledtimestepper.cc b/src/coupledtimestepper.cc
index 6df0982860b548efafb9ed75cd116a3e56dbdeb2..49d454e474d326d3a945ec578d82b973ddebabc3 100644
--- a/src/coupledtimestepper.cc
+++ b/src/coupledtimestepper.cc
@@ -44,7 +44,7 @@ CoupledTimeStepper<Factory, StateUpdater, VelocityUpdater, ErrorNorm>::step(
   velocityUpdater_->setup(ell, tau, newRelativeTime, velocityRHS,
                           velocityIterate, velocityMatrix);
   FixedPointIterator<Factory, StateUpdater, VelocityUpdater, ErrorNorm>
-  fixedPointIterator(factory_, parset_, globalFriction_, errorNorm_);
+      fixedPointIterator(factory_, parset_, globalFriction_, errorNorm_);
   auto const iterations =
       fixedPointIterator.run(stateUpdater_, velocityUpdater_, velocityMatrix,
                              velocityRHS, velocityIterate);
diff --git a/src/enumparser.cc b/src/enumparser.cc
index c081ec490f6cdf2a3f2091c18e334a4995fc81ee..e7d58c5035cbf9c12840d94de4e3fd4d83facfb8 100644
--- a/src/enumparser.cc
+++ b/src/enumparser.cc
@@ -18,8 +18,7 @@ operator>>(std::istream &lhs, Enum &e) {
 
   try {
     e = StringToEnum<Enum>::convert(s);
-  }
-  catch (typename Dune::Exception) {
+  } catch (typename Dune::Exception) {
     lhs.setstate(std::ios_base::failbit);
   }
   return lhs;
diff --git a/src/enums.hh b/src/enums.hh
index 5c04e4a41fc3ed756434e65cbcf81f309177d141..a6bf4ad0f89c0f606637a61d84e5c2fdbf74821a 100644
--- a/src/enums.hh
+++ b/src/enums.hh
@@ -2,18 +2,9 @@
 #define SRC_ENUMS_HH
 
 struct Config {
-  enum FrictionModel {
-    Truncated,
-    Regularised
-  };
-  enum stateModel {
-    AgeingLaw,
-    SlipLaw
-  };
-  enum scheme {
-    Newmark,
-    BackwardEuler
-  };
+  enum FrictionModel { Truncated, Regularised };
+  enum stateModel { AgeingLaw, SlipLaw };
+  enum scheme { Newmark, BackwardEuler };
 };
 
 #endif
diff --git a/src/sand-wedge-data/mygeometry.hh b/src/sand-wedge-data/mygeometry.hh
index de8318ef00053551d0461f4fa2197396aba3381a..b6eac051dc81f681be515a9f8ac519087e2bc93d 100644
--- a/src/sand-wedge-data/mygeometry.hh
+++ b/src/sand-wedge-data/mygeometry.hh
@@ -48,7 +48,7 @@ namespace reference {
 
   LocalVector2D const Z = createVector(zDistance * s, 0);
   LocalVector2D const Y =
-      createVector(zDistance * s, -zDistance * s / leftLeg * rightLeg);
+      createVector(zDistance * s, -zDistance *s / leftLeg * rightLeg);
   LocalVector2D const X = createVector(Y[0] - weakLen * std::cos(leftAngle),
                                        Y[1] + weakLen * std::sin(leftAngle));
 
diff --git a/src/sand-wedge-data/mygrid.cc b/src/sand-wedge-data/mygrid.cc
index aa4175cbe884959027020f51fbdc2445a606244d..d8703bf9700a237392b83dd5318bd205ffe6e640 100644
--- a/src/sand-wedge-data/mygrid.cc
+++ b/src/sand-wedge-data/mygrid.cc
@@ -42,7 +42,9 @@ void SimplexManager::addFromVerticesFFB(unsigned int U, unsigned int V,
 #endif
 }
 
-auto SimplexManager::getSimplices() -> SimplexList const &{ return simplices_; }
+auto SimplexManager::getSimplices() -> SimplexList const & {
+  return simplices_;
+}
 
 template <class Grid> GridConstructor<Grid>::GridConstructor() {
   auto const &A = MyGeometry::A;
@@ -131,11 +133,11 @@ bool MyFaces<GridView>::xyBoxed(Vector const &v1, Vector const &v2,
   auto const minmax0 = std::minmax(v1[0], v2[0]);
   auto const minmax1 = std::minmax(v1[1], v2[1]);
 
-  if (minmax0.first - 1e-14 * MyGeometry::lengthScale > x[0] or x[0] >
-      minmax0.second + 1e-14 * MyGeometry::lengthScale)
+  if (minmax0.first - 1e-14 * MyGeometry::lengthScale > x[0] or
+      x[0] > minmax0.second + 1e-14 * MyGeometry::lengthScale)
     return false;
-  if (minmax1.first - 1e-14 * MyGeometry::lengthScale > x[1] or x[1] >
-      minmax1.second + 1e-14 * MyGeometry::lengthScale)
+  if (minmax1.first - 1e-14 * MyGeometry::lengthScale > x[1] or
+      x[1] > minmax1.second + 1e-14 * MyGeometry::lengthScale)
     return false;
 
   return true;
diff --git a/src/sand-wedge-data/special_writer.hh b/src/sand-wedge-data/special_writer.hh
index e16e161309d7427522c5fca014c2070aef2d0e7a..efd476f476f63c7de49fd5ceeed00c54bf41925d 100644
--- a/src/sand-wedge-data/special_writer.hh
+++ b/src/sand-wedge-data/special_writer.hh
@@ -23,8 +23,8 @@ template <class GridView, int dimension> class SpecialWriter {
     writer_ << MyGeometry::verticalProjection(v) << " ";
   }
 
-  std::pair<ElementPointer, LocalVector> globalToLocal(LocalVector const &x)
-      const {
+  std::pair<ElementPointer, LocalVector> globalToLocal(
+      LocalVector const &x) const {
     auto const element = hsearch_.findEntity(x);
     return std::make_pair(element, element->geometry().local(x));
   }
diff --git a/src/sand-wedge.cc b/src/sand-wedge.cc
index 323e86d5dfe577f6d62be3878fe88b352cbe1add..a7e9ff717a4e35ae1cd9c797acc01f8eaa84f5ac 100644
--- a/src/sand-wedge.cc
+++ b/src/sand-wedge.cc
@@ -205,20 +205,21 @@ int main(int argc, char *argv[]) {
     myAssembler.assembleBodyForce(body.getGravityField(), gravityFunctional);
 
     // Problem formulation: right-hand side
-    std::function<void(double, Vector &)> computeExternalForces = [&](
-        double _relativeTime, Vector &_ell) {
-      myAssembler.assembleNeumann(neumannBoundary, _ell, neumannFunction,
-                                  _relativeTime);
-      _ell += gravityFunctional;
-    };
+    std::function<void(double, Vector &)> computeExternalForces =
+        [&](double _relativeTime, Vector &_ell) {
+          myAssembler.assembleNeumann(neumannBoundary, _ell, neumannFunction,
+                                      _relativeTime);
+          _ell += gravityFunctional;
+        };
     Vector ell0(leafVertexCount);
     computeExternalForces(0.0, ell0);
 
     // {{{ Initial conditions
-    using LinearFactory = SolverFactory<
-        dims, BlockNonlinearTNNMGProblem<ConvexProblem<
-                  ZeroNonlinearity<LocalVector, LocalMatrix>, Matrix>>,
-        Grid>;
+    using LinearFactory =
+        SolverFactory<dims,
+                      BlockNonlinearTNNMGProblem<ConvexProblem<
+                          ZeroNonlinearity<LocalVector, LocalMatrix>, Matrix>>,
+                      Grid>;
     ZeroNonlinearity<LocalVector, LocalMatrix> zeroNonlinearity;
 
     auto const solveLinearProblem = [&](
@@ -311,21 +312,21 @@ int main(int argc, char *argv[]) {
         vertexCoordinates, surfaceNodes, "horizontalSurface",
         MyGeometry::horizontalProjection);
 
-    auto const report = [&](Vector const &_u, Vector const &_v,
-                            ScalarVector const &_alpha) {
-      horizontalSurfaceWriter.writeKinetics(_u, _v);
-      verticalSurfaceWriter.writeKinetics(_u, _v);
+    auto const report =
+        [&](Vector const &_u, Vector const &_v, ScalarVector const &_alpha) {
+          horizontalSurfaceWriter.writeKinetics(_u, _v);
+          verticalSurfaceWriter.writeKinetics(_u, _v);
 
-      ScalarVector c;
-      myGlobalFriction->coefficientOfFriction(_v, c);
-      frictionWriter.writeKinetics(_u, _v);
-      frictionWriter.writeOther(c, _alpha);
-    };
+          ScalarVector c;
+          myGlobalFriction->coefficientOfFriction(_v, c);
+          frictionWriter.writeKinetics(_u, _v);
+          frictionWriter.writeOther(c, _alpha);
+        };
     report(u_initial, v_initial, alpha_initial);
 
     MyVTKWriter<typename MyAssembler::VertexBasis,
                 typename MyAssembler::CellBasis> const
-    vtkWriter(myAssembler.cellBasis, myAssembler.vertexBasis, "obs");
+        vtkWriter(myAssembler.cellBasis, myAssembler.vertexBasis, "obs");
 
     if (parset.get<bool>("io.writeVTK")) {
       ScalarVector stress;
@@ -377,8 +378,8 @@ int main(int argc, char *argv[]) {
 
     AdaptiveTimeStepper<NonlinearFactory, UpdaterPair,
                         EnergyNorm<ScalarMatrix, ScalarVector>>
-    adaptiveTimeStepper(factory, parset, myGlobalFriction, current,
-                        computeExternalForces, stateEnergyNorm, mustRefine);
+        adaptiveTimeStepper(factory, parset, myGlobalFriction, current,
+                            computeExternalForces, stateEnergyNorm, mustRefine);
     while (!adaptiveTimeStepper.reachedEnd()) {
       adaptiveTimeStepper.advance();
       reportTimeStep(adaptiveTimeStepper.getRelativeTime(),
@@ -395,7 +396,7 @@ int main(int argc, char *argv[]) {
         BasisGridFunction<typename MyAssembler::VertexBasis, Vector> velocity(
             myAssembler.vertexBasis, v);
         BasisGridFunction<typename MyAssembler::VertexBasis, Vector>
-        displacement(myAssembler.vertexBasis, u);
+            displacement(myAssembler.vertexBasis, u);
         specialVelocityWriter.write(velocity);
         specialDisplacementWriter.write(displacement);
       }
@@ -410,11 +411,9 @@ int main(int argc, char *argv[]) {
     }
     timeStepWriter.close();
     Python::stop();
-  }
-  catch (Dune::Exception &e) {
+  } catch (Dune::Exception &e) {
     Dune::derr << "Dune reported error: " << e << std::endl;
-  }
-  catch (std::exception &e) {
+  } catch (std::exception &e) {
     std::cerr << "Standard exception: " << e.what() << std::endl;
   }
 }
diff --git a/src/solverfactory.cc b/src/solverfactory.cc
index 0bdc3d3b3d910694458668961a9c44ed6ec4ce71..81f06b4bffa2c386cf00279ae8475da022a3d8de 100644
--- a/src/solverfactory.cc
+++ b/src/solverfactory.cc
@@ -52,7 +52,7 @@ SolverFactory<dim, BlockProblem, Grid>::~SolverFactory() {
 }
 
 template <size_t dim, class BlockProblem, class Grid>
-auto SolverFactory<dim, BlockProblem, Grid>::getSolver() -> Solver *{
+auto SolverFactory<dim, BlockProblem, Grid>::getSolver() -> Solver * {
   return multigridStep;
 }
 
diff --git a/src/solverfactory_tmpl.cc b/src/solverfactory_tmpl.cc
index f9edf6e2707022664c45bec582845eac08636c91..69240d5b778c2623c4885f88317e892e5b0457c9 100644
--- a/src/solverfactory_tmpl.cc
+++ b/src/solverfactory_tmpl.cc
@@ -17,6 +17,6 @@ template class SolverFactory<
     MyBlockProblem<ConvexProblem<GlobalFriction<Matrix, Vector>, Matrix>>,
     Grid>;
 template class SolverFactory<
-    MY_DIM, BlockNonlinearTNNMGProblem<
-             ConvexProblem<ZeroNonlinearity<LocalVector, LocalMatrix>, Matrix>>,
+    MY_DIM, BlockNonlinearTNNMGProblem<ConvexProblem<
+                ZeroNonlinearity<LocalVector, LocalMatrix>, Matrix>>,
     Grid>;
diff --git a/src/state_tmpl.cc b/src/state_tmpl.cc
index 65d7ba9c77e7e70211ebf5c3f79ad75cb75181a3..f1969d6405bab78b5d460edfca65582f0bc91c8e 100644
--- a/src/state_tmpl.cc
+++ b/src/state_tmpl.cc
@@ -1,7 +1,6 @@
 #include "explicitvectors.hh"
 
-template std::shared_ptr<StateUpdater<ScalarVector, Vector>> initStateUpdater<
-    ScalarVector, Vector>(Config::stateModel model,
-                          ScalarVector const &alpha_initial,
-                          Dune::BitSetVector<1> const &frictionalNodes,
-                          double L, double V0);
+template std::shared_ptr<StateUpdater<ScalarVector, Vector>>
+initStateUpdater<ScalarVector, Vector>(
+    Config::stateModel model, ScalarVector const &alpha_initial,
+    Dune::BitSetVector<1> const &frictionalNodes, double L, double V0);
diff --git a/src/timestepping.hh b/src/timestepping.hh
index 3d54198b96956a21a128c863be3bcc9e091a1504..5ee20dce1ba8b98177b90781c39beeabe97861e0 100644
--- a/src/timestepping.hh
+++ b/src/timestepping.hh
@@ -18,9 +18,8 @@ class TimeSteppingScheme {
   void virtual extractVelocity(Vector &velocity) const = 0;
   void virtual extractOldVelocity(Vector &velocity) const = 0;
 
-  std::shared_ptr<
-      TimeSteppingScheme<Vector, Matrix, Function, dim>> virtual clone()
-      const = 0;
+  std::shared_ptr<TimeSteppingScheme<Vector, Matrix, Function,
+                                     dim>> virtual clone() const = 0;
 };
 
 #include "timestepping/newmark.hh"
diff --git a/src/timestepping/newmark.cc b/src/timestepping/newmark.cc
index bb546a1f766f4c6d2b63c5634247a58043060e89..867f808b90b3baa128b390d69992c15a58adde10 100644
--- a/src/timestepping/newmark.cc
+++ b/src/timestepping/newmark.cc
@@ -113,8 +113,8 @@ void Newmark<Vector, Matrix, Function, dim>::extractDisplacement(
 }
 
 template <class Vector, class Matrix, class Function, size_t dim>
-void Newmark<Vector, Matrix, Function, dim>::extractVelocity(Vector &velocity)
-    const {
+void Newmark<Vector, Matrix, Function, dim>::extractVelocity(
+    Vector &velocity) const {
   if (!postProcessCalled)
     DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");