Skip to content
Snippets Groups Projects
Commit c8424a60 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

There is only one model now

The code for Laursen's model is long gone
parent c7598f69
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "enums.hh" #include "enums.hh"
#include "enum_parser.cc" #include "enum_parser.cc"
#include "enum_model.cc"
// Assembles Neumann boundary term in f // Assembles Neumann boundary term in f
template <class GridType, class GridView, class LocalVectorType, class FEBasis> template <class GridType, class GridView, class LocalVectorType, class FEBasis>
...@@ -66,27 +65,21 @@ assemble_nonlinearity( ...@@ -66,27 +65,21 @@ assemble_nonlinearity(
SingletonVectorType mu(size); SingletonVectorType mu(size);
mu = parset.get<double>("mu"); mu = parset.get<double>("mu");
switch (parset.get<Config::model>("model")) { SingletonVectorType a(size);
case Config::Exponential: { a = parset.get<double>("a");
SingletonVectorType a(size);
a = parset.get<double>("a");
SingletonVectorType V0(size); SingletonVectorType V0(size);
V0 = parset.get<double>("V0"); V0 = parset.get<double>("V0");
SingletonVectorType b(size); SingletonVectorType b(size);
b = parset.get<double>("b"); b = parset.get<double>("b");
SingletonVectorType L(size); SingletonVectorType L(size);
L = parset.get<double>("L"); L = parset.get<double>("L");
return Dune::make_shared< return Dune::make_shared<
Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>( Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>(
nodalIntegrals, a, mu, V0, normalStress, b, state, L); nodalIntegrals, a, mu, V0, normalStress, b, state, L);
}
case Config::Laursen:
assert(false);
}
} }
#include "assemblers_tmpl.cc" #include "assemblers_tmpl.cc"
#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");
}
};
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
#define ENUMS_HH #define ENUMS_HH
struct Config { struct Config {
enum model {
Laursen,
Exponential
};
enum state_model { enum state_model {
Dieterich, Dieterich,
Ruina Ruina
......
...@@ -53,7 +53,6 @@ a = 0.010 ...@@ -53,7 +53,6 @@ a = 0.010
b = 0.015 b = 0.015
V0 = 1 V0 = 1
L = 1e-5 L = 1e-5
model = Exponential
initial_log_state = -10 initial_log_state = -10
state_model = Dieterich state_model = Dieterich
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment