]> https://gitweb.dealii.org/ - dealii.git/commitdiff
a bug fixed
authorESeNonFossiIo <esenonfossiio@gmail.com>
Tue, 2 Jun 2015 21:04:19 +0000 (23:04 +0200)
committerESeNonFossiIo <esenonfossiio@gmail.com>
Tue, 2 Jun 2015 21:16:36 +0000 (23:16 +0200)
include/deal.II/lac/block_linear_operator.h

index fa92342e70b16ff0c0137e129ccf56e2843d41f3..d17e290f33ba2307ea0aa3d9854daa71e1f1c165 100644 (file)
@@ -531,13 +531,13 @@ upper_triangular_operator(const BlockMatrix &block_matrix)
     Assert( u.n_blocks() == block_matrix.n_block_cols(),
             ExcDimensionMismatch(u.n_blocks(), block_matrix.n_block_cols()));
 
-    for (unsigned int i = 0; i < block_matrix.n_block_rows(); ++i)
+    for (unsigned int i = 0; i < block_matrix.n_block_rows() - 1; ++i)
       {
-        v.block(i) *= 0;
-        for (unsigned int j = i + 1; j < block_matrix.n_block_cols(); ++j)
-          block_matrix.block(i,j).Tvmult_add(v.block(i), u.block(j));
+        block_matrix.block(i,block_matrix.n_block_rows() - 1).vmult(v.block(i), u.block(block_matrix.n_block_rows() - 1));
+        for (unsigned int j = block_matrix.n_block_rows() - 2; j > i; --j)
+          block_matrix.block(i,j).vmult_add(v.block(i), u.block(j));
       }
-
+    v.block(block_matrix.n_block_rows() - 1) = 0;
   };
 
   return_op.vmult_add = [&block_matrix](Range &v, const Domain &u)

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.