7 typename Tree::Settings settings;
8 settings.candidatePlaneSet = AdaptiveKDTree::SUBDIVISION;
13 result = pc.get_part_entities( local_ents, 3 );
14 else local_ents = range;
16 if(
MB_SUCCESS != result || local_ents.empty() )
18 std::cout <<
"Problems getting source entities" << std::endl;
23 for(
int i = 0; i < num_iterations; i++ )
26 result =
true.build_tree( local_ents, local_root, &settings );
29 std::cout <<
"Problems building tree";
30 if( num_iterations != i )
32 settings.maxEntPerLeaf *= 2;
33 std::cout <<
"; increasing elements/leaf to " << settings.maxEntPerLeaf << std::endl;
38 std::cout <<
"; exiting" << std::endl;
46 boxes.resize( 6 * pc.proc_config().proc_size() );
48 unsigned int rank = ( pc ? pc.proc_config().proc_rank() : 0 );
49 result = tree.get_tree_box( local_root, &boxes[6 * rank], &boxes[6 * rank + 3] );
57 MPI_Allgather( MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, &boxes[0], 6, MPI_DOUBLE, pc.proc_config().proc_comm() );
58 if( MPI_SUCCESS != mpi_err )
return MB_FAILURE;
62 double min[3] = { 0, 0, 0 }, max[3] = { 0, 0, 0 };
64 tree.get_info( local_root, min, max, dep );
65 std::cerr <<
"Proc " << rank <<
": box min/max, tree depth = (" << min[0] <<
"," << min[1] <<
"," << min[2]
66 <<
"), (" << max[0] <<
"," << max[1] <<
"," << max[2] <<
"), " << dep << std::endl;