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

[Cleanup] Rename: eulerPair -> backwardEuler

parent 668d4321
Branches
No related tags found
No related merge requests found
...@@ -5,8 +5,8 @@ template <> struct StringToEnum<Config::scheme> { ...@@ -5,8 +5,8 @@ template <> struct StringToEnum<Config::scheme> {
if (s == "newmark") if (s == "newmark")
return Config::Newmark; return Config::Newmark;
if (s == "eulerPair") if (s == "backwardEuler")
return Config::EulerPair; return Config::BackwardEuler;
DUNE_THROW(Dune::Exception, "failed to parse enum"); DUNE_THROW(Dune::Exception, "failed to parse enum");
} }
......
...@@ -8,7 +8,7 @@ struct Config { ...@@ -8,7 +8,7 @@ struct Config {
}; };
enum scheme { enum scheme {
Newmark, Newmark,
EulerPair BackwardEuler
}; };
}; };
#endif #endif
...@@ -107,9 +107,9 @@ initTimeStepper(Config::scheme scheme, ...@@ -107,9 +107,9 @@ initTimeStepper(Config::scheme scheme,
Newmark<VectorType, MatrixType, FunctionType, dims>>( Newmark<VectorType, MatrixType, FunctionType, dims>>(
stiffnessMatrix, massMatrix, u_initial, v_initial, a_initial, stiffnessMatrix, massMatrix, u_initial, v_initial, a_initial,
velocityDirichletNodes, velocityDirichletFunction); velocityDirichletNodes, velocityDirichletFunction);
case Config::EulerPair: case Config::BackwardEuler:
return Dune::make_shared< return Dune::make_shared<
EulerPair<VectorType, MatrixType, FunctionType, dims>>( BackwardEuler<VectorType, MatrixType, FunctionType, dims>>(
stiffnessMatrix, massMatrix, u_initial, v_initial, stiffnessMatrix, massMatrix, u_initial, v_initial,
velocityDirichletNodes, velocityDirichletFunction); velocityDirichletNodes, velocityDirichletFunction);
default: default:
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "timestepping.hh" #include "timestepping.hh"
#include "timestepping/eulerpair.cc" #include "timestepping/backward_euler.cc"
#include "timestepping/newmark.cc" #include "timestepping/newmark.cc"
#include "timestepping_tmpl.cc" #include "timestepping_tmpl.cc"
...@@ -17,6 +17,6 @@ class TimeSteppingScheme { ...@@ -17,6 +17,6 @@ class TimeSteppingScheme {
}; };
#include "timestepping/newmark.hh" #include "timestepping/newmark.hh"
#include "timestepping/eulerpair.hh" #include "timestepping/backward_euler.hh"
#endif #endif
template <class VectorType, class MatrixType, class FunctionType, int dim> 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, MatrixType const &_A, MatrixType const &_M, VectorType const &_u_initial,
VectorType const &_v_initial, VectorType const &_v_initial,
Dune::BitSetVector<dim> const &_dirichletNodes, Dune::BitSetVector<dim> const &_dirichletNodes,
...@@ -12,13 +12,13 @@ EulerPair<VectorType, MatrixType, FunctionType, dim>::EulerPair( ...@@ -12,13 +12,13 @@ EulerPair<VectorType, MatrixType, FunctionType, dim>::EulerPair(
dirichletFunction(_dirichletFunction) {} dirichletFunction(_dirichletFunction) {}
template <class VectorType, class MatrixType, class FunctionType, int dim> 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; v_o = v;
u_o = u; u_o = u;
} }
template <class VectorType, class MatrixType, class FunctionType, int dim> 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 const &ell, double _tau, double time, VectorType &problem_rhs,
VectorType &problem_iterate, MatrixType &problem_AM) { VectorType &problem_iterate, MatrixType &problem_AM) {
postProcessCalled = false; postProcessCalled = false;
...@@ -95,7 +95,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup( ...@@ -95,7 +95,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup(
} }
template <class VectorType, class MatrixType, class FunctionType, int dim> 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) { VectorType const &problem_iterate) {
postProcessCalled = true; postProcessCalled = true;
...@@ -106,8 +106,8 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::postProcess( ...@@ -106,8 +106,8 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::postProcess(
} }
template <class VectorType, class MatrixType, class FunctionType, int dim> template <class VectorType, class MatrixType, class FunctionType, int dim>
void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractDisplacement( void BackwardEuler<VectorType, MatrixType, FunctionType,
VectorType &displacement) const { dim>::extractDisplacement(VectorType &displacement) const {
if (!postProcessCalled) if (!postProcessCalled)
DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!"); DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");
...@@ -115,7 +115,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractDisplacement( ...@@ -115,7 +115,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::extractDisplacement(
} }
template <class VectorType, class MatrixType, class FunctionType, int dim> 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 { VectorType &velocity) const {
if (!postProcessCalled) if (!postProcessCalled)
DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!"); DUNE_THROW(Dune::Exception, "It seems you forgot to call postProcess!");
......
#ifndef DUNE_TECTONIC_TIMESTEPPING_EULERPAIR_HH #ifndef DUNE_TECTONIC_TIMESTEPPING_BACKWARD_EULER_HH
#define DUNE_TECTONIC_TIMESTEPPING_EULERPAIR_HH #define DUNE_TECTONIC_TIMESTEPPING_BACKWARD_EULER_HH
template <class VectorType, class MatrixType, class FunctionType, int dim> template <class VectorType, class MatrixType, class FunctionType, int dim>
class EulerPair class BackwardEuler
: public TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> { : public TimeSteppingScheme<VectorType, MatrixType, FunctionType, dim> {
public: public:
EulerPair(MatrixType const &_A, MatrixType const &_M, BackwardEuler(MatrixType const &_A, MatrixType const &_M,
VectorType const &_u_initial, VectorType const &_v_initial, VectorType const &_u_initial, VectorType const &_v_initial,
Dune::BitSetVector<dim> const &_dirichletNodes, Dune::BitSetVector<dim> const &_dirichletNodes,
FunctionType const &_dirichletFunction); FunctionType const &_dirichletFunction);
......
...@@ -15,4 +15,4 @@ using VectorType = Dune::BlockVector<SmallVector>; ...@@ -15,4 +15,4 @@ using VectorType = Dune::BlockVector<SmallVector>;
using FunctionType = Dune::VirtualFunction<double, double>; using FunctionType = Dune::VirtualFunction<double, double>;
template class Newmark<VectorType, MatrixType, FunctionType, DIM>; template class Newmark<VectorType, MatrixType, FunctionType, DIM>;
template class EulerPair<VectorType, MatrixType, FunctionType, DIM>; template class BackwardEuler<VectorType, MatrixType, FunctionType, DIM>;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment