2016-12-14 20:10:43 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2016-12-14 20:10:43 +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.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef vtk_m_filter_PointAverage_h
|
|
|
|
#define vtk_m_filter_PointAverage_h
|
|
|
|
|
2019-09-09 13:39:23 +00:00
|
|
|
#include <vtkm/filter/vtkm_filter_export.h>
|
|
|
|
|
|
|
|
#include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
|
2016-12-14 20:10:43 +00:00
|
|
|
#include <vtkm/filter/FilterCell.h>
|
|
|
|
#include <vtkm/worklet/PointAverage.h>
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace filter
|
|
|
|
{
|
2017-07-06 17:51:45 +00:00
|
|
|
/// \brief Cell to Point interpolation filter.
|
|
|
|
///
|
|
|
|
/// PointAverage is a filter that transforms cell data (i.e., data
|
|
|
|
/// specified per cell) into point data (i.e., data specified at cell
|
|
|
|
/// points). The method of transformation is based on averaging the data
|
|
|
|
/// values of all cells using a particular point.
|
2019-09-09 13:39:23 +00:00
|
|
|
class VTKM_ALWAYS_EXPORT PointAverage : public vtkm::filter::FilterCell<PointAverage>
|
2016-12-14 20:10:43 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-08-30 15:53:18 +00:00
|
|
|
template <typename T, typename StorageType, typename DerivedPolicy>
|
2018-04-02 21:58:21 +00:00
|
|
|
VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input,
|
|
|
|
const vtkm::cont::ArrayHandle<T, StorageType>& field,
|
|
|
|
const vtkm::filter::FieldMetadata& fieldMeta,
|
2019-09-09 13:39:23 +00:00
|
|
|
vtkm::filter::PolicyBase<DerivedPolicy> policy);
|
2016-12-14 20:10:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
vtkm::worklet::PointAverage Worklet;
|
|
|
|
};
|
2019-09-09 13:39:23 +00:00
|
|
|
|
|
|
|
#ifndef vtkm_filter_PointAverage_cxx
|
|
|
|
VTKM_FILTER_EXPORT_EXECUTE_METHOD(PointAverage);
|
|
|
|
#endif
|
2016-12-14 20:10:43 +00:00
|
|
|
}
|
|
|
|
} // namespace vtkm::filter
|
|
|
|
|
2019-10-07 19:39:02 +00:00
|
|
|
#include <vtkm/filter/PointAverage.hxx>
|
|
|
|
|
2016-12-14 20:10:43 +00:00
|
|
|
#endif // vtk_m_filter_PointAverage_h
|