]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small fixes.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 7 May 2009 15:01:15 +0000 (15:01 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 7 May 2009 15:01:15 +0000 (15:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@18822 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/trilinos_sparse_matrix.cc

index 1e26fd69848faa47653870eaeb42632e0e596b64..9ac95cdf040d7c167bf7d8e9d238891b3e52e269 100755 (executable)
@@ -1310,13 +1310,11 @@ namespace TrilinosWrappers
                                   // vector content on the diagonal.
        Epetra_CrsMatrix Vmat (Copy, this->matrix->DomainMap(), 
                               B.matrix->RangeMap(), 1, true);
-       const int min_my_gid = this->matrix->DomainMap().MinMyGID();
-       const int max_my_gid = this->matrix->DomainMap().MaxMyGID() + 1;
-       for (int i=min_my_gid; i<max_my_gid; ++i)
-         {
-           double V_val = use_vector ? V(i) : 1;
-           Vmat.InsertGlobalValues (i, 1, &V_val, &i);
-         }
+       Assert (Vmat.DomainMap().SameAs(V.trilinos_vector().Map()),
+               ExcMessage ("Column map of matrix does not fit with vector map!"));
+       const int num_my_rows = B.local_size();
+       for (int i=0; i<num_my_rows; ++i)
+         Vmat.InsertGlobalValues (i, 1, &V.trilinos_vector()[0][i], &i);
        Vmat.FillComplete();
        Vmat.OptimizeStorage();
 

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.