Parcourir la source

Fix bug in child list

Dhairya Malhotra il y a 5 ans
Parent
commit
3b40383710
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/libtree.cpp

+ 1 - 1
src/libtree.cpp

@@ -29,7 +29,7 @@ template <class Real, Integer DIM> class ParticleTreeWrapper {
         node_ghost_[i] = node_attr_[i].Ghost;
         node_leaf_ [i] = node_attr_[i].Leaf;
         parent_lst_[i] = -1;
-        child_lst_ [i] = -1;
+        for (Integer j = 0; j < MAX_CHILD; j++) child_lst_[i*MAX_CHILD+j] = -1;
       }
       for (Long i = 0; i < Nnodes; i++) { // Set parent_lst, child_lst_
         Integer depth = node_mid_[i].Depth();