]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix bug in print_gnuplot.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 May 2000 16:24:48 +0000 (16:24 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 May 2000 16:24:48 +0000 (16:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@2975 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparsity_pattern.cc

index cd46bdf6f6d8d27f340b21b0d9ff876f6da2e551..03edb435b6516a79075970c15fff1b6fbb1f4edc 100644 (file)
@@ -556,7 +556,14 @@ SparsityPattern::print_gnuplot (ostream &out) const
   for (unsigned int i=0; i<rows; ++i)
     for (unsigned int j=rowstart[i]; j<rowstart[i+1]; ++j)
       if (colnums[j] != invalid_entry)
-       out << i << " " << -static_cast<signed int>(colnums[j]) << endl;
+                                        // while matrix entries are
+                                        // usually written (i,j),
+                                        // with i vertical and j
+                                        // horizontal, gnuplot output
+                                        // is x-y, that is we have to
+                                        // exchange the order of
+                                        // output
+       out << static_cast<signed int>(colnums[j]) << " " << -i << endl;
 
   AssertThrow (out, ExcIO());
 }

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.