From: heister Date: Tue, 3 Jul 2012 15:50:48 +0000 (+0000) Subject: fixed TrilinosWrappers::VectorBase::swap() X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a799cd7fec61eb01e329f1aafb08d26991837c0;p=dealii-svn.git fixed TrilinosWrappers::VectorBase::swap() git-svn-id: https://svn.dealii.org/trunk@25668 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 49d651cd18..3726271e73 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -248,6 +248,10 @@ enabled due to a missing include file in file

Specific improvements

+
  • Fixed: TrilinosWrappers::VectorBase::swap() is now working as expected. (thanks Uwe Köcher) +
    +(Timo Heister 2012/07/03) +
  • Fixed: Some instantiations for DerivativeApproximation::approximate_derivative_tensor() were missing.
    diff --git a/deal.II/source/lac/trilinos_vector_base.cc b/deal.II/source/lac/trilinos_vector_base.cc index 5d8b6c6b94..afb660aa72 100644 --- a/deal.II/source/lac/trilinos_vector_base.cc +++ b/deal.II/source/lac/trilinos_vector_base.cc @@ -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); }