浏览代码

mpi_tree.txx: bug fix in tree construction

bug fix in  MPI_Tree::Initialize(...) for very small number of initial points.
Dhairya Malhotra 11 年之前
父节点
当前提交
00aadaf6ee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/mpi_tree.txx

+ 1 - 1
include/mpi_tree.txx

@@ -268,7 +268,7 @@ void MPI_Tree<TreeNode>::Initialize(typename Node_t::NodeData* init_data){
 
 
       size_t idx=a;
       size_t idx=a;
       Node_t* n=FindNode(lin_oct[idx], false);
       Node_t* n=FindNode(lin_oct[idx], false);
-      if(i==0) n=rnode;
+      if(a==0) n=rnode;
       while(n!=NULL && (idx<b || i==omp_p-1)){
       while(n!=NULL && (idx<b || i==omp_p-1)){
         n->SetGhost(false);
         n->SetGhost(false);
         MortonId dn=n->GetMortonId();
         MortonId dn=n->GetMortonId();