]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fixed TrilinosWrappers::VectorBase::swap()
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jul 2012 15:50:48 +0000 (15:50 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jul 2012 15:50:48 +0000 (15:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@25668 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/lac/trilinos_vector_base.cc

index 49d651cd180413b52742b509c0d0a8038054c94b..3726271e73d707b710e18db7f0d778e4eddee86e 100644 (file)
@@ -248,6 +248,10 @@ enabled due to a missing include file in file
 <a name="specific"></a>
 <h3>Specific improvements</h3>
 
+<li> Fixed: TrilinosWrappers::VectorBase::swap() is now working as expected. (thanks Uwe Köcher)
+<br>
+(Timo Heister 2012/07/03)
+
 <li> Fixed: Some instantiations for
 DerivativeApproximation::approximate_derivative_tensor() were missing.
 <br>
index 5d8b6c6b942a07528c70ab4a70540a110c717660..afb660aa725acae7b2d694423f4c296c06f232a0 100644 (file)
@@ -402,13 +402,9 @@ namespace TrilinosWrappers
   void
   VectorBase::swap (VectorBase &v)
   {
-                                        // Just swap the pointers to
-                                        // the two Epetra vectors that
-                                        // hold all the data.
-    VectorBase *p_v = &v, *p_this = this;
-    VectorBase* tmp = p_v;
-    p_v = p_this;
-    p_this = tmp;
+    std::swap(last_action, v.last_action);
+    std::swap(compressed, v.compressed);
+    std::swap(vector, v.vector);
   }
 
 

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.