]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Implement TrilinosWrappers::BlockVector::swap for different block sizes
authorMatthias Maier <tamiko@43-1.org>
Mon, 4 May 2015 08:19:41 +0000 (10:19 +0200)
committerMatthias Maier <tamiko@43-1.org>
Mon, 4 May 2015 11:46:25 +0000 (13:46 +0200)
include/deal.II/lac/trilinos_parallel_block_vector.h

index 9539aef1db16674a54ad51afc354650a6dcb2407..3392bd4a986d93db11894a4ee6f7d1c5bf96e572 100644 (file)
@@ -468,11 +468,9 @@ namespace TrilinosWrappers
     void
     BlockVector::swap (BlockVector &v)
     {
-      Assert (n_blocks() == v.n_blocks(),
-              ExcDimensionMismatch(n_blocks(),v.n_blocks()));
+      std::swap(this->components, v.components);
 
-      for (unsigned int row=0; row<n_blocks(); ++row)
-        block(row).swap (v.block(row));
+      dealii::swap(this->block_indices, v.block_indices);
     }
 
 

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.