From d9eccc189e0669b06f90ffaa9cc28f1102383800 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Fri, 13 Dec 2013 01:40:07 +0100
Subject: [PATCH] [Cleanup] Fix sign of normal stress

---
 dune/tectonic/frictionpotential.hh | 2 +-
 src/one-body-sample.cc             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dune/tectonic/frictionpotential.hh b/dune/tectonic/frictionpotential.hh
index 2fc1864b..2fc4fb3d 100644
--- a/dune/tectonic/frictionpotential.hh
+++ b/dune/tectonic/frictionpotential.hh
@@ -31,7 +31,7 @@ class FrictionPotentialWrapper {
 class FrictionPotential : public FrictionPotentialWrapper {
 public:
   FrictionPotential(double coefficient, FrictionData const &fd)
-      : fd(fd), weightTimesNormalStress(coefficient * fd.normalStress) {}
+      : fd(fd), weightTimesNormalStress(coefficient * (-fd.normalStress)) {}
 
   // log(V/V_m)  if V >= V_0
   // 0           otherwise
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 8bcca4f8..ff276055 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -261,7 +261,7 @@ int main(int argc, char *argv[]) {
       // volume * gravity * density / area    = normal stress
       // V      * g       * rho     / A       = sigma_n
       // m^d    * N/kg    * kg/m^d  / m^(d-1) = N/m^(d-1)
-      normalStress = volume * gravity * density / area;
+      normalStress = -volume * gravity * density / area;
     }
     FrictionData const frictionData(parset.sub("boundary.friction"),
                                     normalStress);
-- 
GitLab