From 3ae15ee8d82320d9b4283f474c1fbb87954635f8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 10 Mar 1999 14:27:22 +0000 Subject: [PATCH] Fix one of the probably oldest oversights in deal.II. It did not much harm though, and went through unnoticed (though it throws an exception!) because it only shows up when trying to renumber the degrees of freedom on a grid that consists of a single cell only. git-svn-id: https://svn.dealii.org/trunk@987 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_handler.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index 88928fd737..074bd35434 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -1609,12 +1609,16 @@ void DoFHandler::renumber_dofs (const RenumberingMethod method, for (int row=0; row::renumber_dofs (const RenumberingMethod method, starting_point = row; }; }; + + // now we still have to care for the + // case that no dof has a coordination + // number less than n_dofs. this rather + // exotic case only happens if we only + // have one cell, as far as I can see, + // but there may be others as well. + // + // if that should be the case, we can + // chose an arbitrary dof as starting + // point, e.g. the one with number zero + if (starting_point == -1) + starting_point = 0; + // initialize the first dof last_round_dofs.push_back (starting_point); }; -- 2.39.5