mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Remove trailing whitespaces
This commit is contained in:
parent
11598d3348
commit
5353a1c3b2
@ -270,7 +270,7 @@ public:
|
||||
std::string regularStructureFileName = std::string("Rank_") + std::to_string(static_cast<int>(rank)) + std::string("_Block_") + std::to_string(static_cast<int>(block->BlockIndex)) + "_Round_" + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string("_Step_1_Contour_Tree_Regular_Structure.gv");
|
||||
std::ofstream regularStructureFile(regularStructureFileName);
|
||||
regularStructureFile << worklet::contourtree_distributed::ContourTreeDotGraphPrint<T, MeshType, vtkm::worklet::contourtree_augmented::IdArrayType()
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 1 Contour Tree Regular Structure"),
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 1 Contour Tree Regular Structure"),
|
||||
block->Meshes.back(),
|
||||
block->ContourTrees.back(),
|
||||
worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE|worklet::contourtree_distributed::SHOW_ALL_IDS);
|
||||
@ -278,7 +278,7 @@ public:
|
||||
std::string superStructureFileName = std::string("Rank_") + std::to_string(static_cast<int>(rank)) + std::string("_Block_") + std::to_string(static_cast<int>(block->BlockIndex)) + "_Round_" + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string("_Step_2_Contour_Tree_Super_Structure.gv");
|
||||
std::ofstream superStructureFile(superStructureFileName);
|
||||
superStructureFile << worklet::contourtree_distributed::ContourTreeDotGraphPrint<T, MeshType, vtkm::worklet::contourtree_augmented::IdArrayType()
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 2 Contour Tree Super Structure"),
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 2 Contour Tree Super Structure"),
|
||||
block->Meshes.back(),
|
||||
block->ContourTrees.back(),
|
||||
worklet::contourtree_distributed::SHOW_SUPER_STRUCTURE|worklet::contourtree_distributed::SHOW_HYPER_STRUCTURE|worklet::contourtree_distributed::SHOW_ALL_IDS|worklet::contourtree_distributed::SHOW_ALL_SUPERIDS|worklet::contourtree_distributed::SHOW_ALL_HYPERIDS);
|
||||
@ -348,7 +348,7 @@ public:
|
||||
std::ofstream boundaryTreeFile(boundaryTreeFileName);
|
||||
boundaryTreeFile << vtkm::worklet::contourtree_distributed::BoundaryTreeDotGraphPrint
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 3 Boundary Tree"),
|
||||
block->Meshes.back()],
|
||||
block->Meshes.back()],
|
||||
block->BoundaryTrees.back());
|
||||
|
||||
// and save the Interior Forest as another dot file
|
||||
@ -356,7 +356,7 @@ public:
|
||||
std::ofstream interiorForestFile(interiorForestFileName);
|
||||
interiorForestFileName << InteriorForestDotGraphPrintFile<MeshType>
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 4 Interior Forest"),
|
||||
block->InteriorForests.back(),
|
||||
block->InteriorForests.back(),
|
||||
block->ContourTrees.back(),
|
||||
block->BoundaryTrees.back(),
|
||||
block->Meshes.back());
|
||||
@ -366,7 +366,7 @@ public:
|
||||
std::ofstream boundaryTreeMeshFile(boundaryTreeMeshFileName);
|
||||
boundaryTreeMeshFile << vtkm::worklet::contourtree_distributed::ContourTreeMeshDotGraphPrint<FieldType>
|
||||
(std::string("Block ") + std::to_string(static_cast<int>(block->BlockIndex)) + " Round " + std::to_string(rp.round()) + " Partner " + std::to_string(ingid) + std::string(" Step 5 Boundary Tree Mesh"),
|
||||
block->ContourTreeMeshes.back(),
|
||||
block->ContourTreeMeshes.back(),
|
||||
worklet::contourtree_distributed::SHOW_CONTOUR_TREE_MESH_ALL);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -409,7 +409,7 @@ std::string ContourTreeDotGraphPrint(
|
||||
if (showMask & vtkm::worklet::contourtree_distributed::SHOW_BOUNDARY_NODES)
|
||||
isGrey = (showMask & vtkm::worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE) && mesh.liesOnBoundary(regularID);
|
||||
else if (showMask & vtkm::worklet::contourtree_distributed::SHOW_CRITICAL_BOUNDARY_NODES)
|
||||
isGrey = (showMask & vtkm::worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE) && mesh.isNecessary(regularID);
|
||||
isGrey = (showMask & vtkm::worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE) && mesh.isNecessary(regularID);
|
||||
else if (showMask & vtkm::worklet::contourtree_distributed::SHOW_NECESSARY_SUPERNODES)
|
||||
isGrey = (showMask & vtkm::worklet::contourtree_distributed::SHOW_SUPER_STRUCTURE) // skip if superstructure not shown
|
||||
&& !vtkm::worklet::contourtree_augmented::NoSuchElement(superID) // ignore non-super nodes
|
||||
|
@ -132,16 +132,16 @@ public:
|
||||
// convert into new IDs
|
||||
indexType newHypernodeID = nOldHypernodes + newHypernode;
|
||||
indexType newHypernodeSuperID = hierarchicalSuperID[oldSupernodeID];
|
||||
|
||||
|
||||
// store the new hypernode ID
|
||||
hierarchicalTree.hypernodes[newHypernodeID] = newHypernodeSuperID;
|
||||
|
||||
|
||||
// retrieve the hyperarc and convert, carrying masking bits
|
||||
indexType newHyperarcOldSuperID = hierarchicalHyperarc[oldSupernodeID];
|
||||
indexType isAscendingHyperarc = isAscending(newHyperarcOldSuperID) ? IS_ASCENDING : 0x0;
|
||||
newHyperarcOldSuperID = maskedIndex(newHyperarcOldSuperID);
|
||||
indexType newHyperarcNewSuperID = hierarchicalSuperID[newHyperarcOldSuperID] | isAscendingHyperarc;
|
||||
|
||||
|
||||
// and store it
|
||||
hierarchicalTree.hyperarcs[newHypernodeID] = newHyperarcNewSuperID;
|
||||
} // per new hypernode
|
||||
|
@ -180,7 +180,7 @@ public:
|
||||
indexType oldSuperparent = contourTree->superparents[oldSortIndex];
|
||||
// and to a regular ID
|
||||
indexType oldSuperparentNewRegularID = hierarchicalRegularID[oldSuperparent];
|
||||
|
||||
|
||||
// Assuming that the new supernodes & hypernodes have been transferred, EVERY supernode in the old tree
|
||||
// now has hierarchicalRegularID set correctly. Since every regular node belongs on a superarc in the old tree,
|
||||
// we can use the ends of the superarc to invoke a search in the hierarchical tree for the superparent.
|
||||
@ -196,7 +196,7 @@ public:
|
||||
indexType oldSupertargetOldSortID = contourTree->supernodes[oldSupertargetSuperID];
|
||||
indexType oldSupertargetOldRegularID = mesh->SortOrder(oldSupertargetOldSortID);
|
||||
indexType oldSupertargetNewRegularID = hierarchicalTreeID[oldSupertargetOldRegularID];
|
||||
|
||||
|
||||
// set up variables for our pruning search
|
||||
// collect the low end's values
|
||||
indexType lowEndRegularID = oldSuperarcAscends ? oldSuperparentNewRegularID : oldSupertargetNewRegularID;
|
||||
|
@ -133,10 +133,10 @@ public:
|
||||
// attachment points have NULL superarcs and can be ignored
|
||||
if (noSuchElement(hierarchicalTree.superarcs[newSupernode]))
|
||||
continue;
|
||||
|
||||
|
||||
// OK: we are now guaranteed to have a valid hyperparent
|
||||
indexType hyperparent = hierarchicalTree.hyperparents[newSupernode];
|
||||
|
||||
|
||||
// we could still be at the end of the array, so we have to test explicitly
|
||||
if (newSupernode == hierarchicalTree.supernodes.size() - 1)
|
||||
// compute the delta and store it
|
||||
|
@ -289,7 +289,7 @@ public:
|
||||
|
||||
// set the supernode accordingly
|
||||
hierarchicalTree.supernodes[newSupernodeID] = newRegularID;
|
||||
|
||||
|
||||
// and set the round and iteration
|
||||
hierarchicalTree.whichRound[newSupernodeID] = theRound;
|
||||
hierarchicalTree.whichIteration[newSupernodeID] = whenTransferred[oldSupernodeID];
|
||||
@ -351,7 +351,7 @@ public:
|
||||
// and we have to work out the supernode each connects to
|
||||
// unfortunately, the attachment points complicate this compared to the old code
|
||||
// for sweeping later, we will set the # of superchildren, but we don't have that yet
|
||||
|
||||
|
||||
// So the test will have to be the following:
|
||||
// i. the "neighbour" is the +1 index
|
||||
// ii. if the neighbour is off the end, we take the end of the hyperarc
|
||||
@ -374,7 +374,7 @@ public:
|
||||
else
|
||||
{ // not at the end of the array
|
||||
indexType nbrSuperID = newSupernodes[neighbour];
|
||||
|
||||
|
||||
// immediately check for case iii. by looking at the hierarchicalSuperparent of the neighbour's old ID
|
||||
// if it's already set, it's because it's an attachment point
|
||||
if (!noSuchElement(hierarchicalSuperparent[nbrSuperID]))
|
||||
|
@ -124,16 +124,16 @@ public:
|
||||
for (indexType activeSuper = 0; activeSuper < activeSuperarcs.size(); activeSuper++)
|
||||
{ // per active superarc
|
||||
indexType lowEnd = activeSuperarcs[activeSuper].low, highEnd = activeSuperarcs[activeSuper].high;
|
||||
|
||||
|
||||
// if the low end thinks it ascends to the high end and does not have a descent, then it must be a lower leaf, unless it's necessary (ie an attachment)
|
||||
if ((supernodeType[lowEnd] != IS_SADDLE) && (upNeighbour[lowEnd] == highEnd) && noSuchElement(downNeighbour[lowEnd]) && (!residue->isNecessary[lowEnd]))
|
||||
supernodeType[lowEnd] = IS_LOWER_LEAF;
|
||||
|
||||
|
||||
// symmetrically for the high end
|
||||
if ((supernodeType[highEnd] != IS_SADDLE) && (downNeighbour[highEnd] == lowEnd) && noSuchElement(upNeighbour[highEnd]) && (!residue->isNecessary[highEnd]))
|
||||
supernodeType[highEnd] = IS_UPPER_LEAF;
|
||||
} // per active superarc
|
||||
|
||||
|
||||
*/
|
||||
} // operator ()
|
||||
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
for (indexType activeSuper = 0; activeSuper < activeSuperarcs.size(); activeSuper++)
|
||||
{ // per active superarc
|
||||
indexType lowEnd = activeSuperarcs[activeSuper].low, highEnd = activeSuperarcs[activeSuper].high;
|
||||
|
||||
|
||||
// test to see whether the top end is critical
|
||||
if ((upNeighbour[lowEnd] == highEnd) && (supernodeType[highEnd] != IS_REGULAR))
|
||||
upNeighbour[lowEnd] |= TERMINAL_ELEMENT;
|
||||
|
@ -129,7 +129,7 @@ public:
|
||||
// and set criticality flags at both ends to attachment if they are necessary, regular otherwise
|
||||
indexType highType = residue->isNecessary[highEnd] ? IS_ATTACHMENT : IS_REGULAR;
|
||||
indexType lowType = residue->isNecessary[lowEnd] ? IS_ATTACHMENT : IS_REGULAR;
|
||||
|
||||
|
||||
supernodeType[lowEnd] = lowType;
|
||||
supernodeType[highEnd] = highType;
|
||||
} // per active superarc
|
||||
|
@ -229,10 +229,10 @@ public:
|
||||
indexType oldSortID = contourTree->supernodes[supernode];
|
||||
indexType oldRegularID = mesh->SortOrder(oldSortID);
|
||||
dataType dataValue = mesh->DataValue(oldRegularID);
|
||||
|
||||
|
||||
indexType upGlobalID = residue->above[supernode];
|
||||
indexType upHierarchicalID = hierTree.FindRegularByGlobal(upGlobalID);
|
||||
|
||||
|
||||
indexType dnGlobalID = residue->below[supernode];
|
||||
indexType dnHierarchicalID = hierTree.FindRegularByGlobal(dnGlobalID);
|
||||
|
||||
|
@ -248,7 +248,7 @@ public:
|
||||
// find the up & down neighbours
|
||||
indexType upNbr = maskedIndex(upNeighbour[high]);
|
||||
indexType downNbr = maskedIndex(downNeighbour[high]);
|
||||
|
||||
|
||||
// test the up neighbour first for leaf-hood
|
||||
// but only if the corresponding flag is true
|
||||
if (supernodeType[upNbr] == IS_UPPER_LEAF)
|
||||
@ -271,7 +271,7 @@ public:
|
||||
default:
|
||||
break;
|
||||
} // switch on upper end
|
||||
|
||||
|
||||
// test whether the bottom end is a lower leaf
|
||||
switch (supernodeType[low])
|
||||
{ // switch on lower end
|
||||
@ -290,7 +290,7 @@ public:
|
||||
// find the up & down neighbours
|
||||
indexType upNbr = maskedIndex(upNeighbour[low]);
|
||||
indexType downNbr = maskedIndex(downNeighbour[low]);
|
||||
|
||||
|
||||
// test the up neighbour first for leaf-hood
|
||||
if (supernodeType[upNbr] == IS_UPPER_LEAF)
|
||||
{ // up neighbour is an upper leaf
|
||||
|
@ -135,10 +135,10 @@ public:
|
||||
// test to see whether the superarc needs to be transferred
|
||||
if (residue->isNecessary[from] && residue->isNecessary[to])
|
||||
continue;
|
||||
|
||||
|
||||
// retrieve the position (note that -1 converts partial sum to prefix sum, since all values were 1's originally)
|
||||
indexType activeSuperarc = activeSuperarcID[superarc] - 1;
|
||||
|
||||
|
||||
// if to is higher
|
||||
if (isAscending(unmaskedTo))
|
||||
{ // to is higher
|
||||
|
Loading…
Reference in New Issue
Block a user