Skip to content
Snippets Groups Projects
Commit 49b65e96 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Save orientation of eddies in Graphtool graph

parent 3522b783
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
<key id="key11" for="node" attr.name="name" attr.type="int" />
<key id="key12" for="node" attr.name="pos_first" attr.type="vector_float" />
<key id="key13" for="node" attr.name="pos_last" attr.type="vector_float" />
<key id="key14" for="graph" attr.name="orientation" attr.type="string" />
<graph id="G" edgedefault="directed" parse.nodeids="canonical" parse.edgeids="canonical" parse.order="nodesfirst">
......@@ -25,6 +26,7 @@
<data key="key0">0</data>
<data key="key2">0</data>
<data key="key5">3401</data>
<data key="key14">Anticyclones</data>
<!-- vertices -->
<node id="n0">
......
......@@ -8,11 +8,13 @@
<key id="key1" for="edge" attr.name="cost_function" attr.type="float" />
<key id="key2" for="node" attr.name="name" attr.type="int" />
<key id="key3" for="node" attr.name="inst_eddies" attr.type="vector_int" />
<key id="key4" for="graph" attr.name="orientation" attr.type="string" />
<graph id="G" edgedefault="directed" parse.nodeids="canonical" parse.edgeids="canonical" parse.order="nodesfirst">
<!-- graph properties -->
<data key="key0">10</data>
<data key="key4">Anticyclones</data>
<!-- vertices -->
<node id="n0">
......
......@@ -6,6 +6,7 @@
<!-- property keys -->
<key id="key0" for="edge" attr.name="cost_function" attr.type="float" />
<key id="key1" for="graph" attr.name="e_overestim" attr.type="int" />
<key id="key2" for="graph" attr.name="orientation" attr.type="string" />
<key id="key3" for="node" attr.name="inst_eddies" attr.type="vector_int" />
<key id="key6" for="node" attr.name="name" attr.type="int" />
......@@ -13,6 +14,7 @@
<!-- graph properties -->
<data key="key1">10</data>
<data key="key2">Anticyclones</data>
<!-- vertices -->
<node id="n0">
......
......@@ -121,6 +121,11 @@ t1 = time.perf_counter()
timings.write(f"loading: {t1 - t0:.0f} s\n")
t0 = t1
# It is useful to save the orientation to the output graph of this
# script for further processing of the output graph by other scripts:
g.graph_properties["orientation"] = g.new_graph_property("string")
g.graph_properties["orientation"] = args.orientation
pos_first = g.new_vp('vector<double>')
pos_last = g.new_vp('vector<double>')
first_av_rad = g.new_vp('float')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment