From d038f4aa7a81ec998f48ec24d62ff5ca631cad57 Mon Sep 17 00:00:00 2001 From: Manu Jayadharan Date: Thu, 8 Aug 2019 16:54:11 -0400 Subject: [PATCH] modified grid_tools_cache to fix flag_update issues with some functions --- doc/news/changes/minor/20190808MJayadharan | 3 +++ source/grid/grid_tools_cache.cc | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 doc/news/changes/minor/20190808MJayadharan diff --git a/doc/news/changes/minor/20190808MJayadharan b/doc/news/changes/minor/20190808MJayadharan new file mode 100644 index 0000000000..8687a74214 --- /dev/null +++ b/doc/news/changes/minor/20190808MJayadharan @@ -0,0 +1,3 @@ +Debug: Fixed two functions in GridTools::Cache class (in source/grid/grid_tools_cache.cc), namely get_used_vertices_rtree() and get_cell_bounding_boxes_rtree where the update flag were not cleared. Fixed that by adding a line to both functions at the end of if loop checking the flag. +
+(Manu Jayadharan, 2019/08/08) diff --git a/source/grid/grid_tools_cache.cc b/source/grid/grid_tools_cache.cc index ab080da397..dc945de8c6 100644 --- a/source/grid/grid_tools_cache.cc +++ b/source/grid/grid_tools_cache.cc @@ -114,6 +114,7 @@ namespace GridTools for (const auto &it : used_vertices) vertices[i++] = std::make_pair(it.second, it.first); used_vertices_rtree = pack_rtree(vertices); + update_flags = update_flags & ~update_used_vertices_rtree; } return used_vertices_rtree; } @@ -137,6 +138,7 @@ namespace GridTools boxes[i++] = std::make_pair(mapping->get_bounding_box(cell), cell); cell_bounding_boxes_rtree = pack_rtree(boxes); + update_flags = update_flags & ~update_cell_bounding_boxes_rtree; } return cell_bounding_boxes_rtree; } -- 2.39.5