Partial add dot output in ComputeDistributedContourTreeFunctor
This commit is contained in:
parent
94f4fcb408
commit
07b6744f31
@ -56,6 +56,7 @@
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/worklet/contourtree_augmented/Types.h>
|
||||
#include <vtkm/worklet/contourtree_distributed/DistributedContourTreeBlockData.h>
|
||||
#include <vtkm/worklet/contourtree_distributed/PrintGraph.h>
|
||||
|
||||
// clang-format off
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
@ -63,6 +64,7 @@ VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
// clang-format on
|
||||
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace worklet
|
||||
@ -306,32 +308,55 @@ public:
|
||||
os << "+++++++++++++++++ Contour Tree Mesh +++++++++++++++++" << std::endl;
|
||||
block->ContourTreeMeshes.back().PrintContent(os);
|
||||
|
||||
#if 0
|
||||
// TODO: GET THIS COMPILING
|
||||
// save the corresponding .gv file for the contour tree mesh
|
||||
std::string contourTreeMeshFileName = 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_0_Combined_Mesh.gv");
|
||||
std::ofstream contourTreeMeshFile(contourTreeMeshFileName);
|
||||
contourTreeMeshFile << 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 0 Combined Mesh"),
|
||||
block->ContourTreeMeshes.back(), worklet::contourtree_distributed::SHOW_CONTOUR_TREE_MESH_ALL);
|
||||
for (const int ingid : incoming)
|
||||
{
|
||||
// NOTE/IMPORTANT: In each round we should have only one swap partner (despite for-loop here).
|
||||
std::string contourTreeMeshFileName = 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_0_Combined_Mesh.gv");
|
||||
std::string contourTreeMeshLabel = 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 0 Combined Mesh");
|
||||
std::string contourTreeMeshString =
|
||||
vtkm::worklet::contourtree_distributed::ContourTreeMeshDotGraphPrint<FieldType>(
|
||||
contourTreeMeshLabel,
|
||||
block->ContourTreeMeshes.back(),
|
||||
worklet::contourtree_distributed::SHOW_CONTOUR_TREE_MESH_ALL);
|
||||
std::ofstream contourTreeMeshFile(contourTreeMeshFileName);
|
||||
contourTreeMeshFile << contourTreeMeshString;
|
||||
// TODO: GET THIS COMPILING. NEED TO LIKELY PUT THIS IN A SEPARATE FUNCTION TO GET THE STORAGE TYPE TEMPLATE PARAMETER
|
||||
#if 0
|
||||
// and the ones for the contour tree regular and superstructures
|
||||
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::string regularStructureLabel = 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 regularStructureString = worklet::contourtree_distributed::ContourTreeDotGraphPrint<FieldType, MeshType, vtkm::worklet::contourtree_augmented::IdArrayType()
|
||||
(regularStructureLabel,
|
||||
block->Meshes.back(),
|
||||
block->ContourTrees.back(),
|
||||
worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE|worklet::contourtree_distributed::SHOW_ALL_IDS);
|
||||
std::ofstream regularStructureFile(regularStructureFileName);
|
||||
regularStructureFile << regularStructureString;
|
||||
|
||||
// and the ones for the contour tree regular and superstructures
|
||||
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"),
|
||||
block->Meshes.back(),
|
||||
block->ContourTrees.back(),
|
||||
worklet::contourtree_distributed::SHOW_REGULAR_STRUCTURE|worklet::contourtree_distributed::SHOW_ALL_IDS);
|
||||
|
||||
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"),
|
||||
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);
|
||||
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"),
|
||||
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);
|
||||
#endif
|
||||
} // end for (const int ingid : incoming) outpyt dot
|
||||
#endif
|
||||
|
||||
// Compute BRACT
|
||||
|
Loading…
Reference in New Issue
Block a user