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
#include <vtkm/filter/ContourTreeUniformDistributed.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
#include <vtkm/worklet/contourtree_distributed/BoundaryRestrictedAugmentedContourTree.h>
@ -105,7 +105,7 @@ struct PostExecuteCaller
//-----------------------------------------------------------------------------
ContourTreeUniformDistributed::ContourTreeUniformDistributed(bool useMarchingCubes)
: vtkm::filter::FilterCell<ContourTreeUniformDistributed>()
: vtkm::filter::FilterField<ContourTreeUniformDistributed>()
, 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<T>();
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<T> 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