]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Small fix for greater felxibility.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Nov 1998 13:19:39 +0000 (13:19 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Nov 1998 13:19:39 +0000 (13:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@672 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/base.cc

index de0e78a65b14fafd3bdd326b5631462ae68e4938..f286ffced1280ed859d9fa390f8bcae9bff9c72a 100644 (file)
@@ -40,8 +40,14 @@ void ProblemBase<dim>::set_tria_and_dof (Triangulation<dim> *t,
   tria        = t;
   dof_handler = d;
 
-  Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected());
-  Assert (tria == &dof_handler->get_tria(), ExcDofAndTriaDontMatch());
+                                  // allow a user to reset both tria and
+                                  // dof to null pointers, but don't allow
+                                  // something other
+  if ((tria != 0) || (dof_handler != 0))
+    {
+      Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected());
+      Assert (tria == &dof_handler->get_tria(), ExcDofAndTriaDontMatch());
+    };
 };
 
 

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.