From ce0aa1cf94f9cc254136b48fa9e43f42d6b689b0 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Thu, 17 Sep 2020 05:42:41 -0700 Subject: [PATCH] Fix compile errors --- vtkm/filter/ContourTreeUniformDistributed.hxx | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/vtkm/filter/ContourTreeUniformDistributed.hxx b/vtkm/filter/ContourTreeUniformDistributed.hxx index 3468650f1..0fe78fef5 100644 --- a/vtkm/filter/ContourTreeUniformDistributed.hxx +++ b/vtkm/filter/ContourTreeUniformDistributed.hxx @@ -59,7 +59,7 @@ // single-node augmented contour tree includes #include #include -#include +#include // distributed contour tree includes #include @@ -105,7 +105,7 @@ struct PostExecuteCaller //----------------------------------------------------------------------------- ContourTreeUniformDistributed::ContourTreeUniformDistributed(bool useMarchingCubes) - : vtkm::filter::FilterCell() + : vtkm::filter::FilterField() , UseMarchingCubes(useMarchingCubes) , MultiBlockTreeHelper(nullptr) { @@ -146,14 +146,11 @@ vtkm::cont::DataSet ContourTreeUniformDistributed::DoExecute( throw vtkm::cont::ErrorFilterExecution("Point field expected."); } - // Use the GetRowsColsSlices struct defined in the header to collect the nRows, nCols, and nSlices information - vtkm::worklet::ContourTreeAugmented worklet; - vtkm::Id nRows; - vtkm::Id nCols; - vtkm::Id nSlices = 1; + // Get mesh size + vtkm::Id3 meshSize; const auto& cells = input.GetCellSet(); vtkm::filter::ApplyPolicyCellSet(cells, policy, *this) - .CastAndCall(vtkm::worklet::contourtree_augmented::GetRowsColsSlices(), nRows, nCols, nSlices); + .CastAndCall(vtkm::worklet::contourtree_augmented::GetPointDimensions(), meshSize); // TODO blockIndex needs to change if we have multiple blocks per MPI rank and DoExecute is called for multiple blocks std::size_t blockIndex = 0; @@ -161,15 +158,14 @@ vtkm::cont::DataSet ContourTreeUniformDistributed::DoExecute( unsigned int compRegularStruct = 1; // Run the worklet + vtkm::worklet::ContourTreeAugmented worklet; worklet.Run(field, MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalContourTrees[blockIndex] : this->ContourTreeData, MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalSortOrders[blockIndex] : this->MeshSortOrder, this->NumIterations, - nRows, - nCols, - nSlices, + meshSize, this->UseMarchingCubes, compRegularStruct); @@ -281,7 +277,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute( // create the local data block structure localDataBlocks[bi] = new vtkm::worklet::contourtree_distributed::ContourTreeBlockData(); localDataBlocks[bi]->NumVertices = currContourTreeMesh->NumVertices; - localDataBlocks[bi]->SortOrder = currContourTreeMesh->SortOrder; + // FIXME: Commented out to avoid compile error, full fix to follow in subsequent merge request + // localDataBlocks[bi]->SortOrder = currContourTreeMesh->SortOrder; localDataBlocks[bi]->SortedValue = currContourTreeMesh->SortedValues; localDataBlocks[bi]->GlobalMeshIndex = currContourTreeMesh->GlobalMeshIndex; localDataBlocks[bi]->Neighbours = currContourTreeMesh->Neighbours; @@ -377,7 +374,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute( // Construct the contour tree mesh from the last block vtkm::worklet::contourtree_augmented::ContourTreeMesh contourTreeMeshOut; contourTreeMeshOut.NumVertices = localDataBlocks[0]->NumVertices; - contourTreeMeshOut.SortOrder = localDataBlocks[0]->SortOrder; + // FIXME: Commented out to avoid compile error, full fix to follow in subsequent merge request + // contourTreeMeshOut.SortOrder = localDataBlocks[0]->SortOrder; contourTreeMeshOut.SortedValues = localDataBlocks[0]->SortedValue; contourTreeMeshOut.GlobalMeshIndex = localDataBlocks[0]->GlobalMeshIndex; contourTreeMeshOut.Neighbours = localDataBlocks[0]->Neighbours; @@ -390,10 +388,7 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute( maxIdx[1] = maxIdx[1] - 1; maxIdx[2] = maxIdx[2] > 0 ? (maxIdx[2] - 1) : 0; auto meshBoundaryExecObj = contourTreeMeshOut.GetMeshBoundaryExecutionObject( - this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize[0], - this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize[1], - minIdx, - maxIdx); + this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize, minIdx, maxIdx); // Run the worklet to compute the final contour tree worklet.Run( contourTreeMeshOut.SortedValues, // Unused param. Provide something to keep API happy