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

eulerPair need not keep track of accelerations

parent ccaf0fae
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,8 @@ initTimeStepper(Config::scheme scheme, FunctionType const &dirichletFunction,
case Config::EulerPair:
return Dune::make_shared<
EulerPair<VectorType, MatrixType, FunctionType, dims>>(
stiffnessMatrix, massMatrix, u_initial, ud_initial, udd_initial,
ignoreNodes, dirichletFunction);
stiffnessMatrix, massMatrix, u_initial, ud_initial, ignoreNodes,
dirichletFunction);
}
}
template <class SingletonVectorType, class VectorType>
......
......@@ -212,20 +212,18 @@ Newmark<VectorType, MatrixType, FunctionType, dim>::clone() {
template <class VectorType, class MatrixType, class FunctionType, int dim>
EulerPair<VectorType, MatrixType, FunctionType, dim>::EulerPair(
MatrixType const &_A, MatrixType const &_B, VectorType const &_u_initial,
VectorType const &_ud_initial, VectorType const &_udd_initial,
VectorType const &_ud_initial,
Dune::BitSetVector<dim> const &_dirichletNodes,
FunctionType const &_dirichletFunction)
: A(_A),
B(_B),
u(_u_initial),
ud(_ud_initial),
udd(_udd_initial),
dirichletNodes(_dirichletNodes),
dirichletFunction(_dirichletFunction) {}
template <class VectorType, class MatrixType, class FunctionType, int dim>
void EulerPair<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() {
udd_old = udd;
ud_old = ud;
u_old = u;
}
......@@ -286,10 +284,6 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::postProcess(
u = u_old;
Arithmetic::addProduct(u, tau, ud);
udd = 0;
Arithmetic::addProduct(udd, 1.0 / tau, ud);
Arithmetic::addProduct(udd, -1.0 / tau, ud_old);
}
template <class VectorType, class MatrixType, class FunctionType, int dim>
......
......@@ -93,7 +93,6 @@ class EulerPair
public:
EulerPair(MatrixType const &_A, MatrixType const &_B,
VectorType const &_u_initial, VectorType const &_ud_initial,
VectorType const &_udd_initial,
Dune::BitSetVector<dim> const &_dirichletNodes,
FunctionType const &_dirichletFunction);
......@@ -112,13 +111,11 @@ class EulerPair
MatrixType const &B;
VectorType u;
VectorType ud;
VectorType udd;
Dune::BitSetVector<dim> const &dirichletNodes;
FunctionType const &dirichletFunction;
VectorType u_old;
VectorType ud_old;
VectorType udd_old;
double tau;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment