Fix compile errors

This commit is contained in:
Gunther H. Weber 2020-09-17 05:42:41 -07:00
parent edd71539c9
commit ce0aa1cf94

@ -59,7 +59,7 @@
// single-node augmented contour tree includes // single-node augmented contour tree includes
#include <vtkm/filter/ContourTreeUniformDistributed.h> #include <vtkm/filter/ContourTreeUniformDistributed.h>
#include <vtkm/worklet/ContourTreeUniformAugmented.h> #include <vtkm/worklet/ContourTreeUniformAugmented.h>
#include <vtkm/worklet/contourtree_augmented/mesh_dem_meshtypes/ContourTreeMesh.h> #include <vtkm/worklet/contourtree_augmented/meshtypes/ContourTreeMesh.h>
// distributed contour tree includes // distributed contour tree includes
#include <vtkm/worklet/contourtree_distributed/BoundaryRestrictedAugmentedContourTree.h> #include <vtkm/worklet/contourtree_distributed/BoundaryRestrictedAugmentedContourTree.h>
@ -105,7 +105,7 @@ struct PostExecuteCaller
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
ContourTreeUniformDistributed::ContourTreeUniformDistributed(bool useMarchingCubes) ContourTreeUniformDistributed::ContourTreeUniformDistributed(bool useMarchingCubes)
: vtkm::filter::FilterCell<ContourTreeUniformDistributed>() : vtkm::filter::FilterField<ContourTreeUniformDistributed>()
, UseMarchingCubes(useMarchingCubes) , UseMarchingCubes(useMarchingCubes)
, MultiBlockTreeHelper(nullptr) , MultiBlockTreeHelper(nullptr)
{ {
@ -146,14 +146,11 @@ vtkm::cont::DataSet ContourTreeUniformDistributed::DoExecute(
throw vtkm::cont::ErrorFilterExecution("Point field expected."); throw vtkm::cont::ErrorFilterExecution("Point field expected.");
} }
// Use the GetRowsColsSlices struct defined in the header to collect the nRows, nCols, and nSlices information // Get mesh size
vtkm::worklet::ContourTreeAugmented worklet; vtkm::Id3 meshSize;
vtkm::Id nRows;
vtkm::Id nCols;
vtkm::Id nSlices = 1;
const auto& cells = input.GetCellSet(); const auto& cells = input.GetCellSet();
vtkm::filter::ApplyPolicyCellSet(cells, policy, *this) 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 // 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; std::size_t blockIndex = 0;
@ -161,15 +158,14 @@ vtkm::cont::DataSet ContourTreeUniformDistributed::DoExecute(
unsigned int compRegularStruct = 1; unsigned int compRegularStruct = 1;
// Run the worklet // Run the worklet
vtkm::worklet::ContourTreeAugmented worklet;
worklet.Run(field, worklet.Run(field,
MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalContourTrees[blockIndex] MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalContourTrees[blockIndex]
: this->ContourTreeData, : this->ContourTreeData,
MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalSortOrders[blockIndex] MultiBlockTreeHelper ? MultiBlockTreeHelper->LocalSortOrders[blockIndex]
: this->MeshSortOrder, : this->MeshSortOrder,
this->NumIterations, this->NumIterations,
nRows, meshSize,
nCols,
nSlices,
this->UseMarchingCubes, this->UseMarchingCubes,
compRegularStruct); compRegularStruct);
@ -281,7 +277,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
// create the local data block structure // create the local data block structure
localDataBlocks[bi] = new vtkm::worklet::contourtree_distributed::ContourTreeBlockData<T>(); localDataBlocks[bi] = new vtkm::worklet::contourtree_distributed::ContourTreeBlockData<T>();
localDataBlocks[bi]->NumVertices = currContourTreeMesh->NumVertices; 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]->SortedValue = currContourTreeMesh->SortedValues;
localDataBlocks[bi]->GlobalMeshIndex = currContourTreeMesh->GlobalMeshIndex; localDataBlocks[bi]->GlobalMeshIndex = currContourTreeMesh->GlobalMeshIndex;
localDataBlocks[bi]->Neighbours = currContourTreeMesh->Neighbours; localDataBlocks[bi]->Neighbours = currContourTreeMesh->Neighbours;
@ -377,7 +374,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
// Construct the contour tree mesh from the last block // Construct the contour tree mesh from the last block
vtkm::worklet::contourtree_augmented::ContourTreeMesh<T> contourTreeMeshOut; vtkm::worklet::contourtree_augmented::ContourTreeMesh<T> contourTreeMeshOut;
contourTreeMeshOut.NumVertices = localDataBlocks[0]->NumVertices; 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.SortedValues = localDataBlocks[0]->SortedValue;
contourTreeMeshOut.GlobalMeshIndex = localDataBlocks[0]->GlobalMeshIndex; contourTreeMeshOut.GlobalMeshIndex = localDataBlocks[0]->GlobalMeshIndex;
contourTreeMeshOut.Neighbours = localDataBlocks[0]->Neighbours; contourTreeMeshOut.Neighbours = localDataBlocks[0]->Neighbours;
@ -390,10 +388,7 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
maxIdx[1] = maxIdx[1] - 1; maxIdx[1] = maxIdx[1] - 1;
maxIdx[2] = maxIdx[2] > 0 ? (maxIdx[2] - 1) : 0; maxIdx[2] = maxIdx[2] > 0 ? (maxIdx[2] - 1) : 0;
auto meshBoundaryExecObj = contourTreeMeshOut.GetMeshBoundaryExecutionObject( auto meshBoundaryExecObj = contourTreeMeshOut.GetMeshBoundaryExecutionObject(
this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize[0], this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize, minIdx, maxIdx);
this->MultiBlockTreeHelper->MultiBlockSpatialDecomposition.GlobalSize[1],
minIdx,
maxIdx);
// Run the worklet to compute the final contour tree // Run the worklet to compute the final contour tree
worklet.Run( worklet.Run(
contourTreeMeshOut.SortedValues, // Unused param. Provide something to keep API happy contourTreeMeshOut.SortedValues, // Unused param. Provide something to keep API happy