From: Wolfgang Bangerth Date: Mon, 12 Feb 2024 20:54:08 +0000 (-0700) Subject: Add an assertion. X-Git-Tag: relicensing~40^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd2e8f9a54a9efb7b4d2fe141d02bd82d12fbfbd;p=dealii.git Add an assertion. --- diff --git a/include/deal.II/lac/trilinos_tpetra_vector.h b/include/deal.II/lac/trilinos_tpetra_vector.h index c5d134e2b5..67bb9c42ee 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.h @@ -1003,6 +1003,10 @@ namespace LinearAlgebra const size_type *indices, const Number *values) { + // if we have ghost values, do not allow + // writing to this vector at all. + Assert(!has_ghost_elements(), ExcGhostsPresent()); + // First create an alias for the type of a view into our vectors. // The actual type is declared through several re-directions in // Tpetra, so instead of spelling it out, we get it via decltype: