2019-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2019-02-28 16:11:08 +00:00
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
//
|
|
|
|
// 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-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2019-02-28 16:11:08 +00:00
|
|
|
|
2019-03-29 00:33:48 +00:00
|
|
|
#ifndef vtkm_m_filter_CellSetConnectivity_hxx
|
|
|
|
#define vtkm_m_filter_CellSetConnectivity_hxx
|
|
|
|
|
2019-08-08 15:00:04 +00:00
|
|
|
#include <vtkm/filter/CreateResult.h>
|
2019-08-07 16:54:47 +00:00
|
|
|
#include <vtkm/worklet/connectivities/CellSetConnectivity.h>
|
2019-02-28 16:11:08 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace filter
|
|
|
|
{
|
2019-03-29 00:33:48 +00:00
|
|
|
|
|
|
|
VTKM_CONT CellSetConnectivity::CellSetConnectivity()
|
2019-09-26 17:49:54 +00:00
|
|
|
: OutputFieldName("component")
|
2019-03-29 00:33:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-26 17:49:54 +00:00
|
|
|
template <typename Policy>
|
2019-02-28 16:11:08 +00:00
|
|
|
inline VTKM_CONT vtkm::cont::DataSet CellSetConnectivity::DoExecute(
|
|
|
|
const vtkm::cont::DataSet& input,
|
2019-09-26 17:49:54 +00:00
|
|
|
vtkm::filter::PolicyBase<Policy> policy)
|
2019-02-28 16:11:08 +00:00
|
|
|
{
|
|
|
|
vtkm::cont::ArrayHandle<vtkm::Id> component;
|
2019-03-28 13:02:25 +00:00
|
|
|
|
2019-03-20 17:58:22 +00:00
|
|
|
vtkm::worklet::connectivity::CellSetConnectivity().Run(
|
2020-05-15 23:47:30 +00:00
|
|
|
vtkm::filter::ApplyPolicyCellSet(input.GetCellSet(), policy, *this), component);
|
2019-02-28 16:11:08 +00:00
|
|
|
|
2019-09-26 17:49:54 +00:00
|
|
|
return CreateResultFieldCell(input, component, this->GetOutputFieldName());
|
2019-02-28 16:11:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-03-29 00:33:48 +00:00
|
|
|
|
|
|
|
#endif //vtkm_m_filter_CellSetConnectivity_hxx
|