]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reorder arguments of inverse_linop
authorMatthias Maier <tamiko@43-1.org>
Mon, 13 Apr 2015 17:27:21 +0000 (19:27 +0200)
committerMatthias Maier <tamiko@43-1.org>
Sun, 19 Apr 2015 20:55:06 +0000 (22:55 +0200)
include/deal.II/lac/linear_operator.h
tests/lac/linear_operator_02.cc
tests/lac/linear_operator_03.cc

index 0a03b9e0916f2fa2bedf4de8f2bbe58416fd5184..02308f399765a97bf058dc174bbd6ce8b99183d5 100644 (file)
@@ -566,9 +566,9 @@ identity_linop(const std::function<void(Range &, bool)> &exemplar)
  */
 template <typename Solver, typename Preconditioner>
 LinearOperator<typename Solver::vector_type, typename Solver::vector_type>
-inverse_linop(Solver &solver,
-              const Preconditioner &preconditioner,
-              const LinearOperator<typename Solver::vector_type, typename Solver::vector_type> &op)
+inverse_linop(const LinearOperator<typename Solver::vector_type, typename Solver::vector_type> &op,
+              Solver &solver,
+              const Preconditioner &preconditioner)
 {
   typedef typename Solver::vector_type Vector;
 
index b2c34a19b8d83a460090d63ee3b28163a8dec0b7..1620746cd042f8b2e43cd2c9b7741c33178ebe3e 100644 (file)
@@ -153,7 +153,7 @@ int main()
   deallog << "solve(B, v, u): " << v << std::endl;
 
   deallog.depth_file(0);
-  inverse_linop(solver, PreconditionIdentity(), op_b).vmult(v, u);
+  inverse_linop(op_b, solver, PreconditionIdentity()).vmult(v, u);
   deallog.depth_file(3);
   deallog << "inverse_linop(B)u: " << v << std::endl;
 
@@ -163,12 +163,12 @@ int main()
   deallog << "B(inverse_linop(B)u): " << w << std::endl;
 
   deallog.depth_file(0);
-  (op_b * inverse_linop(solver, PreconditionIdentity(), op_b)).vmult(w, u);
+  (op_b * inverse_linop(op_b, solver, PreconditionIdentity())).vmult(w, u);
   deallog.depth_file(3);
   deallog << "(B*inverse_linop(B))u: " << w << std::endl;
 
   deallog.depth_file(0);
-  (inverse_linop(solver, PreconditionIdentity(), op_b) * op_b).vmult(w, u);
+  (inverse_linop(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
   deallog.depth_file(3);
   deallog << "(inverse_linop(B)*B)u: " << w << std::endl;
 
@@ -176,7 +176,7 @@ int main()
   SolverCG<> inner_solver (solver_control);
 
   deallog.depth_file(0);
-  solver.solve(inverse_linop(inner_solver, PreconditionIdentity(), op_b), v, u,
+  solver.solve(inverse_linop(op_b, inner_solver, PreconditionIdentity()), v, u,
                PreconditionIdentity());
   deallog.depth_file(3);
   deallog << "solve(inverse_linop(B), v, u) == Bu: " << v << std::endl;
index 85416d844a6e515fa91e988e6810c7d92046364e..f65717ccf961af5efddc65ff2b941dd4dc0a56e9 100644 (file)
@@ -173,7 +173,7 @@ int main()
   PRINTME("solve(B, v, u)", v);
 
   deallog.depth_file(0);
-  inverse_linop(solver, PreconditionIdentity(), op_b).vmult(v, u);
+  inverse_linop(op_b, solver, PreconditionIdentity()).vmult(v, u);
   deallog.depth_file(3);
   PRINTME("inverse_linop(B)u", v);
 
@@ -183,12 +183,12 @@ int main()
   PRINTME("B(inverse_linop(B)u)", w);
 
   deallog.depth_file(0);
-  (op_b * inverse_linop(solver, PreconditionIdentity(), op_b)).vmult(w, u);
+  (op_b * inverse_linop(op_b, solver, PreconditionIdentity())).vmult(w, u);
   deallog.depth_file(3);
   PRINTME("(B*inverse_linop(B))u", w);
 
   deallog.depth_file(0);
-  (inverse_linop(solver, PreconditionIdentity(), op_b) * op_b).vmult(w, u);
+  (inverse_linop(op_b, solver, PreconditionIdentity()) * op_b).vmult(w, u);
   deallog.depth_file(3);
   PRINTME("(inverse_linop(B)*B)u", w);
 
@@ -196,7 +196,7 @@ int main()
   SolverCG<BlockVector<double>> inner_solver (solver_control);
 
   deallog.depth_file(0);
-  solver.solve(inverse_linop(inner_solver, PreconditionIdentity(), op_b), v, u,
+  solver.solve(inverse_linop(op_b, inner_solver, PreconditionIdentity()), v, u,
                PreconditionIdentity());
   deallog.depth_file(3);
   PRINTME("solve(inverse_linop(B), v, u) == Bu", v);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.