Go to the documentation of this file.
   13 #ifndef vtk_m_worklet_MIR_h 
   14 #define vtk_m_worklet_MIR_h 
   81 struct EdgeInterpolation
 
   92       return (v1.Vertex1 < v2.Vertex1) || (v1.Vertex1 == v2.Vertex1 && v1.Vertex2 < v2.Vertex2);
 
  101       return v1.Vertex1 == v2.Vertex1 && v1.Vertex2 == v2.Vertex2;
 
  105 namespace MIRinternal
 
  107 template <
typename T>
 
  110   return static_cast<T
>(scale * 
static_cast<vtkm::Float64>(val));
 
  113 template <
typename T, vtkm::IdComponent NumComponents>
 
  140     : 
Shapes(shapes.PrepareForOutput(stats.NumberOfCells, device, token))
 
  141     , 
NumberOfIndices(numberOfIndices.PrepareForOutput(stats.NumberOfCells, device, token))
 
  143     , 
Offsets(offsets.PrepareForOutput(stats.NumberOfCells, device, token))
 
  159     this->
Offsets.Set(cellIndex, indexOffset);
 
  205     return execConnectivity;
 
  226                                 WholeArrayIn curVals,
 
  227                                 WholeArrayIn prevVals,
 
  229                                 ExecObject mirTables,
 
  237   template <
typename CellShapeTag,
 
  238             typename ScalarFieldVec,
 
  239             typename ScalarFieldVec1,
 
  240             typename DeviceAdapter,
 
  245     const CellShapeTag shape,
 
  247     const ScalarFieldVec& prevVals,
 
  248     const ScalarFieldVec1& newVals,
 
  249     const ScalarPos& valPositionStart,
 
  252     const PreCol& prevCol,
 
  274         if (
static_cast<vtkm::Float64>(prevVals.Get(valPositionStart + iter)) <=
 
  275             static_cast<vtkm::Float64>(newVals.Get(valPositionStart + iter)))
 
  296     if (numberOfCells == -1)
 
  298       this->
RaiseError(
"Getting a size index of a polygon with more points than 8 or less points " 
  299                        "than 3. Bad case.");
 
  309       if (cellType == MIRCases::SH_PNT)
 
  332           if (element >= MIRCases::EA && element <= MIRCases::EL)
 
  336           else if (element == MIRCases::N0)
 
  412                                 WholeArrayIn prevVals,
 
  413                                 WholeArrayIn newVals,
 
  417                                 ExecObject mirTables,
 
  418                                 ExecObject connectivityObject,
 
  419                                 WholeArrayOut edgePointReverseConnectivity,
 
  420                                 WholeArrayOut edgePointInterpolation,
 
  421                                 WholeArrayOut inCellReverseConnectivity,
 
  422                                 WholeArrayOut inCellEdgeReverseConnectivity,
 
  423                                 WholeArrayOut inCellEdgeInterpolation,
 
  424                                 WholeArrayOut inCellInterpolationKeys,
 
  425                                 WholeArrayOut inCellInterpolationInfo,
 
  426                                 ExecObject cellLookbackObj,
 
  427                                 WholeArrayOut simpleLookback);
 
  450   template <
typename CellShapeTag,
 
  451             typename PointVecType,
 
  452             typename ScalarVecType1,
 
  453             typename ScalarVecType2,
 
  454             typename ConnectivityObject,
 
  456             typename EdgeInterpolationPortalType,
 
  457             typename DeviceAdapter,
 
  459             typename CellLookbackArr>
 
  461     const CellShapeTag shape,
 
  464     const PointVecType points,
 
  465     const ScalarVecType1& curScalars,  
 
  466     const ScalarVecType2& newScalars,  
 
  467     const ScalarPos& valPositionStart, 
 
  471     ConnectivityObject& connectivityObject,
 
  473     EdgeInterpolationPortalType& edgePointInterpolation,
 
  476     EdgeInterpolationPortalType& inCellEdgeInterpolation,
 
  480     CellLookbackArr& cellLookbackArray)
 const 
  501     for (
vtkm::Id cell = 0; cell < numberOfCells; ++cell)
 
  504       if (cellShape == MIRCases::SH_PNT)
 
  521              point++, inCellInterpPointIndex++, clipIndex++)
 
  524           inCellInterpolationKeys.Set(inCellInterpPointIndex, workIndex);
 
  525           if (entry <= MIRCases::P7)
 
  527             inCellInterpolationInfo.Set(inCellInterpPointIndex, points[entry]);
 
  532               MIRData.
GetEdge(shape.Id, entry - MIRCases::EA, pointcount);
 
  533             if (edge[0] == 255 || edge[1] == 255)
 
  535               this->
RaiseError(
"Edge vertices are assigned incorrect values.");
 
  540             ei.Vertex1 = points[edge[0]];
 
  541             ei.Vertex2 = points[edge[1]];
 
  543             if (ei.Vertex1 > ei.Vertex2)
 
  545               this->
swap(ei.Vertex1, ei.Vertex2);
 
  546               this->
swap(edge[0], edge[1]);
 
  551               ((
static_cast<vtkm::Float64>(curScalars.Get(valPositionStart + edge[0]) -
 
  552                                            newScalars.Get(valPositionStart + edge[0]))) /
 
  553                static_cast<vtkm::Float64>(curScalars.Get(valPositionStart + edge[1]) -
 
  554                                           curScalars.Get(valPositionStart + edge[0]) +
 
  555                                           newScalars.Get(valPositionStart + edge[0]) -
 
  556                                           newScalars.Get(valPositionStart + edge[1])));
 
  558             inCellEdgeReverseConnectivity.Set(inCellEdgeInterpIndex, inCellInterpPointIndex);
 
  559             inCellEdgeInterpolation.Set(inCellEdgeInterpIndex, ei);
 
  560             inCellEdgeInterpIndex++;
 
  574         connectivityObject.SetCellShape(cellIndex, cellShape);
 
  575         connectivityObject.SetNumberOfIndices(cellIndex, numberOfPoints);
 
  576         connectivityObject.SetIndexOffset(cellIndex, connectivityIndex);
 
  581           if (entry == MIRCases::N0) 
 
  584             inCellReverseConnectivity.Set(inCellIndex++, connectivityIndex);
 
  585             connectivityObject.SetConnectivity(connectivityIndex, inCellPoints);
 
  588           else if (entry <= MIRCases::P7) 
 
  590             connectivityObject.SetConnectivity(connectivityIndex, points[entry]);
 
  596               MIRData.
GetEdge(shape.Id, entry - MIRCases::EA, pointcount);
 
  597             if (edge[0] == 255 || edge[1] == 255)
 
  599               this->
RaiseError(
"Edge vertices are assigned incorrect values.");
 
  603             ei.Vertex1 = points[edge[0]];
 
  604             ei.Vertex2 = points[edge[1]];
 
  606             if (ei.Vertex1 > ei.Vertex2)
 
  608               this->
swap(ei.Vertex1, ei.Vertex2);
 
  609               this->
swap(edge[0], edge[1]);
 
  613               ((
static_cast<vtkm::Float64>(curScalars.Get(valPositionStart + edge[0]) -
 
  614                                            newScalars.Get(valPositionStart + edge[0]))) /
 
  615                static_cast<vtkm::Float64>(curScalars.Get(valPositionStart + edge[1]) -
 
  616                                           curScalars.Get(valPositionStart + edge[0]) +
 
  617                                           newScalars.Get(valPositionStart + edge[0]) -
 
  618                                           newScalars.Get(valPositionStart + edge[1])));
 
  621             edgePointReverseConnectivity.Set(edgeIndex, connectivityIndex++);
 
  622             edgePointInterpolation.Set(edgeIndex, ei);
 
  627         cellLookbackArray.Set(cellIndex, workIndex);
 
  633   template <
typename T>
 
  654                                 FieldIn destinationIndices,
 
  655                                 WholeArrayOut destinationData);
 
  661   template <
typename ConnectivityDataType>
 
  664                             ConnectivityDataType& destinationData)
 const 
  666     destinationData.Set(destinationIndex, (sourceValue + 
EdgePointOffset));
 
  687   template <
typename ConnectivityDataType>
 
  689                             ConnectivityDataType& destinationData)
 const 
  691     auto sourceValue = destinationData.Get(destinationIndex);
 
  711   template <
typename VFList1, 
typename VFList2, 
typename CellSet, 
typename VFLocs, 
typename IDList>
 
  713                                     const VFList1& prevValues,
 
  714                                     const VFList2& curValues,
 
  715                                     const VFLocs& offsets,
 
  716                                     const IDList& prevIDs,
 
  718                                     const IDList& prevLookback,
 
  731     statsDispatch.Invoke(cellSet,
 
  784     cellSetDispatcher.Invoke(cellSet,
 
  792                              edgePointReverseConnectivity,
 
  794                              cellPointReverseConnectivity,
 
  795                              cellPointEdgeReverseConnectivity,
 
  796                              cellPointEdgeInterpolation,
 
  813                                        edgeInterpolationIndexToUnique,
 
  818                                        cellPointEdgeInterpolation,
 
  819                                        cellInterpolationIndexToUnique,
 
  827       scatterEdgePointConnectivity);
 
  828     scatterEdgeDispatcher.Invoke(
 
  829       edgeInterpolationIndexToUnique, edgePointReverseConnectivity, connectivity);
 
  830     scatterEdgeDispatcher.Invoke(cellInterpolationIndexToUnique,
 
  831                                  cellPointEdgeReverseConnectivity,
 
  836       scatterInCellPointConnectivity);
 
  837     scatterInCellDispatcher.Invoke(cellPointReverseConnectivity, connectivity);
 
  845     output.
Fill(numberOfPoints, shapes, connectivity, offset);
 
  853   template <
typename ArrayHandleType>
 
  865                      ArrayHandleType* output)
 
  887       template <
typename EdgeInterp, 
typename OutputFieldPortal>
 
  889                                 OutputFieldPortal& field,
 
  892         using T = 
typename OutputFieldPortal::ValueType;
 
  893         T v1 = field.Get(ei.Vertex1);
 
  894         T v2 = field.Get(ei.Vertex2);
 
  899           this->
RaiseError(
"Error in edge weight, assigned value not it interval [0,1].");
 
  914       template <
typename MappedValueVecType, 
typename MappedValueType>
 
  918         MappedValueType sum = toReduce[0];
 
  921           MappedValueType value = toReduce[i];
 
  923           sum = 
static_cast<MappedValueType
>(sum + value);
 
  929     template <
typename Storage>
 
  938       ArrayHandleType result;
 
  939       result.Allocate(numberOfOriginalValues + numberOfEdgePoints + numberOfInCellPoints);
 
  956         inCellInterpolationDispatcher;
 
  957       inCellInterpolationDispatcher.Invoke(interpolationKeys, toReduceValues, reducedValues);
 
  958       vtkm::Id inCellPointsOffset = numberOfOriginalValues + numberOfEdgePoints;
 
  960         reducedValues, 0, reducedValues.
GetNumberOfValues(), result, inCellPointsOffset);
 
  973   template <
typename IDLen, 
typename IDPos, 
typename IDList, 
typename VFList>
 
 1007                                     WholeArrayIn lengths,
 
 1008                                     WholeArrayIn positions,
 
 1009                                     WholeArrayInOut ids,
 
 1010                                     WholeArrayInOut vfs);
 
 1014       template <
typename EdgeInterp, 
typename IDL, 
typename IDO, 
typename IdsVec, 
typename VfsVec>
 
 1017                                 const IDO& positions,
 
 1027         multiplier[0] = ei.Weight;
 
 1031         idOff[1] = idOff[0];
 
 1032         idInd[0] = positions.Get(ei.Vertex1);
 
 1033         idInd[1] = positions.Get(ei.Vertex2);
 
 1034         idLen[0] = lengths.Get(ei.Vertex1);
 
 1035         idLen[1] = lengths.Get(ei.Vertex2);
 
 1044             if (idOff[i] < idLen[i])
 
 1046               vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1047               if (lowest == 
vtkm::Id(-1) || tmp < lowest)
 
 1059               if (idOff[i] < idLen[i])
 
 1061                 vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1064                   vfVal += multiplier[i] * vfs.Get(idInd[i] + idOff[i]);
 
 1069             ids.Set(positions.Get(this->EdgePointsOffset + workIndex) + uniqueMats, lowest);
 
 1070             vfs.Set(positions.Get(this->EdgePointsOffset + workIndex) + uniqueMats, vfVal);
 
 1090                                     WholeArrayInOut IDLengths,
 
 1091                                     WholeArrayIn IDOffsets,
 
 1095       template <
typename EdgeInterp, 
typename IDL, 
typename IDO, 
typename IdsVec, 
typename ELL>
 
 1098                                 const IDO& positions,
 
 1101                                 ELL& edgelength)
 const 
 1109         idOff[1] = idOff[0];
 
 1110         idInd[0] = positions.Get(ei.Vertex1);
 
 1111         idInd[1] = positions.Get(ei.Vertex2);
 
 1112         idLen[0] = lengths.Get(ei.Vertex1);
 
 1113         idLen[1] = lengths.Get(ei.Vertex2);
 
 1122             if (idOff[i] < idLen[i])
 
 1124               vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1125               if (lowest == 
vtkm::Id(-1) || tmp < lowest)
 
 1136               if (idOff[i] < idLen[i])
 
 1138                 vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1148         lengths.Set(this->EdgePointsOffset + workIndex, uniqueMats);
 
 1149         edgelength = uniqueMats;
 
 1158                                     WholeArrayIn IDLengths,
 
 1159                                     WholeArrayIn IDOffsets,
 
 1165       template <
typename MappedValueVecType,
 
 1166                 typename MappedValueType,
 
 1171                                 const IDArr& lengths,
 
 1172                                 const IDOff& positions,
 
 1174                                 MappedValueType& numIdNeeded)
 const 
 1188           idLen[i] = lengths.Get(toReduce[i]);
 
 1189           idInd[i] = positions.Get(toReduce[i]);
 
 1199             if (idOff[i] < idLen[i])
 
 1201               vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1202               if (lowest == 
vtkm::Id(-1) || tmp < lowest)
 
 1213               if (idOff[i] < idLen[i])
 
 1215                 vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1225         numIdNeeded = uniqueMats;
 
 1236         : 
offset(outputOffsetForBookkeeping)
 
 1241                                     WholeArrayIn IDLengths,
 
 1242                                     WholeArrayIn IDOffsets,
 
 1245                                     ReducedValuesIn indexOff,
 
 1246                                     ReducedValuesOut reindexedOut,
 
 1247                                     WholeArrayOut outputIDs,
 
 1248                                     WholeArrayOut outputVFs);
 
 1252       template <
typename MappedValueVecType,
 
 1262                                 const IDArr& lengths,
 
 1263                                 const IDOff& positions,
 
 1266                                 const IndexIn& localOffset,
 
 1267                                 IndexOut& globalOffset,
 
 1269                                 OutVF& outVFs)
 const 
 1272         globalOffset = localOffset + this->
offset;
 
 1286           idLen[i] = lengths.Get(toReduce[i]);
 
 1287           idInd[i] = positions.Get(toReduce[i]);
 
 1297             if (idOff[i] < idLen[i])
 
 1299               vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1300               if (lowest == 
vtkm::Id(-1) || tmp < lowest)
 
 1312               if (idOff[i] < idLen[i])
 
 1314                 vtkm::Id tmp = ids.Get(idInd[i] + idOff[i]);
 
 1317                   val += vfs.Get(idInd[i] + idOff[i]);
 
 1322             outVFs.Set(localOffset + uniqueMats, val / 
vtkm::Float64(numberOfPoints));
 
 1323             outIDs.Set(localOffset + uniqueMats, lowest);
 
 1344       lengthArr.
Allocate(numberOfOriginalPos + numberOfEdgePoints);
 
 1345       posArr.
Allocate(numberOfOriginalPos + numberOfEdgePoints);
 
 1353       edgeInterpDispatcher_C.Invoke(
 
 1384         incellCountWorklet);
 
 1385       cellCountDispatcher.Invoke(
 
 1386         interpolationKeys, toReduceValues, lengthArr, posArr, idArr, reducedIDCounts);
 
 1392                                                 idLengthFromJustEdges);
 
 1400       cellInterpDispatcher.Invoke(interpolationKeys,
 
 1418                                           numberOfOriginalPos + numberOfEdgePoints);
 
 1423                                           numberOfOriginalPos + numberOfEdgePoints);
 
 1425       *(this->
LenOut) = lengthArr;
 
 1426       *(this->
PosOut) = posArr;
 
 1427       *(this->
IDOut) = idArr;
 
 1428       *(this->
VFOut) = vfArr;
 
 1443   template <
typename LookbackArr, 
typename WeightArr>
 
 1452                              LookbackArr* output,
 
 1472                                     WholeArrayInOut inoutID,
 
 1473                                     WholeArrayInOut inoutWeights);
 
 1477       template <
typename EdgeInterp, 
typename InOutId, 
typename InOutWeight>
 
 1480                                 InOutWeight& field1,
 
 1490         keys[0] = field.Get(ei.Vertex1);
 
 1491         keys[1] = field.Get(ei.Vertex2);
 
 1492         weights[0] = field1.Get(ei.Vertex1);
 
 1493         weights[1] = field1.Get(ei.Vertex2);
 
 1501         mult[0] = ei.Weight;
 
 1508             if (curOff[i] < 8 &&
 
 1510                  ((keys[i])[curOff[i]] != 
vtkm::Id(-1) && (keys[i])[curOff[i]] < lowestID)))
 
 1512               lowestID = (keys[i])[curOff[i]];
 
 1514             if (curOff[i] < 8 && (keys[i])[curOff[i]] == 
vtkm::Id(-1))
 
 1523           centroid[j] = lowestID;
 
 1526             if (curOff[i] < 8 && lowestID == (keys[i])[curOff[i]])
 
 1528               weight[j] += mult[i] * weights[i][curOff[i]];
 
 1548                                     WholeArrayIn weights,
 
 1554       template <
typename IDs,
 
 1555                 typename VecOfVecIDs,
 
 1556                 typename VecOfVecWeights,
 
 1560                                 const VecOfVecIDs& keysIn,
 
 1561                                 const VecOfVecWeights& weightsIn,
 
 1563                                 VecWeight& weight)
 const 
 1577           keys[i] = keysIn.Get(ids[i]);
 
 1578           weights[i] = weightsIn.Get(ids[i]);
 
 1590             if (curOff[i] < 8 &&
 
 1592                  (tmp[curOff[i]] != 
vtkm::Id(-1) && tmp[curOff[i]] < lowestID)))
 
 1594               lowestID = tmp[curOff[i]];
 
 1597             if (curOff[i] < 8 && tmp[curOff[i]] == 
vtkm::Id(-1))
 
 1606           centroid[j] = lowestID;
 
 1610             if (curOff[i] < 8 && lowestID == tmp[curOff[i]])
 
 1612               auto w = weights[i];
 
 1613               weight[j] += w[curOff[i]];
 
 1626     template <
typename ValueType, 
typename ValueType1, 
typename Storage, 
typename Storage2>
 
 1637       result.Allocate(numberOfOriginalValues + numberOfEdgePoints + numberOfInCellPoints);
 
 1640       result2.Allocate(numberOfOriginalValues + numberOfEdgePoints + numberOfInCellPoints);
 
 1656         inCellInterpolationDispatcher;
 
 1657       inCellInterpolationDispatcher.Invoke(
 
 1658         interpolationKeys, toReduceValues, result, result2, reducedValues, reducedWeights);
 
 1659       vtkm::Id inCellPointsOffset = numberOfOriginalValues + numberOfEdgePoints;
 
 1661         reducedValues, 0, reducedValues.
GetNumberOfValues(), result, inCellPointsOffset);
 
 1663         reducedWeights, 0, reducedWeights.
GetNumberOfValues(), result2, inCellPointsOffset);
 
 1664       *(this->
Output) = result;
 
 1694     worker(orLookback, orWeights);
 
 1720     worker(orLen, orPos, orIDs, orVFs);
 
 1723   template <
typename ValueType, 
typename StorageType>
 
 1757 template <
typename IDType, 
typename FloatType>
 
 1766       IDType low = this->
PPos.Get(point);
 
 1767       IDType high = this->
PPos.Get(point) + this->
PLens.Get(point) - 1;
 
 1768       IDType matIdAt = -1;
 
 1771         IDType mid = (low + high) / 2;
 
 1772         IDType midMatId = this->
PIDs.Get(mid);
 
 1773         if (matID == midMatId)
 
 1778         else if (matID > midMatId)
 
 1782         else if (matID < midMatId)
 
 1789         return this->
PVFs.Get(matIdAt);
 
 1809   template <
typename IDInput, 
typename FloatInput>
 
 1810   MIRObject(
const IDInput& len, 
const IDInput& pos, 
const IDInput& ids, 
const FloatInput& floats)
 
 1844   template <
typename LenVec, 
typename PosVec, 
typename IdsVec, 
typename OutVec>
 
 1849                             OutVec& outlength)
 const 
 1860     ida lowest = ids.Get(pos[0]);
 
 1861     ida prevLowest = ida(-1);
 
 1862     ida largest = ida(-1);
 
 1869         ida tmp = ids.Get(idi);
 
 1874     while (prevLowest != lowest)
 
 1881           ida tmp = ids.Get(idi);
 
 1882           if (tmp < lowest && tmp > prevLowest)
 
 1889       prevLowest = ida(lowest);
 
 1890       lowest = ida(largest);
 
 1892     outlength = uniqueMats;
 
 1909   template <
typename LenVec,
 
 1921                             const PosVec2& posit,
 
 1923                             OutVec2& outvf)
 const 
 1934     ida lowest = ids.Get(pos[0]);
 
 1935     ida prevLowest = ida(-1);
 
 1936     ida largest = ida(-1);
 
 1943         ida tmp = ids.Get(idi);
 
 1948     while (prevLowest != lowest)
 
 1955           ida tmp = ids.Get(idi);
 
 1956           if (tmp < lowest && tmp > prevLowest)
 
 1962       outid.Set(posit + uniqueMats, lowest);
 
 1969           ida tmp = ids.Get(idi);
 
 1972             avg += vfs.Get(idi);
 
 1976       outvf.Set(posit + uniqueMats, avg / 
vtkm::Float64(numCells));
 
 1978       prevLowest = ida(lowest);
 
 1979       lowest = ida(largest);
 
 1990   template <
typename OutVec>
 
 1993     outlength = numPoints;
 
 2009   template <
typename CountArrayType>
 
 2015   template <
typename DA, 
typename prevID, 
typename OutVec, 
typename OutVec2, 
typename po
intVec>
 
 2020                             const prevID& previousID,
 
 2022                             OutVec2& prevOutVF)
 const 
 2026     prevOutVF = OutVec2(0);
 
 2027     outVF = mirobj.GetVFForPoint(pointIDs[index], this->
target, 0);
 
 2028     if (previousID == 0)
 
 2034       prevOutVF = mirobj.GetVFForPoint(pointIDs[index], previousID, 0);
 
 2050                                 ExecObject mirTables,
 
 2054   template <
typename Arrout, 
typename Po
intListIn, 
typename Dev, 
typename CellShape>
 
 2056                             const CellShape& cellShape,
 
 2057                             const Dev& mirTable,
 
 2058                             const PointListIn& vertPos,
 
 2059                             Arrout& volumeOut)
 const 
 2066     auto av1 = vertPos[0];
 
 2078       auto v1 = vertPos[p1];
 
 2079       auto v2 = vertPos[p2];
 
 2080       auto v3 = vertPos[p3];
 
 2085       totVol += vtkm::Abs(vtkm::Dot(v4, 
vtkm::Cross(v5, v6))) / 6;
 
 2096                                 WholeArrayIn origLen,
 
 2097                                 WholeArrayIn origPos,
 
 2098                                 WholeArrayIn origIDs,
 
 2099                                 WholeArrayOut newlengthsOut);
 
 2102   template <
typename Colors, 
typename ORL, 
typename ORP, 
typename ORID, 
typename NLO>
 
 2105                             const Colors& cellCol,
 
 2109                             NLO& outputLen)
 const 
 2115     vtkm::Id lowest = orgID.Get(orgPos.Get(0));
 
 2117     vtkm::Id orgLen1 = orgLen.Get(cellID);
 
 2118     vtkm::Id orgPos1 = orgPos.Get(cellID);
 
 2120     vtkm::Id largest = orgID.Get(orgLen1 + orgPos1 - 1);
 
 2128     while (prevLowest != largest)
 
 2130       if (originalInd < orgLen1)
 
 2132         lowest = orgID.Get(orgPos1 + originalInd);
 
 2137         if (tmp > prevLowest)
 
 2142       if (originalInd < orgLen1)
 
 2144         if (orgID.Get(orgPos1 + originalInd) == lowest)
 
 2151       prevLowest = lowest;
 
 2154     outputLen.Set(cellID, uniqueMats);
 
 2169                                 ValuesIn cellColors,
 
 2171                                 WholeArrayIn origLen,
 
 2172                                 WholeArrayIn origPos,
 
 2173                                 WholeArrayIn origIDs,
 
 2174                                 WholeArrayIn origVFs,
 
 2175                                 WholeArrayIn curLen,
 
 2176                                 WholeArrayIn curPos,
 
 2179                                 WholeArrayIn newLength,
 
 2180                                 WholeArrayIn newposition,
 
 2181                                 WholeArrayOut newIDs,
 
 2182                                 WholeArrayOut newVFs,
 
 2183                                 WholeArrayIn origVols,
 
 2186     void(
ValueCount, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17);
 
 2188   template <
typename Colors,
 
 2206                             const Colors& cellCol,
 
 2207                             const Vols& cellVolumes,
 
 2217                             const NLO& inputPos,
 
 2220                             const OVols& orgVols,
 
 2221                             TEO& totalErrorOut)
 const 
 2228     vtkm::Id lowest = orgID.Get(orgPos.Get(0));
 
 2230     vtkm::Id orgLen1 = orgLen.Get(cellID);
 
 2231     vtkm::Id orgPos1 = orgPos.Get(cellID);
 
 2233     vtkm::Id largest = orgID.Get(orgLen1 + orgPos1 - 1);
 
 2243     vtkm::Id currentIndex = curPos.Get(cellID);
 
 2244     vtkm::Id currentLens = curLen.Get(cellID) + currentIndex;
 
 2248     while (prevLowest != largest)
 
 2250       if (originalInd < orgLen1)
 
 2252         lowest = orgID.Get(orgPos1 + originalInd);
 
 2257         if (tmp > prevLowest)
 
 2268           totalVolForColor += cellVolumes[i];
 
 2271       if (originalInd < orgLen1)
 
 2273         if (orgID.Get(orgPos1 + originalInd) == lowest)
 
 2275           totalVolForColor -= orgVF.Get(orgPos1 + originalInd) * orgVols.Get(cellID);
 
 2281       if (currentIndex < currentLens)
 
 2284         if (curID.Get(currentIndex) == lowest)
 
 2286           prevTarget = curVF.Get(currentIndex);
 
 2291       prevTarget += this->lerping * (-totalVolForColor) / orgVols.Get(cellID);
 
 2292       totalError += vtkm::Abs(totalVolForColor);
 
 2297       inputIDs.Set(inputPos.Get(cellID) + uniqueMats, lowest);
 
 2301       prevLowest = lowest;
 
 2304     totalErrorOut = TEO(totalError);
 
 2315   template <
typename OO, 
typename OP, 
typename OQ, 
typename SHAPE>
 
 2358   template <
typename VO1, 
typename VO2>
 
 2375                                 WholeArrayIn originalVals,
 
 2379   template <
typename PID, 
typename PW, 
typename OV, 
typename NV>
 
 2383     newVals = 
static_cast<NV
>(ov.Get(pids[0]) * pws[0]);
 
 2392         newVals += 
static_cast<NV
>(ov.Get(pids[i]) * pws[i]);
 
  
_1 InputDomain
Definition: MIR.h:2378
 
vtkm::Id EdgePointsOffset
Definition: MIR.h:968
 
IDLen * LenOut
Definition: MIR.h:1437
 
VTKM_CONT vtkm::cont::ArrayHandle< IDType > getPointLenArr()
Definition: MIR.h:1803
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationKeys
Definition: MIR.h:1743
 
vtkm::cont::ArrayHandle< IDType, vtkm::cont::StorageTagBasic >::ReadPortalType PLens
Definition: MIR.h:1796
 
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
 
static VTKM_CONT void SortByKey(vtkm::cont::DeviceAdapterId devId, vtkm::cont::ArrayHandle< T, StorageT > &keys, vtkm::cont::ArrayHandle< U, StorageU > &values)
Definition: Algorithm.h:993
 
void(FieldIn pointIDs, FieldIn pointWeights, WholeArrayIn originalVals, FieldOut newVals) ControlSignature
Definition: MIR.h:2376
 
VTKM_EXEC void operator()(const CellShapeTag shape, const vtkm::Id workIndex, const vtkm::IdComponent pointcount, const PointVecType points, const ScalarVecType1 &curScalars, const ScalarVecType2 &newScalars, const ScalarPos &valPositionStart, const vtkm::Id &clipDataIndex, const MIRStats mirStats, const worklet::MIRCases::MIRTables::MIRDevicePortal< DeviceAdapter > &MIRData, ConnectivityObject &connectivityObject, IdArrayType &edgePointReverseConnectivity, EdgeInterpolationPortalType &edgePointInterpolation, IdArrayType &inCellReverseConnectivity, IdArrayType &inCellEdgeReverseConnectivity, EdgeInterpolationPortalType &inCellEdgeInterpolation, IdArrayType &inCellInterpolationKeys, IdArrayType &inCellInterpolationInfo, worklet::MIRParentObject::MIRParentPortal &parentObj, CellLookbackArr &cellLookbackArray) const
Definition: MIR.h:460
 
VTKM_CONT ConnectivityExplicit()=default
 
VTKM_EXEC void operator()(const vtkm::Id destinationIndex, ConnectivityDataType &destinationData) const
Definition: MIR.h:688
 
void(CellSetIn cellSet, FieldInCell lens, FieldInCell pos, WholeArrayIn ids, FieldOutPoint idcount) ControlSignature
Definition: MIR.h:1840
 
vtkm::Id NumberOfInCellPoints
Definition: MIR.h:59
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationKeys
Definition: MIR.h:1433
 
vtkm::cont::ArrayHandle< EdgeInterpolation > EdgeInterpolationArray
Definition: MIR.h:1669
 
#define VTKM_EXEC
Definition: ExportMacros.h:51
 
VTKM_CONT vtkm::cont::ArrayHandle< IDType > getPointIDArr()
Definition: MIR.h:1805
 
MIRObjectPortal PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: MIR.h:1818
 
Groups connected points that have the same field value.
Definition: Atomic.h:19
 
VTKM_CONT vtkm::cont::ArrayHandle< FloatType > getPointVFArr()
Definition: MIR.h:1806
 
vtkm::cont::ArrayHandle< IDType, vtkm::cont::StorageTagBasic >::ReadPortalType PPos
Definition: MIR.h:1797
 
vtkm::cont::ArrayHandle< vtkm::UInt8 > Shapes
Definition: MIR.h:209
 
void(CellShape, PointCount, _3, _2, _4, _5, _6, _7, _8, _9) ExecutionSignature
Definition: MIR.h:234
 
VFList * VFOut
Definition: MIR.h:1440
 
void(ValueCount, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) ExecutionSignature
Definition: MIR.h:2186
 
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
 
IdPortal Offsets
Definition: MIR.h:172
 
void(CellSetIn, FieldOutCell is2D, FieldOutCell is3D, FieldOutCell isOther) ControlSignature
Definition: MIR.h:2312
 
VTKM_EXEC void operator()(vtkm::IdComponent numCells, const LenVec &len, const PosVec &pos, const IdsVec &ids, OutVec &outlength) const
Definition: MIR.h:1845
 
WeightArr * Output2
Definition: MIR.h:1675
 
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
 
VTKM_CONT void Allocate(vtkm::Id numberOfValues, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const
Allocates an array large enough to hold the given number of values.
Definition: ArrayHandle.h:465
 
A control signature tag for output fields.
Definition: WorkletMapField.h:60
 
FieldInIncident FieldInCell
Definition: WorkletMapTopology.h:278
 
VTKM_CONT ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Prepares this array to be used as an input to an operation in the execution environment.
Definition: ArrayHandle.h:574
 
IncidentElementCount PointCount
Definition: WorkletMapTopology.h:267
 
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
 
A control signature tag for input values.
Definition: WorkletReduceByKey.h:70
 
_1 InputDomain
Definition: MIR.h:235
 
VTKM_EXEC void SetCellShape(vtkm::Id cellIndex, vtkm::UInt8 shape)
Definition: MIR.h:148
 
vtkm::Id target
Definition: MIR.h:642
 
VTKM_EXEC void swap(T &v1, T &v2) const
Definition: MIR.h:634
 
void(CellShape, InputIndex, PointCount, PointIndices, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) ExecutionSignature
Definition: MIR.h:448
 
Definition: MIRTables.h:11210
 
vtkm::cont::ArrayHandle< EdgeInterpolation > EdgePointsInterpolation
Definition: MIR.h:1742
 
VTKM_EXEC void operator()(const CellShapeTag shape, const vtkm::IdComponent pointCount, const ScalarFieldVec &prevVals, const ScalarFieldVec1 &newVals, const ScalarPos &valPositionStart, const vtkm::worklet::MIRCases::MIRTables::MIRDevicePortal< DeviceAdapter > &MIRData, const ParentObj &, const PreCol &prevCol, MIRStats &MIRStat, vtkm::Id &MIRDataIndex) const
Definition: MIR.h:244
 
vtkm::Id InCellPointsOffset
Definition: MIR.h:1673
 
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &originalLen, const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &originalPos, const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &originalIDs, const vtkm::cont::ArrayHandle< vtkm::Float64, vtkm::cont::StorageTagBasic > &originalVFs) const
Definition: MIR.h:1330
 
void(CellCount, _2, _3, _4, _5, _6, _7, _8) ExecutionSignature
Definition: MIR.h:1907
 
static VTKM_CONT void LowerBounds(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< T, CVal > &values, vtkm::cont::ArrayHandle< vtkm::Id, COut > &output)
Definition: Algorithm.h:604
 
VTKM_CONT ScatterEdgeConnectivity(vtkm::Id edgePointOffset)
Definition: MIR.h:648
 
VTKM_CONT ComputeStats(vtkm::Id target)
Definition: MIR.h:220
 
VTKM_EXEC vtkm::Id GetCaseIndex(vtkm::Id shape, vtkm::Id caseId, vtkm::IdComponent numPoints) const
Definition: MIRTables.h:11237
 
UInt8Portal Shapes
Definition: MIR.h:169
 
_1 InputDomain
Definition: MIR.h:2314
 
static VTKM_CONT bool CopySubRange(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, vtkm::cont::ArrayHandle< U, COut > &output, vtkm::Id outputIndex=0)
Definition: Algorithm.h:472
 
void(_1, _2, _3, _4) ExecutionSignature
Definition: MIR.h:2377
 
_1 InputDomain
Definition: MIR.h:1842
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationKeys
Definition: MIR.h:1670
 
vtkm::cont::ArrayHandle< vtkm::Id >::ReadPortalType CellColors
Definition: MIR.h:378
 
The ExecutionSignature tag to get the number of values.
Definition: WorkletReduceByKey.h:164
 
vtkm::cont::ArrayHandle< EdgeInterpolation > EdgeInterpolationArray
Definition: MIR.h:965
 
VTKM_CONT ScatterInCellConnectivity(vtkm::Id inCellPointOffset)
Definition: MIR.h:676
 
Binary Predicate that takes two arguments argument x, and y and returns the x if x > y otherwise retu...
Definition: BinaryOperators.h:85
 
VTKM_EXEC vtkm::UInt8 ValueAt(vtkm::Id idx) const
Definition: MIRTables.h:11294
 
VTKM_EXEC void SetConnectivity(vtkm::Id connectivityIndex, vtkm::Id pointIndex)
Definition: MIR.h:163
 
vtkm::Id EdgePointOffset
Definition: MIR.h:670
 
A traits-like class to get an CellShapeId known at compile time to a tag.
Definition: CellShape.h:89
 
vtkm::FloatDefault FloatType
Definition: CellAspectFrobeniusMetric.h:50
 
void(KeysIn cellID, ValuesIn cellColors, WholeArrayIn origLen, WholeArrayIn origPos, WholeArrayIn origIDs, WholeArrayOut newlengthsOut) ControlSignature
Definition: MIR.h:2099
 
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
 
vtkm::cont::ArrayHandle< vtkm::Id >::WritePortalType NewCellColors
Definition: MIR.h:379
 
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:150
 
void(FieldIn destinationIndices, WholeArrayOut destinationData) ControlSignature
Definition: MIR.h:681
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationInfo
Definition: MIR.h:1744
 
vtkm::Id NumberOfCells
Definition: MIR.h:54
 
IncidentElementIndices PointIndices
Definition: WorkletMapTopology.h:269
 
vtkm::cont::ArrayHandle< vtkm::Id > cellLookback
Definition: MIR.h:399
 
typename StorageType::ReadPortalType ReadPortalType
Definition: ArrayHandle.h:294
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationKeys
Definition: MIR.h:966
 
void(FieldIn sourceValue, FieldIn destinationIndices, WholeArrayOut destinationData) ControlSignature
Definition: MIR.h:655
 
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
 
vtkm::Id InCellPointsOffset
Definition: MIR.h:969
 
vtkm::Id EdgePointsOffset
Definition: MIR.h:1746
 
vtkm::Id Vertex2
Definition: Clip.h:85
 
_1 InputDomain
Definition: MIR.h:1908
 
InterpolateLookbackField(vtkm::cont::ArrayHandle< EdgeInterpolation > edgeInterpolationArray, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationKeys, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationInfo, vtkm::Id edgePointsOffset, vtkm::Id inCellPointsOffset, LookbackArr *output, WeightArr *output2)
Definition: MIR.h:1447
 
void(KeysIn cellID, ValuesIn cellColors, ValuesIn cellVols, WholeArrayIn origLen, WholeArrayIn origPos, WholeArrayIn origIDs, WholeArrayIn origVFs, WholeArrayIn curLen, WholeArrayIn curPos, WholeArrayIn curID, WholeArrayIn curVF, WholeArrayIn newLength, WholeArrayIn newposition, WholeArrayOut newIDs, WholeArrayOut newVFs, WholeArrayIn origVols, ReducedValuesOut totalErr) ControlSignature
Definition: MIR.h:2184
 
VTKM_EXEC void SetIndexOffset(vtkm::Id cellIndex, vtkm::Id indexOffset)
Definition: MIR.h:157
 
vtkm::cont::ArrayHandle< vtkm::Id > newCellLookback
Definition: MIR.h:395
 
Base ExecutionAndControlObjectBase class.
Definition: ExecutionAndControlObjectBase.h:28
 
LookbackArr * Output
Definition: MIR.h:1674
 
vtkm::Id NumberOfEdgeIndices
Definition: MIR.h:56
 
VTKM_EXEC void operator()(const vtkm::Id sourceValue, const vtkm::Id destinationIndex, ConnectivityDataType &destinationData) const
Definition: MIR.h:662
 
typename vtkm::cont::ArrayHandle< vtkm::UInt8 >::WritePortalType UInt8Portal
Definition: MIR.h:124
 
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
 
void(CellShape, _2, _3, _4) ExecutionSignature
Definition: MIR.h:2313
 
VTKM_EXEC void SetNewCellColor(vtkm::Id index, vtkm::Id col)
Definition: MIR.h:369
 
A scatter that maps input to some numbers of output.
Definition: ScatterCounting.h:44
 
vtkm::cont::ArrayHandle< FloatType, vtkm::cont::StorageTagBasic >::ReadPortalType PVFs
Definition: MIR.h:1799
 
VTKM_EXEC void operator()(const vtkm::IdComponent numCells, const vtkm::Id cellID, const Colors &cellCol, const ORL &orgLen, const ORP &orgPos, const ORID &orgID, NLO &outputLen) const
Definition: MIR.h:2103
 
VTKM_EXEC bool operator()(const EdgeInterpolation &v1, const EdgeInterpolation &v2) const
Definition: MIR.h:99
 
static VTKM_CONT void Unique(vtkm::cont::DeviceAdapterId devId, vtkm::cont::ArrayHandle< T, Storage > &values)
Definition: Algorithm.h:1063
 
IncidentElementCount CellCount
Definition: WorkletMapTopology.h:286
 
vtkm::Id targ
Definition: MIR.h:219
 
VTKM_EXEC vtkm::Id GetParentCellIndex(vtkm::Id index)
Definition: MIR.h:373
 
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
 
void(CellSetIn cellSet, FieldInCell lens, FieldInCell pos, WholeArrayIn ids, WholeArrayIn vfs, FieldInPoint actpos, WholeArrayOut idx, WholeArrayOut vfx) ControlSignature
Definition: MIR.h:1906
 
Base class for worklets that map from Cells to Points.
Definition: WorkletMapTopology.h:274
 
vtkm::cont::ArrayHandle< vtkm::Id > cellColors
Definition: MIR.h:400
 
VTKM_EXEC void operator()(const PID &pids, const PW &pws, const OV &ov, NV &newVals) const
Definition: MIR.h:2380
 
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
 
A control signature tag for input fields.
Definition: WorkletMapField.h:49
 
vtkm::Id NumberOfIndices
Definition: MIR.h:55
 
void(FieldIn pointIDs, FieldOut VecLookback, FieldOut VecWeights) ControlSignature
Definition: MIR.h:2355
 
IdComponentPortal NumberOfIndices
Definition: MIR.h:170
 
#define VTKM_IS_ARRAY_HANDLE(T)
Definition: ArrayHandle.h:132
 
Definition: WorkletReduceByKey.h:42
 
static VTKM_CONT T ScanExclusive(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:816
 
Implicitly permutes the values in an array.
Definition: ArrayHandlePermutation.h:227
 
vtkm::cont::ArrayHandle< vtkm::Id > newCellColors
Definition: MIR.h:394
 
MIR()
Definition: MIR.h:701
 
MIRObject(const IDInput &len, const IDInput &pos, const IDInput &ids, const FloatInput &floats)
Definition: MIR.h:1810
 
VTKM_EXEC_CONT vtkm::Vec< typename detail::FloatingPointReturnType< T >::Type, 3 > Cross(const vtkm::Vec< T, 3 > &x, const vtkm::Vec< T, 3 > &y)
Find the cross product of two vectors.
Definition: VectorAnalysis.h:177
 
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
 
VTKM_EXEC void SetNewCellLookback(vtkm::Id index, vtkm::Id originalIndex)
Definition: MIR.h:365
 
void ArrayCopy(const SourceArrayType &source, DestArrayType &destination)
Does a deep copy from one array to another array.
Definition: ArrayCopy.h:142
 
vtkm::cont::ArrayHandle< vtkm::Id > IdArrayType
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:90
 
vtkm::cont::ArrayHandle< ValueType > ProcessPointField(const vtkm::cont::ArrayHandle< ValueType, StorageType > &fieldData) const
Definition: MIR.h:1724
 
vtkm::cont::ArrayHandle< vtkm::Id > Offsets
Definition: MIR.h:212
 
typename vtkm::cont::ArrayHandle< vtkm::IdComponent >::WritePortalType IdComponentPortal
Definition: MIR.h:125
 
void(CellCount, _2, _3, _4, _5) ExecutionSignature
Definition: MIR.h:1841
 
vtkm::cont::ArrayHandle< IDType > pointPos
Definition: MIR.h:1829
 
VTKM_EXEC_CONT GenerateCellSet(vtkm::Id tar)
Definition: MIR.h:406
 
vtkm::Id EdgePointsOffset
Definition: MIR.h:1672
 
FieldInIncident FieldInPoint
Definition: WorkletMapTopology.h:259
 
#define VTKM_CONT
Definition: ExportMacros.h:57
 
vtkm::cont::ArrayHandle< vtkm::IdComponent > NumberOfIndices
Definition: MIR.h:210
 
A control signature tag for input keys.
Definition: WorkletReduceByKey.h:56
 
vtkm::cont::CellSetExplicit Run(const CellSet &cellSet, const VFList1 &prevValues, const VFList2 &curValues, const VFLocs &offsets, const IDList &prevIDs, const vtkm::Id &newID, const IDList &prevLookback, IDList &newIDs, IDList &newLookback)
Definition: MIR.h:712
 
InterpolateField(vtkm::cont::ArrayHandle< EdgeInterpolation > edgeInterpolationArray, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationKeys, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationInfo, vtkm::Id edgePointsOffset, vtkm::Id inCellPointsOffset, ArrayHandleType *output)
Definition: MIR.h:860
 
_1 InputDomain
Definition: MIR.h:2357
 
VTKM_CONT void Fill(vtkm::Id numPoints, const vtkm::cont::ArrayHandle< vtkm::UInt8, ShapesStorageTag > &cellTypes, const vtkm::cont::ArrayHandle< vtkm::Id, ConnectivityStorageTag > &connectivity, const vtkm::cont::ArrayHandle< vtkm::Id, OffsetsStorageTag > &offsets)
Second method to add cells – all at once.
 
typename StorageType::WritePortalType WritePortalType
Definition: ArrayHandle.h:295
 
typename vtkm::cont::ArrayHandle< vtkm::Id >::WritePortalType IdPortal
Definition: MIR.h:126
 
VTKM_CONT KeyArrayHandleType GetUniqueKeys() const
Definition: Keys.h:175
 
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< ValueType, Storage > &field) const
Definition: MIR.h:930
 
VTKM_CONT vtkm::cont::ArrayHandle< IDType > getPointPosArr()
Definition: MIR.h:1804
 
vtkm::cont::ArrayHandle< EdgeInterpolation > EdgeInterpolationArray
Definition: MIR.h:1432
 
uint8_t UInt8
Definition: Types.h:157
 
VTKM_EXEC void operator()(const SHAPE shape, OO &is2D, OP &is3D, OQ &isOther) const
Definition: MIR.h:2316
 
vtkm::cont::ArrayHandle< vtkm::Id >::ReadPortalType CellLookback
Definition: MIR.h:377
 
ArrayHandleType * Output
Definition: MIR.h:970
 
void(CellSetIn, WholeArrayIn prevVals, WholeArrayIn newVals, FieldInCell vf_pos, FieldInCell mirTableIndices, FieldInCell mirStats, ExecObject mirTables, ExecObject connectivityObject, WholeArrayOut edgePointReverseConnectivity, WholeArrayOut edgePointInterpolation, WholeArrayOut inCellReverseConnectivity, WholeArrayOut inCellEdgeReverseConnectivity, WholeArrayOut inCellEdgeInterpolation, WholeArrayOut inCellInterpolationKeys, WholeArrayOut inCellInterpolationInfo, ExecObject cellLookbackObj, WholeArrayOut simpleLookback) ControlSignature
Definition: MIR.h:427
 
VTKM_CONT MIRParentObject()=default
 
VTKM_CONT ComputeStats()=default
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationInfo
Definition: MIR.h:1671
 
VTKM_CONT MIRParentObject(vtkm::Id numCells, vtkm::cont::ArrayHandle< vtkm::Id > celllook, vtkm::cont::ArrayHandle< vtkm::Id > cellCol, vtkm::cont::ArrayHandle< vtkm::Id > newCellCol, vtkm::cont::ArrayHandle< vtkm::Id > newcellLook)
Definition: MIR.h:351
 
VTKM_CONT ExecutionConnectivityExplicit()=default
 
VTKM_EXEC void operator()(vtkm::Id &in, VO1 &lookback, VO2 &weights) const
Definition: MIR.h:2359
 
VTKM_EXEC vtkm::Id GetNumberOfShapes(vtkm::Id shape, vtkm::Id caseId, vtkm::IdComponent numPoints) const
Definition: MIRTables.h:11296
 
vtkm::Id NumberOfInCellInterpPoints
Definition: MIR.h:61
 
vtkm::cont::ArrayHandle< IDType > pointLen
Definition: MIR.h:1829
 
void(_1, _2) ExecutionSignature
Definition: MIR.h:683
 
FieldInVisit FieldInPoint
Definition: WorkletMapTopology.h:280
 
VTKM_CONT vtkm::cont::ArrayHandlePermutation< IndexArrayHandleType, ValueArrayHandleType > make_ArrayHandlePermutation(IndexArrayHandleType indexArray, ValueArrayHandleType valueArray)
make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform.
Definition: ArrayHandlePermutation.h:279
 
IdPortal Connectivity
Definition: MIR.h:171
 
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
 
Definition: DeviceAdapterTag.h:52
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationInfo
Definition: MIR.h:1434
 
VTKM_CONT vtkm::Id GetNumberOfPoints() const override
 
A short fixed-length array.
Definition: Types.h:767
 
VTKM_CONT_EXPORT void ConvertNumComponentsToOffsets(const vtkm::cont::UnknownArrayHandle &numComponentsArray, vtkm::cont::ArrayHandle< vtkm::Id > &offsetsArray, vtkm::Id &componentsArraySize, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny{})
 
VTKM_CONT void operator()(const vtkm::cont::ArrayHandle< ValueType, Storage > &fieldID, const vtkm::cont::ArrayHandle< ValueType1, Storage2 > &weightsField) const
Definition: MIR.h:1627
 
VTKM_CONT ConnectivityExplicit(const vtkm::cont::ArrayHandle< vtkm::UInt8 > &shapes, const vtkm::cont::ArrayHandle< vtkm::IdComponent > &numberOfIndices, const vtkm::cont::ArrayHandle< vtkm::Id > &connectivity, const vtkm::cont::ArrayHandle< vtkm::Id > &offsets, const MIRStats &stats)
Definition: MIR.h:182
 
IDList * IDOut
Definition: MIR.h:1439
 
vtkm::Float32 FloatDefault
The floating point type to use when no other precision is specified.
Definition: Types.h:198
 
void(InputIndex, _2, _3) ExecutionSignature
Definition: MIR.h:2356
 
vtkm::worklet::MIRStats Stats
Definition: MIR.h:213
 
vtkm::cont::ArrayHandle< vtkm::Id > InCellInterpolationInfo
Definition: MIR.h:967
 
Dispatcher for worklets that inherit from WorkletReduceByKey.
Definition: DispatcherReduceByKey.h:27
 
static VTKM_CONT U Reduce(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, U initialValue)
Definition: Algorithm.h:656
 
FieldOut FieldOutPoint
Definition: WorkletMapTopology.h:282
 
VTKM_EXEC_CONT T Scale(const T &val, vtkm::Float64 scale)
Definition: MIR.h:108
 
VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Prepares (allocates) this array to be used as an output from an operation in the execution environmen...
Definition: ArrayHandle.h:613
 
IDPos * PosOut
Definition: MIR.h:1438
 
vtkm::cont::ArrayHandle< FloatType > pointVFs
Definition: MIR.h:1830
 
VTKM_EXEC void operator()(const vtkm::IdComponent numCells, const vtkm::Id cellID, const Colors &cellCol, const Vols &cellVolumes, const ORL &orgLen, const ORP &orgPos, const ORID &orgID, const ORVF &orgVF, const CLen &curLen, const CPos &curPos, const CID &curID, const CVF &curVF, const NLen &, const NLO &inputPos, NID &inputIDs, NVF &inputVFs, const OVols &orgVols, TEO &totalErrorOut) const
Definition: MIR.h:2204
 
Definition: CastAndCall.h:36
 
VTKM_EXEC FloatType GetVFForPoint(IDType point, IDType matID, IDType) const
Definition: MIR.h:1764
 
_1 InputDomain
Definition: MIR.h:685
 
void ProcessSimpleMIRField(const vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Id, 8 >, vtkm::cont::StorageTagBasic > &orLookback, const vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Float64, 8 >, vtkm::cont::StorageTagBasic > &orWeights, vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Id, 8 >, vtkm::cont::StorageTagBasic > &newLookback, vtkm::cont::ArrayHandle< vtkm::Vec< vtkm::Float64, 8 >, vtkm::cont::StorageTagBasic > &newweights) const
Definition: MIR.h:1677
 
void(CellSetIn cellSet, ExecObject mirTables, FieldInPoint verts, FieldOutCell vol) ControlSignature
Definition: MIR.h:2052
 
vtkm::Id Vertex1
Definition: Clip.h:84
 
A tag for the basic implementation of a Storage object.
Definition: ArrayHandle.h:45
 
double Float64
Definition: Types.h:155
 
vtkm::Id NumberOfInCellEdgeIndices
Definition: MIR.h:62
 
_1 InputDomain
Definition: MIR.h:2101
 
_1 InputDomain
Definition: MIR.h:659
 
void(CellSetIn, WholeArrayIn curVals, WholeArrayIn prevVals, FieldInCell offsets, ExecObject mirTables, FieldInCell parentObj, FieldInCell prevCol, FieldOutCell stats, FieldOutCell caseID) ControlSignature
Definition: MIR.h:233
 
vtkm::cont::ArrayHandle< vtkm::Id >::WritePortalType NewCellLookback
Definition: MIR.h:380
 
VTKM_EXEC_CONT MIRStats operator()(const MIRStats &stat1, const MIRStats &stat2) const
Definition: MIR.h:67
 
VTKM_CONT ExecutionConnectivityExplicit(vtkm::cont::ArrayHandle< vtkm::UInt8 > shapes, vtkm::cont::ArrayHandle< vtkm::IdComponent > numberOfIndices, vtkm::cont::ArrayHandle< vtkm::Id > connectivity, vtkm::cont::ArrayHandle< vtkm::Id > offsets, MIRStats stats, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: MIR.h:133
 
vtkm::cont::ArrayHandle< vtkm::Id > Connectivity
Definition: MIR.h:211
 
CalcError(vtkm::Float64 errorLerp)
Definition: MIR.h:2164
 
vtkm::Id InCellPointsOffset
Definition: MIR.h:1747
 
vtkm::Id InCellPointOffset
Definition: MIR.h:696
 
vtkm::cont::ArrayHandle< vtkm::Id > CellMapOutputToInput
Definition: MIR.h:1745
 
VTKM_EXEC void SetNumberOfIndices(vtkm::Id cellIndex, vtkm::IdComponent numIndices)
Definition: MIR.h:151
 
void(PointCount, CellShape, _2, _3, _4) ExecutionSignature
Definition: MIR.h:2053
 
vtkm::cont::ArrayHandle< IDType > pointIDs
Definition: MIR.h:1829
 
InterpolateMIRFields(vtkm::cont::ArrayHandle< EdgeInterpolation > edgeInterpolationArray, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationKeys, vtkm::cont::ArrayHandle< vtkm::Id > inCellInterpolationInfo, vtkm::Id edgePointsOffset, vtkm::Id inCellPointsOffset, IDLen *output1, IDPos *output2, IDList *output3, VFList *output4)
Definition: MIR.h:977
 
The ExecutionSignature tag to use to get the visit index.
Definition: VisitIndex.h:43
 
MIRCases::MIRTables MIRTablesInstance
Definition: MIR.h:1741
 
vtkm::cont::ArrayHandle< IDType, vtkm::cont::StorageTagBasic >::ReadPortalType PIDs
Definition: MIR.h:1798
 
vtkm::Id numberOfInd
Definition: MIR.h:398
 
VTKM_EXEC EdgeVec GetEdge(vtkm::Id shape, vtkm::Id edgeId, vtkm::IdComponent numPoints) const
Definition: MIRTables.h:11353
 
vtkm::Float64 Weight
Definition: Clip.h:86
 
VTKM_CONT ExecutionConnectivityExplicit PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Definition: MIR.h:195
 
typename ArrayHandleType::ValueType ValueType
Definition: MIR.h:857
 
vtkm::Id NumberOfInCellIndices
Definition: MIR.h:60
 
VTKM_EXEC vtkm::Id GetParentCellColor(vtkm::Id index)
Definition: MIR.h:374
 
_1 InputDomain
Definition: MIR.h:2187
 
VTKM_EXEC void operator()(const vtkm::IdComponent pointCount, const CellShape &cellShape, const Dev &mirTable, const PointListIn &vertPos, Arrout &volumeOut) const
Definition: MIR.h:2055
 
VTKM_CONT void ReleaseResources() const
Releases all resources in both the control and execution environments.
Definition: ArrayHandle.h:559
 
void ProcessMIRField(const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > orLen, const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > orPos, const vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > orIDs, const vtkm::cont::ArrayHandle< vtkm::Float64, vtkm::cont::StorageTagBasic > orVFs, vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &newLen, vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &newPos, vtkm::cont::ArrayHandle< vtkm::Id, vtkm::cont::StorageTagBasic > &newIDs, vtkm::cont::ArrayHandle< vtkm::Float64, vtkm::cont::StorageTagBasic > &newVFs) const
Definition: MIR.h:1696
 
static VTKM_EXEC_CONT T ZeroInitialization()
Definition: TypeTraits.h:75
 
vtkm::Float64 lerping
Definition: MIR.h:2161
 
Definition: MIRTables.h:11205
 
VTKM_EXEC vtkm::Id GetNumberOfIndices(vtkm::Id shape) const
Definition: MIRTables.h:11213
 
void(ValueCount, _1, _2, _3, _4, _5, _6) ExecutionSignature
Definition: MIR.h:2100
 
VTKM_EXEC bool operator()(const EdgeInterpolation &v1, const EdgeInterpolation &v2) const
Definition: MIR.h:90
 
FieldInVisit FieldInCell
Definition: WorkletMapTopology.h:261
 
VTKM_EXEC void operator()(vtkm::IdComponent numCells, const LenVec &len, const PosVec &pos, const IdsVec &ids, const VfsVec &vfs, const PosVec2 &posit, OutVec &outid, OutVec2 &outvf) const
Definition: MIR.h:1916
 
vtkm::Id EdgePointsOffset
Definition: MIR.h:1435
 
VTKM_EXEC void RaiseError(const char *message) const
Definition: FunctorBase.h:40
 
void(_1, _2, _3) ExecutionSignature
Definition: MIR.h:657
 
An implicit array handle containing the its own indices.
Definition: ArrayHandleIndex.h:54
 
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
 
FieldOut FieldOutCell
Definition: WorkletMapTopology.h:263
 
Binary Predicate that takes two arguments argument x, and y and returns the x if x < y otherwise retu...
Definition: BinaryOperators.h:99
 
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:39
 
vtkm::Id InCellPointsOffset
Definition: MIR.h:1436
 
VTKM_CONT MIRParentPortal PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: MIR.h:384