Merge topic 'filters_use_active_cell_set'

bf2b3ab70 Filters properly use the active cell set not the first cell set.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1610
This commit is contained in:
Robert Maynard 2019-03-28 15:12:56 +00:00 committed by Kitware Robot
commit 069923d49d
8 changed files with 14 additions and 11 deletions

@ -35,9 +35,10 @@ inline VTKM_CONT vtkm::cont::DataSet CellSetConnectivity::DoExecute(
const vtkm::filter::PolicyBase<DerivedPolicy>& policy)
{
vtkm::cont::ArrayHandle<vtkm::Id> component;
// TODO: is the Casting right?
vtkm::worklet::connectivity::CellSetConnectivity().Run(
vtkm::filter::ApplyPolicy(input.GetCellSet(0), policy), component);
vtkm::filter::ApplyPolicy(input.GetCellSet(this->GetActiveCoordinateSystemIndex()), policy),
component);
auto result = internal::CreateResult(
input, component, "component", fieldMetadata.GetAssociation(), fieldMetadata.GetCellSetName());

@ -95,7 +95,7 @@ vtkm::cont::DataSet ContourTreeMesh2D::DoExecute(
// Collect sizing information from the dataset
vtkm::cont::CellSetStructured<2> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
// How should policy be used?
vtkm::filter::ApplyPolicy(cellSet, policy);
@ -136,7 +136,7 @@ vtkm::cont::DataSet ContourTreeMesh3D::DoExecute(
// Collect sizing information from the dataset
vtkm::cont::CellSetStructured<3> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
// How should policy be used?
vtkm::filter::ApplyPolicy(cellSet, policy);

@ -35,9 +35,10 @@ inline VTKM_CONT vtkm::cont::DataSet ImageConnectivity::DoExecute(
{
vtkm::cont::ArrayHandle<vtkm::Id> component;
// TODO: is there such thing as Active CellSet?
vtkm::worklet::connectivity::ImageConnectivity().Run(
vtkm::filter::ApplyPolicy(input.GetCellSet(0), policy), field, component);
vtkm::filter::ApplyPolicy(input.GetCellSet(this->GetActiveCoordinateSystemIndex()), policy),
field,
component);
auto result = internal::CreateResult(
input, component, "component", fieldMetadata.GetAssociation(), fieldMetadata.GetCellSetName());

@ -233,7 +233,8 @@ inline VTKM_CONT vtkm::cont::DataSet Lagrangian::DoExecute(
cycle += 1;
std::cout << "Cycle : " << cycle << std::endl;
const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(0);
const vtkm::cont::DynamicCellSet& cells =
input.GetCellSet(this->GetActiveCoordinateSystemIndex());
const vtkm::cont::CoordinateSystem& coords =
input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
vtkm::Bounds bounds = input.GetCoordinateSystem().GetBounds();

@ -80,7 +80,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPCompressor2D::DoExecute(
}
}
vtkm::cont::CellSetStructured<2> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
vtkm::Id2 pointDimensions = cellSet.GetPointDimensions();

@ -80,7 +80,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPCompressor3D::DoExecute(
}
}
vtkm::cont::CellSetStructured<3> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
vtkm::Id3 pointDimensions = cellSet.GetPointDimensions();

@ -79,7 +79,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPDecompressor2D::DoExecute(
}
vtkm::cont::CellSetStructured<2> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
vtkm::Id2 pointDimensions = cellSet.GetPointDimensions();
vtkm::cont::ArrayHandle<vtkm::Float64> decompress;

@ -78,7 +78,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPDecompressor3D::DoExecute(
}
vtkm::cont::CellSetStructured<3> cellSet;
input.GetCellSet(0).CopyTo(cellSet);
input.GetCellSet(this->GetActiveCoordinateSystemIndex()).CopyTo(cellSet);
vtkm::Id3 pointDimensions = cellSet.GetPointDimensions();
vtkm::cont::ArrayHandle<vtkm::Float64> decompress;