From 1a2cc53cafe42ebbeef1109a13c6277f1c4d0725 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 5 Aug 2015 10:47:01 +0200 Subject: [PATCH] Fix bug --- include/deal.II/lac/trilinos_sparse_matrix.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/deal.II/lac/trilinos_sparse_matrix.h b/include/deal.II/lac/trilinos_sparse_matrix.h index bfc51149a1..e47e8f513e 100644 --- a/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_sparse_matrix.h @@ -2551,6 +2551,9 @@ namespace TrilinosWrappers SparseMatrix::size_type SparseMatrix::n () const { + // If the matrix structure has not been fixed (i.e., we did not have a + // sparsity pattern), it does not know about the number of columns so we + // must always take this from the additional column space map Assert(column_space_map.get() != 0, ExcInternalError()); #ifndef DEAL_II_WITH_64BIT_INDICES return column_space_map->NumGlobalElements(); -- 2.39.5