From 9b43f61896e719ee3a942d46fccd800bdb65414e Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Tue, 28 May 2013 16:06:20 +0200 Subject: [PATCH] problem_A -> problem_AB --- src/one-body-sample.cc | 6 +++--- src/timestepping.cc | 26 +++++++++++++------------- src/timestepping.hh | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 66b550fe..1e9863a1 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 07339e5c..695bccdb 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 f38296c5..6484dceb 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; -- GitLab