diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 66b550fe5dc84876d67fe9c39003cfb0c27237b6..1e9863a1ccb1101531d334c9946f1b06e12eca55 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -393,13 +393,13 @@ int main(int argc, char *argv[]) { VectorType ell(finestSize); createRHS(time, ell); - MatrixType problem_A; + MatrixType problem_AB; VectorType problem_rhs(finestSize); VectorType problem_iterate(finestSize); stateUpdater->setup(tau); timeSteppingScheme->setup(ell, tau, time, problem_rhs, problem_iterate, - problem_A); + problem_AB); LoopSolver<VectorType> velocityProblemSolver( multigridStep, parset.get<size_t>("solver.tnnmg.maxiterations"), @@ -416,7 +416,7 @@ int main(int argc, char *argv[]) { using MyConvexProblemType = MyConvexProblem<MatrixType, VectorType>; MyConvexProblemType const myConvexProblem( - problem_A, *myGlobalNonlinearity, problem_rhs); + problem_AB, *myGlobalNonlinearity, problem_rhs); MyBlockProblem<MyConvexProblemType> velocityProblem(parset, myConvexProblem); multigridStep->setProblem(_problem_iterate, velocityProblem); diff --git a/src/timestepping.cc b/src/timestepping.cc index 07339e5ca074e707c3cf347a88b10bad97db0690..695bccdbfe78bcbae446e002a8e54aeb4c225fe6 100644 --- a/src/timestepping.cc +++ b/src/timestepping.cc @@ -27,7 +27,7 @@ void ImplicitEuler<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() { template <class VectorType, class MatrixType, class FunctionType, int dim> void ImplicitEuler<VectorType, MatrixType, FunctionType, dim>::setup( VectorType const &ell, double _tau, double time, VectorType &problem_rhs, - VectorType &problem_iterate, MatrixType &problem_A) { + VectorType &problem_iterate, MatrixType &problem_AB) { postProcessCalled = false; tau = _tau; @@ -36,8 +36,8 @@ void ImplicitEuler<VectorType, MatrixType, FunctionType, dim>::setup( Arithmetic::addProduct(problem_rhs, -1.0, A, u_old); // For fixed tau, we'd only really have to do this once - problem_A = A; - problem_A *= tau; + problem_AB = A; + problem_AB *= tau; // ud_old makes a good initial iterate; we could use anything, though problem_iterate = ud_old; @@ -123,7 +123,7 @@ void Newmark<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() { template <class VectorType, class MatrixType, class FunctionType, int dim> void Newmark<VectorType, MatrixType, FunctionType, dim>::setup( VectorType const &ell, double _tau, double time, VectorType &problem_rhs, - VectorType &problem_iterate, MatrixType &problem_A) { + VectorType &problem_iterate, MatrixType &problem_AB) { postProcessCalled = false; tau = _tau; @@ -138,10 +138,10 @@ void Newmark<VectorType, MatrixType, FunctionType, dim>::setup( Dune::MatrixIndexSet indices(A.N(), A.M()); indices.import(A); indices.import(B); - indices.exportIdx(problem_A); - problem_A = 0.0; - Arithmetic::addProduct(problem_A, tau / 2.0, A); - Arithmetic::addProduct(problem_A, 2.0 / tau, B); + indices.exportIdx(problem_AB); + problem_AB = 0.0; + Arithmetic::addProduct(problem_AB, tau / 2.0, A); + Arithmetic::addProduct(problem_AB, 2.0 / tau, B); // ud_old makes a good initial iterate; we could use anything, though problem_iterate = ud_old; @@ -231,7 +231,7 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::nextTimeStep() { template <class VectorType, class MatrixType, class FunctionType, int dim> void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup( VectorType const &ell, double _tau, double time, VectorType &problem_rhs, - VectorType &problem_iterate, MatrixType &problem_A) { + VectorType &problem_iterate, MatrixType &problem_AB) { postProcessCalled = false; tau = _tau; @@ -244,10 +244,10 @@ void EulerPair<VectorType, MatrixType, FunctionType, dim>::setup( Dune::MatrixIndexSet indices(A.N(), A.M()); indices.import(A); indices.import(B); - indices.exportIdx(problem_A); - problem_A = 0.0; - Arithmetic::addProduct(problem_A, tau, A); - Arithmetic::addProduct(problem_A, 1.0 / tau, B); + indices.exportIdx(problem_AB); + problem_AB = 0.0; + Arithmetic::addProduct(problem_AB, tau, A); + Arithmetic::addProduct(problem_AB, 1.0 / tau, B); // ud_old makes a good initial iterate; we could use anything, though problem_iterate = ud_old; diff --git a/src/timestepping.hh b/src/timestepping.hh index f38296c514e30d22bf0b22b74ad8b33698a292a8..6484dcebe8584f30b0976ec020e093c2399073c4 100644 --- a/src/timestepping.hh +++ b/src/timestepping.hh @@ -9,7 +9,7 @@ class TimeSteppingScheme { void virtual nextTimeStep() = 0; void virtual setup(VectorType const &ell, double _tau, double time, VectorType &problem_rhs, VectorType &problem_iterate, - MatrixType &problem_A) = 0; + MatrixType &problem_AB) = 0; void virtual postProcess(VectorType const &problem_iterate) = 0; void virtual extractDisplacement(VectorType &displacement) const = 0;