TTK
Loading...
Searching...
No Matches
ttkTriangulationManager.h
Go to the documentation of this file.
1
19
20#pragma once
21
22// VTK Module
23#include <ttkTriangulationManagerModule.h>
24
25// VTK Includes
26#include <vtkDataArraySelection.h>
27#include <vtkSmartPointer.h>
28
29#ifdef TTK_ENABLE_MPI
32#endif
33
34// TTK Includes
35#include <Triangulation.h>
36#include <ttkAlgorithm.h>
37#include <ttkMacros.h>
38
39class vtkPointSet;
40class vtkUnstructuredGrid;
41
42class TTKTRIANGULATIONMANAGER_EXPORT ttkTriangulationManager
43 : public ttkAlgorithm {
44
45 using STRATEGY = typename ttk::Triangulation::STRATEGY;
46 bool Periodicity{false};
47 STRATEGY PreconditioningStrategy{STRATEGY::DEFAULT};
48 int Threshold{1000};
50#ifdef TTK_ENABLE_MPI
51 vtkNew<ttkPeriodicGhostsGeneration> periodicGhostGenerator{};
52#endif
53
54public:
55 ttkSetEnumMacro(PreconditioningStrategy, STRATEGY);
56 vtkGetEnumMacro(PreconditioningStrategy, STRATEGY);
57
58 vtkSetMacro(Periodicity, bool);
59 vtkGetMacro(Periodicity, bool);
60
61 vtkSetMacro(Threshold, int);
62 vtkGetMacro(Threshold, int);
63
64 // copy the vtkPassSelectedArray ("PassArrays" filter) API
65 vtkDataArraySelection *GetDataArraySelection() {
66 return this->ArraySelection.GetPointer();
67 }
68
71 this->ArraySelection = selection;
72 }
73
76
77protected:
79 ~ttkTriangulationManager() override = default;
80
81 void processImplicit(ttk::Triangulation &triangulation
82#ifdef TTK_ENABLE_MPI
83 ,
84 vtkImageData *imageIn,
85 vtkImageData *imageOut
86#endif
87 );
88 int processExplicit(vtkUnstructuredGrid *const output,
89 vtkPointSet *const input,
90 ttk::Triangulation &triangulation) const;
91
92 int FillInputPortInformation(int port, vtkInformation *info) override;
93 int FillOutputPortInformation(int port, vtkInformation *info) override;
94 int RequestData(vtkInformation *request,
95 vtkInformationVector **inputVector,
96 vtkInformationVector *outputVector) override;
97#ifdef TTK_ENABLE_MPI
98 int RequestUpdateExtent(vtkInformation *ttkNotUsed(request),
99 vtkInformationVector **inputVector,
100 vtkInformationVector *outputVector) override;
101 int RequestInformation(vtkInformation *request,
102 vtkInformationVector **inputVectors,
103 vtkInformationVector *outputVector) override;
104#endif // TTK_ENABLE_MPI
105};
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
Definition BaseClass.h:47
Baseclass of all VTK filters that wrap ttk modules.
TTK VTK-filter that manages ttk::Triangulation options.
void SetDataArraySelection(const vtkSmartPointer< vtkDataArraySelection > &selection)
~ttkTriangulationManager() override=default
vtkDataArraySelection * GetDataArraySelection()
static ttkTriangulationManager * New()
Triangulation is a class that provides time and memory efficient traversal methods on triangulations ...
#define ttkSetEnumMacro(name, enumType)
Definition ttkMacros.h:38