]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 12 Feb 2024 20:54:08 +0000 (13:54 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 12 Feb 2024 22:10:14 +0000 (15:10 -0700)
include/deal.II/lac/trilinos_tpetra_vector.h

index c5d134e2b5d8f000778f752cb24af8972bdbdf53..67bb9c42ee7dc57a4e4b5759ddc011ddaf1410fc 100644 (file)
@@ -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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.