]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Correct the computation of the chunk size.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 Jul 2008 12:48:46 +0000 (12:48 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 31 Jul 2008 12:48:46 +0000 (12:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@16463 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/chunk_sparsity_pattern.cc

index 07dcf829ca27017bfa13b28e8fadf8eb67aa39e6..8d86337a45f00d11995c2f9f762614af7929332e 100644 (file)
@@ -150,8 +150,8 @@ ChunkSparsityPattern::reinit (
                                   // (n/chunk_size). rounding up in integer
                                   // arithmetic equals
                                   // ((m+chunk_size-1)/chunk_size):
-  const unsigned int m_chunks = (m+chunk_size) / chunk_size,
-                    n_chunks = (n+chunk_size) / chunk_size;  
+  const unsigned int m_chunks = (m+chunk_size-1) / chunk_size,
+                    n_chunks = (n+chunk_size-1) / chunk_size;  
 
                                   // compute the maximum number of chunks in
                                   // each row. the passed array denotes the

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.