]> https://gitweb.dealii.org/ - dealii.git/commitdiff
memory bug removed
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 27 Jun 2001 12:34:30 +0000 (12:34 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 27 Jun 2001 12:34:30 +0000 (12:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@4764 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/legendre.cc

index 81c74a4a418e2baa118a2cbbf5434ca9a5fd4689..4fbf97ceb36bb0eb47843811340e18bb074b95a8 100644 (file)
@@ -36,13 +36,16 @@ namespace
 
 template <typename number>
 void
-Legendre<number>::compute_coefficients (const unsigned int k)
+Legendre<number>::compute_coefficients (unsigned int k)
 {
                                   // first make sure that no other
                                   // thread intercepts the operation
                                   // of this function
   coefficients_lock.acquire ();
 
+                                  // The first 2 coefficients are hard-coded
+  if (k==0)
+    k=1;
                                   // check: does the information
                                   // already exist?
   if ((coefficients.size() < k+1) ||

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.