]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use deprecated reinit function. 3758/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 10 Jan 2017 02:21:15 +0000 (21:21 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 10 Jan 2017 02:21:15 +0000 (21:21 -0500)
include/deal.II/lac/trilinos_vector.h

index 9196b94e66838964e944b8bad2e5143ec7df63b3..71f130ad18f9a147d67b5d4213b66c8861909c6f 100644 (file)
@@ -718,7 +718,14 @@ namespace TrilinosWrappers
                                             )));
         }
 
-      reinit (vector_partitioner(), v);
+      const Epetra_Map &map = vector_partitioner();
+      const int size = map.NumMyElements();
+
+      // Need to copy out values, since the deal.II might not use doubles, so
+      // that a direct access is not possible.
+      for (int i=0; i<size; ++i)
+        (*vector)[0][i] = v(gid(map,i));
+
       return *this;
     }
 

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.