]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed FullMatrix fill function.
authorprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2007 15:01:44 +0000 (15:01 +0000)
committerprill <prill@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2007 15:01:44 +0000 (15:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@14614 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/full_matrix.templates.h

index a46831d4d4d9c58512e7b57593c81850aa7d3e7a..893aeb3401543649c5789797ff1ffca65a97214d 100644 (file)
@@ -457,11 +457,11 @@ void FullMatrix<number>::fill (const FullMatrix<number2> &src,
 {
                                   // Compute maximal size of copied block
   const unsigned int rows = (m() - dst_offset_i >= src.m() - src_offset_i)
-                           ? src.m()
-                           : m();
+                           ? src.m() - src_offset_i
+                           : m() - dst_offset_i;
   const unsigned int cols = (n() - dst_offset_j >= src.n() - src_offset_j)
-                           ? src.n()
-                           : n();
+                           ? src.n() - src_offset_j
+                           : n() - dst_offset_j;
   
   for (unsigned int i=0; i<rows ; ++i)
     for (unsigned int j=0; j<cols ; ++j)

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.