Skip to content

Commit

Permalink
add more info for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
changliao1025 committed Sep 11, 2023
1 parent 2f85d77 commit 4334cee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyflowline/classes/basin.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,11 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
print('Error in split_flowline_to_edge.')

try:
print('Basin ', self.sBasinID, 'Start split flowline to edge')
print('Basin ', self.sBasinID, 'Start remove duplicate flowline')
ptimer.start()
aFlowline_basin_conceptual = remove_duplicate_flowline(aFlowline_basin_conceptual)
ptimer.stop()
sys.stdout.flush()
if self.iFlag_debug ==1:
sFilename_out = 'flowline_edge_remove_duplicate_flowline.geojson'
sFilename_out = os.path.join(sWorkspace_output_basin, sFilename_out)
Expand All @@ -748,6 +749,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
ptimer.start()
aFlowline_basin_conceptual = correct_flowline_direction(aFlowline_basin_conceptual, pVertex_outlet )
ptimer.stop()
sys.stdout.flush()
if self.iFlag_debug ==1:
sFilename_out = 'flowline_edge_correct_flowline_direction.geojson'
sFilename_out = os.path.join(sWorkspace_output_basin, sFilename_out)
Expand All @@ -760,6 +762,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
ptimer.start()
aFlowline_basin_conceptual = remove_flowline_loop(aFlowline_basin_conceptual )
ptimer.stop()
sys.stdout.flush()
if self.iFlag_debug ==1:
sFilename_out = 'flowline_edge_remove_flowline_loop.geojson'
sFilename_out = os.path.join(sWorkspace_output_basin, sFilename_out)
Expand All @@ -775,6 +778,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
aVertex, lIndex_outlet, aIndex_headwater,aIndex_middle, aIndex_confluence, aConnectivity, pVertex_outlet\
= find_flowline_confluence(aFlowline_basin_conceptual, pVertex_outlet)
ptimer.stop()
sys.stdout.flush()
if self.iFlag_debug ==1:
sFilename_out = 'flowline_vertex_with_confluence_after_intersect.geojson'
sFilename_out = os.path.join(sWorkspace_output_basin, sFilename_out)
Expand All @@ -788,6 +792,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
ptimer.start()
aFlowline_basin_conceptual = merge_flowline( aFlowline_basin_conceptual,aVertex, pVertex_outlet, aIndex_headwater,aIndex_middle, aIndex_confluence )
ptimer.stop()
sys.stdout.flush()
except:
print('Error in merge_flowline.')

Expand All @@ -799,6 +804,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
aVertex, lIndex_outlet, aIndex_headwater,aIndex_middle, aIndex_confluence, aConnectivity, pVertex_outlet\
= find_flowline_confluence(aFlowline_basin_conceptual, pVertex_outlet)
ptimer.stop()
sys.stdout.flush()
except:
print('Error in find_flowline_confluence.')

Expand All @@ -819,6 +825,7 @@ def reconstruct_topological_relationship(self, iMesh_type, sFilename_mesh):
ptimer.start()
aFlowline_basin_conceptual = define_stream_topology(aFlowline_basin_conceptual, aConfluence_basin_conceptual)
ptimer.stop()
sys.stdout.flush()

aFlowline_basin_conceptual, aStream_order = define_stream_order(aFlowline_basin_conceptual, aConfluence_basin_conceptual)

Expand Down

0 comments on commit 4334cee

Please sign in to comment.