]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Create vector before assigning 8135/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 13 May 2019 22:52:18 +0000 (00:52 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 13 May 2019 22:52:18 +0000 (00:52 +0200)
source/lac/petsc_parallel_vector.cc

index da90e9ab772397b75f5529fbc636b7ae327af69d..69fcd3659386c2b70fe14c54fbba2abfaad26460 100644 (file)
@@ -87,7 +87,13 @@ namespace PETScWrappers
 
     Vector::Vector(const Vector &v)
       : VectorBase()
+      , communicator(v.communicator)
     {
+      if (v.has_ghost_elements())
+        Vector::create_vector(v.size(), v.local_size(), v.ghost_indices);
+      else
+        Vector::create_vector(v.size(), v.local_size());
+
       this->operator=(v);
     }
 

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.