Skip to content
Snippets Groups Projects
Commit ea7e75bb authored by Tom Fischer's avatar Tom Fischer
Browse files

Using new quicksort impl.

parent a7973a28
No related branches found
No related tags found
No related merge requests found
/** /**
* \file
* \author Thomas Fischer
* \date Nov 1, 2012
* \brief Implementation of the createMeshElemPropertiesFromASCRaster tool. * \brief Implementation of the createMeshElemPropertiesFromASCRaster tool.
* *
* \copyright * \copyright
...@@ -178,7 +175,7 @@ int main (int argc, char* argv[]) ...@@ -178,7 +175,7 @@ int main (int argc, char* argv[])
std::vector<std::size_t> src_perm(size); std::vector<std::size_t> src_perm(size);
std::iota(src_perm.begin(), src_perm.end(), 0); std::iota(src_perm.begin(), src_perm.end(), 0);
BaseLib::Quicksort<double>(src_properties, 0, size, src_perm); BaseLib::quicksort<double>(src_properties, 0, size, src_perm);
// compress the property data structure // compress the property data structure
const std::size_t mat_map_size(src_properties.size()); const std::size_t mat_map_size(src_properties.size());
...@@ -241,7 +238,7 @@ int main (int argc, char* argv[]) ...@@ -241,7 +238,7 @@ int main (int argc, char* argv[])
if (! out_mesh_arg.getValue().empty()) { if (! out_mesh_arg.getValue().empty()) {
std::vector<std::size_t> dest_perm(n_dest_mesh_elements); std::vector<std::size_t> dest_perm(n_dest_mesh_elements);
std::iota(dest_perm.begin(), dest_perm.end(), 0); std::iota(dest_perm.begin(), dest_perm.end(), 0);
BaseLib::Quicksort<double>(dest_properties, 0, n_dest_mesh_elements, dest_perm); BaseLib::quicksort<double>(dest_properties, 0, n_dest_mesh_elements, dest_perm);
// reset materials in destination mesh // reset materials in destination mesh
for (std::size_t k(0); k<n_dest_mesh_elements; k++) { for (std::size_t k(0); k<n_dest_mesh_elements; k++) {
......
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