Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 19b3b8a8 authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

Setting the wrong max_level following a debugging session

parent 163488ff
No related branches found
No related tags found
No related merge requests found
......@@ -264,7 +264,7 @@ namespace scalfmm::utils
std::copy(array.begin(), array.end(), tmp_array);
constexpr static const std::size_t dimension = points_type::dimension;
//
const std::size_t max_level = 2; //sizeof(morton_type) * 8 / dimension - 1;
const std::size_t max_level = sizeof(morton_type) * 8 / dimension - 1;
using pair_type = std::pair<morton_type, int>;
std::vector<pair_type> tosort(nbParticles);
#pragma omp parallel for shared(tosort, nbParticles, box, max_level, array)
......@@ -275,7 +275,7 @@ namespace scalfmm::utils
tosort[i].second = i;
}
std::sort(tosort.begin(), tosort.end(), [&](pair_type& a, pair_type& b) { return (a.first > b.first); });
std::sort(tosort.begin(), tosort.end(), [&](pair_type& a, pair_type& b) { return (a.first < b.first); });
//
// We fill the sorted array
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment