From: Daniel Arndt Date: Thu, 13 Jul 2023 02:56:34 +0000 (-0400) Subject: Fix some more X-Git-Tag: relicensing~673^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97ca85eeccf08a0c670ab0986292a18ca1a351e2;p=dealii.git Fix some more --- 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;