]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid Epetra_MultiVector with 0 vectors
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Jun 2014 11:50:56 +0000 (11:50 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Jun 2014 11:50:56 +0000 (11:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@33102 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/trilinos_precondition.cc

index 4c42b28e7875b6fd3399654481eeb7ed8c617d7c..e4db7d8632d07e46aae86a140065c38a36c61a20 100644 (file)
@@ -608,7 +608,8 @@ namespace TrilinosWrappers
     const size_type constant_modes_dimension =
       additional_data.constant_modes.size();
     Epetra_MultiVector distributed_constant_modes (domain_map,
-                                                   constant_modes_dimension);
+                                                   constant_modes_dimension > 0 ?
+                                                   constant_modes_dimension : 1);
     std::vector<double> dummy (constant_modes_dimension);
 
     if (constant_modes_dimension > 0)

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.