]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to DataOut to force users to use block vectors for non-contiguous indexsets 12641/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 10 Aug 2021 19:18:02 +0000 (21:18 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 10 Aug 2021 19:18:02 +0000 (21:18 +0200)
include/deal.II/numerics/data_out_dof_data.templates.h

index 17cfd07cb9efa8067f8e9e4042c0bc58ccce1cc7..62cc452aded2e13731597bc7d9586047b6fedb43 100644 (file)
@@ -866,6 +866,12 @@ namespace internal
                         const VectorType &               src,
                         LinearAlgebra::distributed::BlockVector<Number> &dst)
       {
+        Assert(dof_handler.locally_owned_dofs().is_contiguous(),
+               ExcMessage(
+                 "You are trying to add a non-block vector with non-contiguous "
+                 "locally-owned index sets. This is not possible. Please "
+                 "consider to use an adequate block vector!"));
+
         IndexSet locally_relevant_dofs;
         DoFTools::extract_locally_relevant_dofs(dof_handler,
                                                 locally_relevant_dofs);

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.