Go to the documentation of this file.
73 #ifndef vtkm_worklet_contourtree_mesh2d_dem_vertex_outdegree_starter_h
74 #define vtkm_worklet_contourtree_mesh2d_dem_vertex_outdegree_starter_h
92 WholeArrayIn arcArray,
112 template <
typename InFieldPortalType >
115 const InFieldPortalType& arcArray,
135 if ((nbrMask & 0x30) == 0x20)
136 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row - 1, col,
nCols));
137 if ((nbrMask & 0x18) == 0x10)
138 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row - 1, col - 1,
nCols));
139 if ((nbrMask & 0x0C) == 0x08)
140 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row, col - 1,
nCols));
141 if ((nbrMask & 0x06) == 0x04)
142 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row + 1, col,
nCols));
143 if ((nbrMask & 0x03) == 0x02)
144 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row + 1, col + 1,
nCols));
145 if ((nbrMask & 0x21) == 0x01)
146 farEnds[outDegree++] = arcArray.Get(
VERTEX_ID(row, col + 1,
nCols));
150 if ((outDegree == 2) && (farEnds[0] == farEnds[1]))
155 else if (outDegree == 3)
157 if (farEnds[0] == farEnds[1])
159 if (farEnds[0] == farEnds[2])
167 farEnds[1] = farEnds[2];
172 else if ((farEnds[0] == farEnds[2]) || (farEnds[1] == farEnds[2]))
180 outdegree = outDegree;
183 isCritical = (outDegree != 1) ? 1 : 0;
#define VTKM_EXEC
Definition: ExportMacros.h:51
_1 InputDomain
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:96
Groups connected points that have the same field value.
Definition: Atomic.h:19
#define VERTEX_COL(V, NCOLS)
Definition: Mesh2D_DEM_Triangulation_Macros.h:82
void(FieldIn vertex, FieldIn nbrMask, WholeArrayIn arcArray, FieldOut outdegree, FieldOut isCritical) ControlSignature
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:94
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::Id nCols
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:99
A control signature tag for output fields.
Definition: WorkletMapField.h:60
bool ascending
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:100
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
#define MAX_OUTDEGREE
Definition: Mesh2D_DEM_Triangulation_Macros.h:76
vtkm::Id nRows
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:98
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:87
A control signature tag for input fields.
Definition: WorkletMapField.h:49
void(_1, _2, _3, _4, _5) ExecutionSignature
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:95
#define VERTEX_ROW(V, NCOLS)
Definition: Mesh2D_DEM_Triangulation_Macros.h:79
VTKM_EXEC void operator()(const vtkm::Id &vertex, const vtkm::Id &nbrMask, const InFieldPortalType &arcArray, vtkm::Id &outdegree, vtkm::Id &isCritical) const
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:113
VTKM_EXEC_CONT Mesh2D_DEM_VertexOutdegreeStarter(vtkm::Id NRows, vtkm::Id NCols, bool Ascending)
Definition: Mesh2D_DEM_VertexOutdegreeStarter.h:104
#define VERTEX_ID(R, C, NCOLS)
Definition: Mesh2D_DEM_Triangulation_Macros.h:85
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38