Go to the documentation of this file.
73 #ifndef vtkm_worklet_contourtree_mesh3d_dem_saddle_starter_h
74 #define vtkm_worklet_contourtree_mesh3d_dem_saddle_starter_h
96 WholeArrayIn linkMask,
97 WholeArrayIn arcArray,
98 WholeArrayIn inverseIndex,
99 WholeArrayIn neighbourTable,
100 WholeArrayIn caseTable,
101 WholeArrayOut edgeNear,
102 WholeArrayOut edgeFar,
103 WholeArrayOut activeEdges);
104 using ExecutionSignature = void(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11);
123 template <
typename InFieldPortalType,
124 typename NeighbourTableType,
125 typename CaseTableType,
126 typename OutFieldPortalType>
130 const InFieldPortalType& linkMask,
131 const InFieldPortalType& arcArray,
132 const InFieldPortalType& inverseIndex,
133 const NeighbourTableType& neighbourTable,
134 const CaseTableType& caseTable,
135 const OutFieldPortalType& edgeNear,
136 const OutFieldPortalType& edgeFar,
137 const OutFieldPortalType& activeEdges)
const
146 vtkm::Id nbrMask = linkMask.Get(valueIndex);
159 if (caseTable.Get(nbrMask) & (1 << edgeNo))
162 vtkm::Id nbrSlice = slice + neighbourTable.Get(indx);
163 vtkm::Id nbrRow = row + neighbourTable.Get(indx + 1);
164 vtkm::Id nbrCol = col + neighbourTable.Get(indx + 2);
167 farEnds[outDegree++] = inverseIndex.Get(arcArray.Get(nbr));
172 if ((outDegree == 2) && (farEnds[0] == farEnds[1]))
177 else if (outDegree == 3)
179 if (farEnds[0] == farEnds[1])
181 if (farEnds[0] == farEnds[2])
189 farEnds[1] = farEnds[2];
194 else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2]))
202 for (
vtkm::Id edge = 0; edge < outDegree; edge++)
208 edgeNear.Set(edgeID, vertex);
209 edgeFar.Set(edgeID, farEnds[edge]);
210 activeEdges.Set(edgeID, edgeID);
VTKM_EXEC_CONT Mesh3D_DEM_SaddleStarter(vtkm::Id NRows, vtkm::Id NCols, vtkm::Id NSlices, bool Ascending)
Definition: Mesh3D_DEM_SaddleStarter.h:114
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
#define VERTEX_ROW_3D(V, NROWS, NCOLS)
Definition: Mesh3D_DEM_Triangulation_Macros.h:70
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
#define N_INCIDENT_EDGES_3D
Definition: Mesh3D_DEM_Triangulation_Macros.h:66
void(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) ExecutionSignature
Definition: Mesh3D_DEM_SaddleStarter.h:104
_1 InputDomain
Definition: Mesh3D_DEM_SaddleStarter.h:105
void(FieldIn vertex, FieldIn outDegFirstEdge, FieldIn valueIndex, WholeArrayIn linkMask, WholeArrayIn arcArray, WholeArrayIn inverseIndex, WholeArrayIn neighbourTable, WholeArrayIn caseTable, WholeArrayOut edgeNear, WholeArrayOut edgeFar, WholeArrayOut activeEdges) ControlSignature
Definition: Mesh3D_DEM_SaddleStarter.h:103
vtkm::Id nSlices
Definition: Mesh3D_DEM_SaddleStarter.h:109
VTKM_EXEC void operator()(const vtkm::Id &vertex, const vtkm::Pair< vtkm::Id, vtkm::Id > &outDegFirstEdge, const vtkm::Id &valueIndex, const InFieldPortalType &linkMask, const InFieldPortalType &arcArray, const InFieldPortalType &inverseIndex, const NeighbourTableType &neighbourTable, const CaseTableType &caseTable, const OutFieldPortalType &edgeNear, const OutFieldPortalType &edgeFar, const OutFieldPortalType &activeEdges) const
Definition: Mesh3D_DEM_SaddleStarter.h:127
A control signature tag for input fields.
Definition: WorkletMapField.h:49
FirstType first
The pair's first object.
Definition: Pair.h:50
#define VERTEX_SLICE_3D(V, NROWS, NCOLS)
Definition: Mesh3D_DEM_Triangulation_Macros.h:76
vtkm::Id nRows
Definition: Mesh3D_DEM_SaddleStarter.h:107
Definition: Mesh3D_DEM_SaddleStarter.h:88
#define VERTEX_ID_3D(S, R, C, NROWS, NCOLS)
Definition: Mesh3D_DEM_Triangulation_Macros.h:79
#define VERTEX_COL_3D(V, NROWS, NCOLS)
Definition: Mesh3D_DEM_Triangulation_Macros.h:73
A vtkm::Pair is essentially the same as an STL pair object except that the methods (constructors and ...
Definition: Pair.h:29
vtkm::Id nCols
Definition: Mesh3D_DEM_SaddleStarter.h:108
SecondType second
The pair's second object.
Definition: Pair.h:55
#define MAX_OUTDEGREE_3D
Definition: Mesh3D_DEM_Triangulation_Macros.h:67
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
bool ascending
Definition: Mesh3D_DEM_SaddleStarter.h:110