From c8424a60cf32982efe7399a045ef8fdb6af1a1cb Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Tue, 30 Oct 2012 14:47:17 +0100
Subject: [PATCH] There is only one model now

The code for Laursen's model is long gone
---
 src/assemblers.cc          | 29 +++++++++++------------------
 src/enum_model.cc          | 13 -------------
 src/enums.hh               |  4 ----
 src/one-body-sample.parset |  1 -
 4 files changed, 11 insertions(+), 36 deletions(-)
 delete mode 100644 src/enum_model.cc

diff --git a/src/assemblers.cc b/src/assemblers.cc
index 38084c9c..30cc3746 100644
--- a/src/assemblers.cc
+++ b/src/assemblers.cc
@@ -13,7 +13,6 @@
 
 #include "enums.hh"
 #include "enum_parser.cc"
-#include "enum_model.cc"
 
 // Assembles Neumann boundary term in f
 template <class GridType, class GridView, class LocalVectorType, class FEBasis>
@@ -66,27 +65,21 @@ assemble_nonlinearity(
   SingletonVectorType mu(size);
   mu = parset.get<double>("mu");
 
-  switch (parset.get<Config::model>("model")) {
-    case Config::Exponential: {
-      SingletonVectorType a(size);
-      a = parset.get<double>("a");
+  SingletonVectorType a(size);
+  a = parset.get<double>("a");
 
-      SingletonVectorType V0(size);
-      V0 = parset.get<double>("V0");
+  SingletonVectorType V0(size);
+  V0 = parset.get<double>("V0");
 
-      SingletonVectorType b(size);
-      b = parset.get<double>("b");
+  SingletonVectorType b(size);
+  b = parset.get<double>("b");
 
-      SingletonVectorType L(size);
-      L = parset.get<double>("L");
+  SingletonVectorType L(size);
+  L = parset.get<double>("L");
 
-      return Dune::make_shared<
-          Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>(
-          nodalIntegrals, a, mu, V0, normalStress, b, state, L);
-    }
-    case Config::Laursen:
-      assert(false);
-  }
+  return Dune::make_shared<
+      Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>(
+      nodalIntegrals, a, mu, V0, normalStress, b, state, L);
 }
 
 #include "assemblers_tmpl.cc"
diff --git a/src/enum_model.cc b/src/enum_model.cc
deleted file mode 100644
index 1fd1bc1d..00000000
--- a/src/enum_model.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <dune/common/exceptions.hh>
-
-template <> struct StringToEnum<Config::model> {
-  static Config::model convert(std::string const &s) {
-    if (s == "Laursen")
-      return Config::Laursen;
-
-    if (s == "Exponential")
-      return Config::Exponential;
-
-    DUNE_THROW(Dune::Exception, "failed to parse enum");
-  }
-};
diff --git a/src/enums.hh b/src/enums.hh
index 21fb6cdf..f8d05d21 100644
--- a/src/enums.hh
+++ b/src/enums.hh
@@ -2,10 +2,6 @@
 #define ENUMS_HH
 
 struct Config {
-  enum model {
-    Laursen,
-    Exponential
-  };
   enum state_model {
     Dieterich,
     Ruina
diff --git a/src/one-body-sample.parset b/src/one-body-sample.parset
index 6f5146f1..78861e1f 100644
--- a/src/one-body-sample.parset
+++ b/src/one-body-sample.parset
@@ -53,7 +53,6 @@ a = 0.010
 b = 0.015
 V0 = 1
 L = 1e-5
-model = Exponential
 initial_log_state = -10
 state_model = Dieterich
 
-- 
GitLab