From 1eb6d9a2e923142b5fdfc72b6a1a20b6333176a8 Mon Sep 17 00:00:00 2001
From: Jaswant Panchumarti <jaswant.panchumarti@kitware.com>
Date: Tue, 28 Jan 2025 13:20:41 -0500
Subject: [PATCH] diy: update vendored version to e5f2edf6f

- this commit is slightly ahead of 3.6.0
---
 Filters/ParallelDIY2/vtkDIYKdTreeUtilities.cxx   | 2 +-
 Filters/ParallelDIY2/vtkPResampleToImage.cxx     | 4 ++--
 Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx | 4 ++--
 ThirdParty/diy2/CMakeLists.txt                   | 8 ++++----
 ThirdParty/diy2/update.sh                        | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Filters/ParallelDIY2/vtkDIYKdTreeUtilities.cxx b/Filters/ParallelDIY2/vtkDIYKdTreeUtilities.cxx
index f3f48939d4a..cdbdea29f94 100644
--- a/Filters/ParallelDIY2/vtkDIYKdTreeUtilities.cxx
+++ b/Filters/ParallelDIY2/vtkDIYKdTreeUtilities.cxx
@@ -263,7 +263,7 @@ std::vector<vtkBoundingBox> vtkDIYKdTreeUtilities::GenerateCuts(
       }
       else
       {
-        block->BlockBounds.resize(srp.in_link().size());
+        block->BlockBounds.resize(srp.in_link().size(), diy::ContinuousBounds(0));
         for (int i = 0; i < srp.in_link().size(); ++i)
         {
           assert(i == srp.in_link().target(i).gid);
diff --git a/Filters/ParallelDIY2/vtkPResampleToImage.cxx b/Filters/ParallelDIY2/vtkPResampleToImage.cxx
index 1227e1b273d..d91d9cc6474 100644
--- a/Filters/ParallelDIY2/vtkPResampleToImage.cxx
+++ b/Filters/ParallelDIY2/vtkPResampleToImage.cxx
@@ -337,8 +337,8 @@ void Redistribute(
   unsigned round = srp.round();
 
   // step 1: dequeue all the incoming points and add them to this block's vector
-  diy::Master::IncomingQueues& in = *srp.incoming();
-  for (diy::Master::IncomingQueues::iterator i = in.begin(); i != in.end(); ++i)
+  auto& in = *srp.incoming();
+  for (diy::Master::Proxy::IncomingQueues::iterator i = in.begin(); i != in.end(); ++i)
   {
     while (i->second)
     {
diff --git a/Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx b/Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx
index 2bdf15e3632..e3e2c9d0fd3 100644
--- a/Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx
+++ b/Filters/ParallelDIY2/vtkPResampleWithDataSet.cxx
@@ -1008,8 +1008,8 @@ void ReceiveResampledPoints(
   int numBlocks = static_cast<int>(block->InputBlocks.size());
   std::vector<std::map<std::string, int>> arrayReceiveCounts(numBlocks);
 
-  diy::Master::IncomingQueues& in = *cp.incoming();
-  for (diy::Master::IncomingQueues::iterator i = in.begin(); i != in.end(); ++i)
+  auto& in = *cp.incoming();
+  for (diy::Master::Proxy::IncomingQueues::iterator i = in.begin(); i != in.end(); ++i)
   {
     if (!i->second)
     {
diff --git a/ThirdParty/diy2/CMakeLists.txt b/ThirdParty/diy2/CMakeLists.txt
index eae31764943..0ba823361d2 100644
--- a/ThirdParty/diy2/CMakeLists.txt
+++ b/ThirdParty/diy2/CMakeLists.txt
@@ -8,9 +8,9 @@ vtk_module_third_party_internal(
   SPDX_COPYRIGHT_TEXT
     "Copyright (c) 2015, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy)"
   SPDX_DOWNLOAD_LOCATION
-    "git+https://gitlab.kitware.com/third-party/diy2.git@for/vtk-20210721-gd6d04d0d"
+    "git+https://gitlab.kitware.com/third-party/diy2.git@for/vtk-20250128-3.6.0-1"
   VERSION
-    "3.5.0"
+    "3.6.0"
 )
 
 if (TARGET VTK::mpi)
@@ -18,9 +18,9 @@ if (TARGET VTK::mpi)
     INTERFACE
       VTK::mpi)
 
-  set(DIY_NO_MPI FALSE)
+  vtk_module_definitions(VTK::diy2 INTERFACE DIY_HAS_MPI=1)
 else ()
-  set(DIY_NO_MPI TRUE)
+  vtk_module_definitions(VTK::diy2 INTERFACE DIY_HAS_MPI=0)
 endif ()
 
 configure_file(
diff --git a/ThirdParty/diy2/update.sh b/ThirdParty/diy2/update.sh
index 3f729ee4916..91e87cea0fb 100755
--- a/ThirdParty/diy2/update.sh
+++ b/ThirdParty/diy2/update.sh
@@ -8,7 +8,7 @@ readonly name="diy2"
 readonly ownership="Diy2 Upstream <kwrobot@kitware.com>"
 readonly subtree="ThirdParty/$name/vtk$name"
 readonly repo="https://gitlab.kitware.com/third-party/diy2.git"
-readonly tag="for/vtk-20240229-gd6d04d0d"
+readonly tag="for/vtk-20250203-0cde57f9b"
 readonly paths="
 .gitattributes
 CMakeLists.vtk.txt
-- 
GitLab