]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MGTransferGlobalCoarsening: add assert 11873/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 9 Mar 2021 07:39:42 +0000 (08:39 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 9 Mar 2021 20:08:40 +0000 (21:08 +0100)
include/deal.II/multigrid/mg_transfer_global_coarsening.h

index ea86730e573e4de9c129535807689fd953615e99..aaf96ed803779d384ec783af1e1b1adf57f89239 100644 (file)
@@ -481,6 +481,13 @@ MGTransferGlobalCoarsening<dim, VectorType>::copy_to_mg(
 {
   (void)dof_handler;
 
+  Assert(
+    initialize_dof_vector,
+    ExcMessage(
+      "To be able to use this function, a function to initialize an internal "
+      "DoF vector has to be provided in the constructor of "
+      "MGTransferGlobalCoarsening."));
+
   for (unsigned int level = dst.min_level(); level <= dst.max_level(); ++level)
     initialize_dof_vector(level, dst[level]);
 
@@ -514,6 +521,13 @@ MGTransferGlobalCoarsening<dim, VectorType>::interpolate_to_mg(
 {
   (void)dof_handler;
 
+  Assert(
+    initialize_dof_vector,
+    ExcMessage(
+      "To be able to use this function, a function to initialize an internal "
+      "DoF vector has to be provided in the constructor of "
+      "MGTransferGlobalCoarsening."));
+
   const unsigned int min_level = transfer.min_level();
   const unsigned int max_level = transfer.max_level();
 

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.