]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check in forgotten hunk
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Dec 2006 14:09:35 +0000 (14:09 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Dec 2006 14:09:35 +0000 (14:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@14254 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/error_estimator.h

index 421583b0030eeb143edb22edb68265f7e2f15791..0c450fd7ef40489ec774deb2e324633d878d223b 100644 (file)
@@ -574,6 +574,15 @@ class KellyErrorEstimator
                                      * with and needs not allocate
                                      * memory itself, or synchronise
                                      * with other threads.
+                                     *
+                                     * The sizes of the arrays are
+                                     * initialized with the maximal number of
+                                     * entries necessary for the hp
+                                     * case. Within the loop over individual
+                                     * cells, we then resize the arrays as
+                                     * necessary. Since for std::vector
+                                     * resizing to a smaller size doesn't
+                                     * imply memory allocation, this is fast.
                                      */
     struct PerThreadData
     {
@@ -657,9 +666,15 @@ class KellyErrorEstimator
                                          */
        PerThreadData (const unsigned int n_solution_vectors,
                       const unsigned int n_components,
-                      const unsigned int n_q_points,
+                      const unsigned int max_n_q_points,
                        const unsigned int subdomain_id,
                        const unsigned int material_id);
+
+                                        /**
+                                         * Constructor.
+                                         */
+       void resize (const unsigned int n_components,
+                    const unsigned int max_n_q_points);
     };
 
 

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.