From: wolf Date: Wed, 1 Mar 2000 09:36:44 +0000 (+0000) Subject: Add comment. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ea75e7827a4bc3c77902298f755e306719b5b1b;p=dealii-svn.git Add comment. git-svn-id: https://svn.dealii.org/trunk@2535 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_renumbering.cc b/deal.II/deal.II/source/dofs/dof_renumbering.cc index c939584423..2856331c4d 100644 --- a/deal.II/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/deal.II/source/dofs/dof_renumbering.cc @@ -163,7 +163,7 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler &dof_handler, continue; -// store for each coordination + // store for each coordination // number the dofs with these // coordination number multimap dofs_by_coordination; @@ -187,7 +187,9 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler &dof_handler, dofs_by_coordination.insert (new_entry); }; - //// + // assign new DoF numbers to + // the elements of the present + // front: multimap::iterator i; for (i = dofs_by_coordination.begin(); i!=dofs_by_coordination.end(); ++i) new_number[i->second] = next_free_number++; @@ -200,8 +202,25 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler &dof_handler, //TODO: Allow incomplete renumbering for non-discretization values #ifdef DEBUG - // test for all indices numbered - if (find (new_number.begin(), new_number.end(), DoFHandler::invalid_dof_index) != new_number.end()) + // test for all indices + // numbered. this mostly tests + // whether the + // front-marching-algorithm (which + // Cuthill-McKee actually is) has + // reached all points. it should + // usually do so, but might not for + // two reasons: + // + // - The algorithm above has a bug, or + // - The domain is not connected and + // consists of separate parts. + // + // In any case, if not all DoFs + // have been reached, renumbering + // will not be possible + if (find (new_number.begin(), new_number.end(), DoFHandler::invalid_dof_index) + != + new_number.end()) Assert (false, ExcRenumberingIncomplete()); Assert (next_free_number == n_dofs, ExcRenumberingIncomplete());