]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in reverse Cuthill-McKee code (found by Oliver Rheinbach).
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Apr 2001 07:03:42 +0000 (07:03 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Apr 2001 07:03:42 +0000 (07:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@4446 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_renumbering.cc
deal.II/doc/news/2001/3.1.0-vs-3.1.1.html
deal.II/doc/news/2001/c-3-1.html

index f6d155ede6647356ebcc156994a87057307f8873..d7e051001e96ef648576d1d2d6ce7afbdf30bb46 100644 (file)
@@ -252,8 +252,9 @@ void DoFRenumbering::Cuthill_McKee (DoFHandler<dim>                 &dof_handler
 #endif
 
   if (reversed_numbering)
-    for (std::vector<unsigned int>::iterator i=new_number.begin(); i!=new_number.end(); ++i)
-      *i = n_dofs-*i;
+    for (std::vector<unsigned int>::iterator i=new_number.begin();
+        i!=new_number.end(); ++i)
+      *i = n_dofs-*i-1;
 
                                   // actually perform renumbering;
                                   // this is dimension specific and
index 0ca26461b1da6bdaa53c3dfc29b68de91c52375c..c8a343f19be72eb78e9c8f60ea7a0db2a7db320c 100644 (file)
 <h2>Changes between versions 3.1 and 3.1.1</h2>
 
 <ol>
+  <li> <p>
+       Fixed: the <code
+       class="member">DoFRenumbering::Cuthill_McKee</code> function
+       did not work correctly when giving the <code
+       class="member">reversed_numbering</code> flag (off-by-one
+       indexing). This is now fixed.
+       <br>
+       (<a href="mailto:or@winfos.com">Oliver Rheinbach</a> 2001/04/12)
+       </p>
+       
   <li> <p>
        Fixed: When using Neuman boundary functions in the 
        <code class="class">KellyErrorEstimator</code> class, it was
index 708a0360b5367308f63697cdaed44a9230cd785e..e3b4d935f9ee0fac7d2eceb5d09433b6089ac064 100644 (file)
@@ -317,6 +317,16 @@ documentation, etc</a>.
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p>
+       Fixed: the <code
+       class="member">DoFRenumbering::Cuthill_McKee</code> function
+       did not work correctly when giving the <code
+       class="member">reversed_numbering</code> flag (off-by-one
+       indexing). This is now fixed.
+       <br>
+       (<a href="mailto:or@winfos.com">Oliver Rheinbach</a> 2001/04/12)
+       </p>
+       
   <li> <p>
        Changed: A <code class="class">typedef FunctionMap</code> was
        declared in at least four places previously (in classes <code

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.