vtk-m2/vtkm/filter/GhostCellClassify.h
Robert Maynard 8c3a8da99b GhostCellClassify now more efficient as it uses WorkletPointNeighborhood
By using the dual of the cellset we can quickly compute the GhostCells
of structured data using WorkletPointNeighborhood boundary condition
object

Using a 1024x1024x512 test grid we see the following perf:

Master Serial : 5.658144 sec
This MR Serial: 0.519684 sec

Master OpenMP : 0.532256 sec
This MR OpenMP: 0.080604 sec
2019-09-11 10:06:45 -04:00

54 lines
1.5 KiB
C++

//============================================================================
// 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.
//============================================================================
#ifndef vtk_m_filter_GhostCellClassify_h
#define vtk_m_filter_GhostCellClassify_h
#include <vtkm/filter/FilterDataSet.h>
namespace vtkm
{
namespace filter
{
struct GhostCellClassifyPolicy : vtkm::filter::PolicyBase<GhostCellClassifyPolicy>
{
using FieldTypeList = vtkm::ListTagBase<vtkm::UInt8>;
};
class GhostCellClassify : public vtkm::filter::FilterDataSet<GhostCellClassify>
{
public:
using SupportedTypes = vtkm::ListTagBase<vtkm::UInt8>;
VTKM_CONT
GhostCellClassify();
template <typename Policy>
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData,
vtkm::filter::PolicyBase<Policy> policy);
template <typename DerivedPolicy>
VTKM_CONT bool MapFieldOntoOutput(vtkm::cont::DataSet& result,
const vtkm::cont::Field& field,
const vtkm::filter::PolicyBase<DerivedPolicy>&)
{
result.AddField(field);
return true;
}
private:
};
}
} // namespace vtkm::filter
#include <vtkm/filter/GhostCellClassify.hxx>
#endif //vtk_m_filter_GhostCellClassify_h