From 97ca85eeccf08a0c670ab0986292a18ca1a351e2 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 12 Jul 2023 22:56:34 -0400 Subject: [PATCH] Fix some more --- include/deal.II/lac/sparse_matrix_tools.h | 2 +- include/deal.II/lac/vector.templates.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/sparse_matrix_tools.h b/include/deal.II/lac/sparse_matrix_tools.h index b7dbfa7de3..b355c6c954 100644 --- a/include/deal.II/lac/sparse_matrix_tools.h +++ b/include/deal.II/lac/sparse_matrix_tools.h @@ -343,7 +343,7 @@ namespace SparseMatrixTools SparseMatrixType2 & system_matrix_out, SparsityPatternType2 &sparsity_pattern_out) { - Assert(index_set_1.empty() || index_set_0.size() == index_set_1.size(), + Assert(index_set_1.size() || index_set_0.size() == index_set_1.size(), ExcInternalError()); auto index_set_1_cleared = index_set_1; diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index ede5ac761f..52cba5a014 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -87,7 +87,7 @@ namespace internal copy_petsc_vector(const PETScWrappers::VectorBase &v, ::dealii::Vector & out) { - if (v.empty()) + if (v.size() == 0) { out.reinit(0); return; -- 2.39.5