2019-01-07 01:18:23 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2019-01-07 01:18:23 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
2019-03-28 12:27:37 +00:00
|
|
|
#ifndef vtkm_cont_CellLocatorRectilinearGrid_h
|
|
|
|
#define vtkm_cont_CellLocatorRectilinearGrid_h
|
2019-01-07 01:18:23 +00:00
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
#include <vtkm/cont/internal/CellLocatorBase.h>
|
|
|
|
|
|
|
|
#include <vtkm/exec/CellLocatorRectilinearGrid.h>
|
2019-01-07 01:18:23 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
class VTKM_CONT_EXPORT CellLocatorRectilinearGrid
|
|
|
|
: public vtkm::cont::internal::CellLocatorBase<CellLocatorRectilinearGrid>
|
2019-01-07 01:18:23 +00:00
|
|
|
{
|
2020-09-22 15:32:01 +00:00
|
|
|
using Superclass = vtkm::cont::internal::CellLocatorBase<CellLocatorRectilinearGrid>;
|
|
|
|
|
|
|
|
using Structured2DType = vtkm::cont::CellSetStructured<2>;
|
|
|
|
using Structured3DType = vtkm::cont::CellSetStructured<3>;
|
|
|
|
// Might want to handle cartesian product of both Float32 and Float64.
|
|
|
|
using AxisHandle = vtkm::cont::ArrayHandle<vtkm::FloatDefault>;
|
|
|
|
using RectilinearType =
|
|
|
|
vtkm::cont::ArrayHandleCartesianProduct<AxisHandle, AxisHandle, AxisHandle>;
|
|
|
|
|
2019-01-07 01:18:23 +00:00
|
|
|
public:
|
2020-09-22 15:32:01 +00:00
|
|
|
CellLocatorRectilinearGrid() = default;
|
2019-01-07 01:18:23 +00:00
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
~CellLocatorRectilinearGrid() = default;
|
2019-01-07 01:18:23 +00:00
|
|
|
|
2022-08-05 18:43:50 +00:00
|
|
|
using LastCell = vtkm::exec::CellLocatorRectilinearGrid::LastCell;
|
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
VTKM_CONT vtkm::exec::CellLocatorRectilinearGrid PrepareForExecution(
|
2020-01-21 20:18:03 +00:00
|
|
|
vtkm::cont::DeviceAdapterId device,
|
2020-09-22 15:32:01 +00:00
|
|
|
vtkm::cont::Token& token) const;
|
2019-01-07 01:18:23 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
vtkm::Bounds Bounds;
|
|
|
|
vtkm::Id PlaneSize;
|
|
|
|
vtkm::Id RowSize;
|
2019-07-11 17:45:30 +00:00
|
|
|
bool Is3D = true;
|
2019-03-28 12:27:37 +00:00
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
friend Superclass;
|
|
|
|
VTKM_CONT void Build();
|
2019-01-07 01:18:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} //namespace cont
|
|
|
|
} //namespace vtkm
|
|
|
|
|
2019-03-28 12:27:37 +00:00
|
|
|
#endif //vtkm_cont_CellLocatorRectilinearGrid_h
|