From: bangerth Date: Sat, 18 Oct 2008 04:01:20 +0000 (+0000) Subject: When reinit-ing vectors, do not assume that we should create a new equidistributed... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=209e715966a53921b6359f46e1d4176e31e95617;p=dealii-svn.git When reinit-ing vectors, do not assume that we should create a new equidistributed map but actually copy the Epetra_Map of the base vector. git-svn-id: https://svn.dealii.org/trunk@17273 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/trilinos_vector.cc b/deal.II/lac/source/trilinos_vector.cc index 5e4ad408fe..caa5d8d56f 100755 --- a/deal.II/lac/source/trilinos_vector.cc +++ b/deal.II/lac/source/trilinos_vector.cc @@ -118,7 +118,10 @@ namespace TrilinosWrappers { vector.reset(); if (map.SameAs(v.vector->Map()) == false) - map = Epetra_Map(v.vector->GlobalLength(),0,v.vector->Comm()); + map = Epetra_Map(v.vector->Map().NumGlobalElements(), + v.vector->Map().NumMyElements(), + v.vector->Map().IndexBase(), + v.vector->Map().Comm()); vector = std::auto_ptr (new Epetra_FEVector(map)); last_action = Zero;