From ed61b4e1c5c88ec52efa5f52bcb3923b02841bd1 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 28 Jul 2015 13:53:44 -0400 Subject: [PATCH] more stl fixes --- source/lac/trilinos_sparse_matrix.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 66bc09313b..76e0f505e8 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -663,14 +663,15 @@ namespace TrilinosWrappers n_entries_per_ghost_row.push_back(1); } - Epetra_Map off_processor_map(-1, ghost_rows.size(), &ghost_rows[0], + Epetra_Map off_processor_map(-1, ghost_rows.size(), + (ghost_rows.size()>0)?(&ghost_rows[0]):NULL, 0, input_row_map.Comm()); std_cxx11::shared_ptr graph, nonlocal_graph; if (input_row_map.Comm().NumProc() > 1) { graph.reset (new Epetra_CrsGraph (Copy, input_row_map, - &n_entries_per_row[0], + (n_entries_per_row.size()>0)?(&n_entries_per_row[0]):NULL, exchange_data ? false : true)); if (have_ghost_rows == true) nonlocal_graph.reset (new Epetra_CrsGraph (Copy, off_processor_map, @@ -679,7 +680,8 @@ namespace TrilinosWrappers } else graph.reset (new Epetra_CrsGraph (Copy, input_row_map, input_col_map, - &n_entries_per_row[0], true)); + (n_entries_per_row.size()>0)?(&n_entries_per_row[0]):NULL, + true)); // now insert the indices, select between the right matrix std::vector row_indices; @@ -1522,7 +1524,7 @@ namespace TrilinosWrappers // TODO: this could lead to a dead lock when only one processor // calls GlobalAssemble. ierr = matrix->GlobalAssemble(*column_space_map, - row_partitioner(), false); + matrix->RowMap(), false); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); } -- 2.39.5