From ec1a3e3ac5900bab755fb24a475dbb75787e33a3 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 6 Jan 2024 22:25:53 +0100 Subject: [PATCH] Fix TrilinosWrappers::SparsityPattern::Accessor::visit_present_row() --- source/lac/trilinos_sparsity_pattern.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index dbbdce76b7..89aea89693 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -39,7 +39,8 @@ namespace TrilinosWrappers { // if we are asked to visit the past-the-end line, then simply // release all our caches and go on with life - if (this->a_row == sparsity_pattern->n_rows()) + if (this->a_row == sparsity_pattern->n_rows() || + (sparsity_pattern->in_local_range(this->a_row) == false)) { colnum_cache.reset(); return; -- 2.39.5