2019-08-27 22:42:25 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-08-23 00:23:34 +00:00
|
|
|
//
|
2019-08-27 22:42:25 +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-08-23 00:23:34 +00:00
|
|
|
|
|
|
|
#ifndef vtk_m_source_Tangle_h
|
|
|
|
#define vtk_m_source_Tangle_h
|
|
|
|
|
|
|
|
#include <vtkm/source/Source.h>
|
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace source
|
|
|
|
{
|
2019-09-13 12:12:03 +00:00
|
|
|
/**
|
|
|
|
* @brief The Tangle source creates a uniform dataset.
|
|
|
|
*
|
|
|
|
* This class generates a predictable uniform grid dataset with an
|
2021-10-01 16:40:48 +00:00
|
|
|
* interesting point field, which is useful for testing and
|
|
|
|
* benchmarking.
|
2019-09-13 12:12:03 +00:00
|
|
|
*
|
2021-10-01 16:40:48 +00:00
|
|
|
* The Execute method creates a complete structured dataset of a
|
|
|
|
* resolution specified in the constructor that is bounded by the
|
|
|
|
* cube in the range [0,1] in each dimension. The dataset has a
|
|
|
|
* point field named 'tangle' computed with the following formula
|
|
|
|
*
|
|
|
|
* x^4 - 5x^2 + y^4 - 5y^2 + z^4 - 5z^2
|
2019-09-13 12:12:03 +00:00
|
|
|
*
|
|
|
|
**/
|
|
|
|
class VTKM_SOURCE_EXPORT Tangle final : public vtkm::source::Source
|
2019-08-23 00:23:34 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-09-16 16:36:01 +00:00
|
|
|
///Construct a Tangle with Cell Dimensions
|
2019-08-23 00:23:34 +00:00
|
|
|
VTKM_CONT
|
|
|
|
Tangle(vtkm::Id3 dims)
|
|
|
|
: Dims(dims)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-08-23 17:56:17 +00:00
|
|
|
vtkm::cont::DataSet Execute() const;
|
2019-08-23 00:23:34 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
vtkm::Id3 Dims;
|
|
|
|
};
|
|
|
|
} //namespace source
|
|
|
|
} //namespace vtkm
|
|
|
|
|
2019-09-13 12:12:03 +00:00
|
|
|
#endif //vtk_m_source_Tangle_h
|