1 //============================================================================
2 //  Copyright (c) Kitware, Inc.
3 //  All rights reserved.
4 //  See LICENSE.txt for details.
5 //
6 //  This software is distributed WITHOUT ANY WARRANTY; without even
7 //  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 //  PURPOSE.  See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_source_Tangle_h
12 #define vtk_m_source_Tangle_h
13 
14 #include <vtkm/source/Source.h>
15 
16 namespace vtkm
17 {
18 namespace source
19 {
20 /**
21  * @brief The Tangle source creates a uniform dataset.
22  *
23  * This class generates a predictable uniform grid dataset with an
24  * interesting set of point and cell scalar arrays, which is useful
25  * for testing and benchmarking.
26  *
27  * The Execute method creates a complete structured dataset that have a
28  * point field named 'nodevar', and a cell field named 'cellvar'.
29  *
30 **/
31 class VTKM_SOURCE_EXPORT Tangle final : public vtkm::source::Source
32 {
33 public:
34   ///Construct a Tangle with Cell Dimensions
35   VTKM_CONT
Tangle(vtkm::Id3 dims)36   Tangle(vtkm::Id3 dims)
37     : Dims(dims)
38   {
39   }
40 
41   vtkm::cont::DataSet Execute() const;
42 
43 private:
44   vtkm::Id3 Dims;
45 };
46 } //namespace source
47 } //namespace vtkm
48 
49 #endif //vtk_m_source_Tangle_h
50