]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move the call to update_number_cache() after all other calls. 8732/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 10 Sep 2019 21:06:05 +0000 (15:06 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 10 Sep 2019 21:06:05 +0000 (15:06 -0600)
Conceptually, this function (as its name suggests) just updates a cache. We should
call it after all other functions that change things in the triangulation have
been called, even if the order does not matter in a particular context. This just
makes reading the code simpler.

source/distributed/tria.cc

index b12a32101b98ba536b560ada1b9295b38b2c304e..aef7015732c32b8efca999cae9ccaee645ae7252 100644 (file)
@@ -2209,8 +2209,8 @@ namespace parallel
           Assert(false, ExcInternalError());
         }
 
-      this->update_number_cache();
       this->update_periodic_face_map();
+      this->update_number_cache();
     }
 
 
@@ -2853,12 +2853,11 @@ namespace parallel
             }
         }
 
+      this->update_periodic_face_map();
       this->update_number_cache();
 
       // signal that de-serialization is finished
       this->signals.post_distributed_load();
-
-      this->update_periodic_face_map();
     }
 
 
@@ -4056,9 +4055,8 @@ namespace parallel
         }
 #  endif
 
-      this->update_number_cache();
-
       this->update_periodic_face_map();
+      this->update_number_cache();
 
       // signal that refinement is finished
       this->signals.post_distributed_refinement();
@@ -4158,11 +4156,11 @@ namespace parallel
                                          previous_global_first_quadrant.data());
         }
 
+      this->update_periodic_face_map();
+
       // update how many cells, edges, etc, we store locally
       this->update_number_cache();
 
-      this->update_periodic_face_map();
-
       // signal that repartitioning is finished
       this->signals.post_distributed_repartition();
     }
@@ -4843,8 +4841,8 @@ namespace parallel
           Assert(false, ExcInternalError());
         }
 
-      this->update_number_cache();
       this->update_periodic_face_map();
+      this->update_number_cache();
     }
 
 

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.