From bd6d38b9c5dd704ddd1dfe7f600a43a3f9e7ce4c Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Sun, 21 Jul 2013 13:23:54 +0200
Subject: [PATCH] [Cleanup] Rename: eulerPair -> backwardEuler

---
 src/enum_scheme.cc                                 |  4 ++--
 src/enums.hh                                       |  2 +-
 src/one-body-sample.cc                             |  4 ++--
 src/timestepping.cc                                |  2 +-
 src/timestepping.hh                                |  2 +-
 .../{eulerpair.cc => backward_euler.cc}            | 14 +++++++-------
 .../{eulerpair.hh => backward_euler.hh}            | 14 +++++++-------
 src/timestepping_tmpl.cc                           |  2 +-
 8 files changed, 22 insertions(+), 22 deletions(-)
 rename src/timestepping/{eulerpair.cc => backward_euler.cc} (85%)
 rename src/timestepping/{eulerpair.hh => backward_euler.hh} (67%)

diff --git a/src/enum_scheme.cc b/src/enum_scheme.cc
index 6c57c032..0327b541 100644
--- a/src/enum_scheme.cc
+++ b/src/enum_scheme.cc
@@ -5,8 +5,8 @@ template <> struct StringToEnum<Config::scheme> {
     if (s == "newmark")
       return Config::Newmark;
 
-    if (s == "eulerPair")
-      return Config::EulerPair;
+    if (s == "backwardEuler")
+      return Config::BackwardEuler;
 
     DUNE_THROW(Dune::Exception, "failed to parse enum");
   }
diff --git a/src/enums.hh b/src/enums.hh
index b70a0d17..1c8a7a85 100644
--- a/src/enums.hh
+++ b/src/enums.hh
@@ -8,7 +8,7 @@ struct Config {
   };
   enum scheme {
     Newmark,
-    EulerPair
+    BackwardEuler
   };
 };
 #endif
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 7eaf6def..11ce67d8 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -107,9 +107,9 @@ initTimeStepper(Config::scheme scheme,
           Newmark<VectorType, MatrixType, FunctionType, dims>>(
           stiffnessMatrix, massMatrix, u_initial, v_initial, a_initial,
           velocityDirichletNodes, velocityDirichletFunction);
-    case Config::EulerPair:
+    case Config::BackwardEuler:
       return Dune::make_shared<
-          EulerPair<VectorType, MatrixType, FunctionType, dims>>(
+          BackwardEuler<VectorType, MatrixType, FunctionType, dims>>(
           stiffnessMatrix, massMatrix, u_initial, v_initial,
           velocityDirichletNodes, velocityDirichletFunction);
     default:
diff --git a/src/timestepping.cc b/src/timestepping.cc
index a0399257..0003fd22 100644
--- a/src/timestepping.cc
+++ b/src/timestepping.cc
@@ -7,7 +7,7 @@
 
 #include "timestepping.hh"
 
-#include "timestepping/eulerpair.cc"
+#include "timestepping/backward_euler.cc"
 #include "timestepping/newmark.cc"
 
 #include "timestepping_tmpl.cc"
diff --git a/src/timestepping.hh b/src/timestepping.hh
index 4b02fdb6..e99ea787 100644
--- a/src/timestepping.hh
+++ b/src/timestepping.hh
@@ -17,6 +17,6 @@ class TimeSteppingScheme {
 };
 
 #include "timestepping/newmark.hh"
-#include "timestepping/eulerpair.hh"
+#include "timestepping/backward_euler.hh"
 
 #endif
diff --git a/src/timestepping/eulerpair.cc b/src/timestepping/backward_euler.cc
similarity index 85%
rename from src/timestepping/eulerpair.cc
rename to src/timestepping/backward_euler.cc
index dfef35b8..7abd239e 100644
--- a/src/timestepping/eulerpair.cc
+++ b/src/timestepping/backward_euler.cc
@@ -1,5 +1,5 @@
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-EulerPair<VectorType, MatrixType, FunctionType, dim>::EulerPair(
+BackwardEuler<VectorType, MatrixType, FunctionType, dim>::BackwardEuler(
     MatrixType const &_A, MatrixType const &_M, VectorType const &_u_initial,
     VectorType const &_v_initial,
     Dune::BitSetVector<dim> const &_dirichletNodes,
@@ -12,13 +12,13 @@ EulerPair<VectorType, MatrixType, FunctionType, dim>::EulerPair(
       dirichletFunction(_dirichletFunction) {}
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-void EulerPair<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() {
+void BackwardEuler<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() {
   v_o = v;
   u_o = u;
 }
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup(
+void BackwardEuler<VectorType, MatrixType, FunctionType, dim>::setup(
     VectorType const &ell, double _tau, double time, VectorType &problem_rhs,
     VectorType &problem_iterate, MatrixType &problem_AM) {
   postProcessCalled = false;
@@ -95,7 +95,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup(
 }
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-void EulerPair<VectorType, MatrixType, FunctionType, dim>::postProcess(
+void BackwardEuler<VectorType, MatrixType, FunctionType, dim>::postProcess(
     VectorType const &problem_iterate) {
   postProcessCalled = true;
 
@@ -106,8 +106,8 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::postProcess(
 }
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractDisplacement(
-    VectorType &displacement) const {
+void BackwardEuler<VectorType, MatrixType, FunctionType,
+                   dim>::extractDisplacement(VectorType &displacement) const {
   if (!postProcessCalled)
     DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");
 
@@ -115,7 +115,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractDisplacement(
 }
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractVelocity(
+void BackwardEuler<VectorType, MatrixType, FunctionType, dim>::extractVelocity(
     VectorType &velocity) const {
   if (!postProcessCalled)
     DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");
diff --git a/src/timestepping/eulerpair.hh b/src/timestepping/backward_euler.hh
similarity index 67%
rename from src/timestepping/eulerpair.hh
rename to src/timestepping/backward_euler.hh
index 105529e1..202c4420 100644
--- a/src/timestepping/eulerpair.hh
+++ b/src/timestepping/backward_euler.hh
@@ -1,14 +1,14 @@
-#ifndef DUNE_TECTONIC_TIMESTEPPING_EULERPAIR_HH
-#define DUNE_TECTONIC_TIMESTEPPING_EULERPAIR_HH
+#ifndef DUNE_TECTONIC_TIMESTEPPING_BACKWARD_EULER_HH
+#define DUNE_TECTONIC_TIMESTEPPING_BACKWARD_EULER_HH
 
 template <class VectorType, class MatrixType, class FunctionType, int dim>
-class EulerPair
+class BackwardEuler
     : public TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> {
 public:
-  EulerPair(MatrixType const &_A, MatrixType const &_M,
-            VectorType const &_u_initial, VectorType const &_v_initial,
-            Dune::BitSetVector<dim> const &_dirichletNodes,
-            FunctionType const &_dirichletFunction);
+  BackwardEuler(MatrixType const &_A, MatrixType const &_M,
+                VectorType const &_u_initial, VectorType const &_v_initial,
+                Dune::BitSetVector<dim> const &_dirichletNodes,
+                FunctionType const &_dirichletFunction);
 
   void virtual nextTimeStep() override;
   void virtual setup(VectorType const &, double, double, VectorType &,
diff --git a/src/timestepping_tmpl.cc b/src/timestepping_tmpl.cc
index 3a6156fc..9a8a2a3d 100644
--- a/src/timestepping_tmpl.cc
+++ b/src/timestepping_tmpl.cc
@@ -15,4 +15,4 @@ using VectorType = Dune::BlockVector<SmallVector>;
 using FunctionType = Dune::VirtualFunction<double, double>;
 
 template class Newmark<VectorType, MatrixType, FunctionType, DIM>;
-template class EulerPair<VectorType, MatrixType, FunctionType, DIM>;
+template class BackwardEuler<VectorType, MatrixType, FunctionType, DIM>;
-- 
GitLab