18 #ifndef viskores_filter_flow_internal_GridMetaData_h
19 #define viskores_filter_flow_internal_GridMetaData_h
41 this->cellSet2D =
true;
48 this->cellSet2D =
false;
49 this->Dims = cellSet.
AsCellSet<Structured3DType>().GetSchedulingRange(
52 this->PlaneSize = Dims[0] * Dims[1];
53 this->RowSize = Dims[0];
57 bool IsCellSet2D()
const {
return this->cellSet2D; }
62 logicalIndex[0] = index % Dims[0];
63 logicalIndex[1] = (index / Dims[0]) % Dims[1];
67 logicalIndex[2] = index / (Dims[0] * Dims[1]);
75 GetLogicalIndex(index, logicalIndex);
78 indices[0] = (logicalIndex[0] == 0) ? index : index - 1;
79 indices[1] = (logicalIndex[0] == Dims[0] - 1) ? index : index + 1;
81 indices[2] = (logicalIndex[1] == 0) ? index : index - RowSize;
82 indices[3] = (logicalIndex[1] == Dims[1] - 1) ? index : index + RowSize;
86 indices[4] = (logicalIndex[2] == 0) ? index : index - PlaneSize;
87 indices[5] = (logicalIndex[2] == Dims[2] - 1) ? index : index + PlaneSize;
93 bool cellSet2D =
false;
104 #endif //viskores_filter_flow_internal_GridMetaData_h