-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquickstart.html
330 lines (283 loc) · 31.1 KB
/
quickstart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tools — APP</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pycgns.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/pyCGNS-logo-tiny.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="CGNS.APP" href="_index.html" />
</head><body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="search.html" title="search"
accesskey="S">search</a>
</li>
<li class="right" >
<a href="../glossary.html" title="glossary"
accesskey="G">glossary</a>
|</li>
<li class="right" >
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
|</li>
<li class="right" >
<a href="_index.html" title="CGNS.APP"
accesskey="P">previous</a>
|</li>
<li class="right" >
<a href="../index.html" title="pyCGNS top page"
accesskey="M">top</a>
|</li>
<li><a href=../index.html>pyCGNS</a> »</li>
<li class="nav-item nav-item-0"><a href="_index.html">APP</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 align=center><a href="_index.html">
<img class="logo" src="_static/APP-logo-small.png" alt="pyCGNS"/>
</a></h1>
<div>
<h3><a href="_index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Tools</a><ul>
<li><a class="reference internal" href="#cg-list">cg_list</a></li>
<li><a class="reference internal" href="#cg-grep">cg_grep</a></li>
<li><a class="reference internal" href="#cg-link">cg_link</a></li>
</ul>
</li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="tools">
<h1>Tools<a class="headerlink" href="#tools" title="Permalink to this headline">¶</a></h1>
<p>A set of shell tools are built using <em>pyCGNS</em>. Some of them are dedicated to
a specific use of CGNS files and tree shape, you have to check the actual
effects of the tools on your own test data before any attempt on valuable
data.</p>
<div class="section" id="cg-list">
<h2>cg_list<a class="headerlink" href="#cg-list" title="Permalink to this headline">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">cg_list</span></code> is a kind of <code class="docutils literal notranslate"><span class="pre">ls</span></code> for CGNS files. There are many options
to help you decide wether this is the file you are looking for or not, its size,
its contents type…</p>
<p>You typically run <code class="docutils literal notranslate"><span class="pre">cg_list</span></code> to find out which are the CGNS files in
a directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_list
C.hdf
SUB.hdf
cubes_T1.hdf
cubes.hdf
naca0012.hdf
cube0_tetra.hdf
sqnz_hexa_NGON.cgns
T.hdf
</pre></div>
</div>
<p>Then you can go into further details on some of these files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_list -tBZVLM *cubes*
V L B Z M N
3.20 0 1 1 0.35 cube0_tetra.hdf
3.20 0 1 5 0.12 cubes.hdf
3.20 0 1 5 0.12 cubes_T1.hdf
</pre></div>
</div>
<p>The default is to skip files with a size >1Gb, but <code class="docutils literal notranslate"><span class="pre">cg_list</span></code> gives you
the list anyway and you can add the <code class="docutils literal notranslate"><span class="pre">-f</span></code> option to force the read of very
large files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_list
# skip file >1Gb : Validation-Triggers.hdf
# skip file >1Gb : JTI-GRC2-FUS+HEAD-ROD_Near.hdf
# skip file >1Gb : Last25.hdf
Jt.hdf
naca12_50dom.hdf
</pre></div>
</div>
<p>And you can set sorting option, to get a better view on number of items
some large files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_list -fs PZF -PZFt
F Z P N
1 1 5 ex_uns.hdf
2 50 76002 naca12_50dom.hdf
11 1 227206 supersonique.hdf
0 1 1070022 SNR.hdf
11 12 4245548 Jt.hdf
0 32 4474808 C2BP_I.hdf
26 32 4474808 C2BP_M.hdf
3 8 4794825 pale.hdf
80 97 11384652 T23_instat_R4.hdf
268 282 13978730 T23s_cfd#00000.hdf
754 739 58300347 Last25_msh.hdf
4 660 155858748 Last25.hdf
</pre></div>
</div>
<p>The -h option returns the following usage notice:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">cg_list</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="n">file1</span> <span class="n">file2</span> <span class="o">...</span>
<span class="n">List</span> <span class="n">tool</span> <span class="n">on</span> <span class="n">CGNS</span><span class="o">/</span><span class="n">HDF5</span> <span class="n">files</span>
<span class="p">(</span><span class="n">part</span> <span class="n">of</span> <span class="n">pyCGNS</span> <span class="n">distribution</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">pycgns</span><span class="o">.</span><span class="n">sourceforge</span><span class="o">.</span><span class="n">net</span><span class="p">)</span><span class="s1">'</span>
<span class="n">The</span> <span class="n">result</span> <span class="n">of</span> <span class="n">the</span> <span class="nb">list</span> <span class="ow">is</span> <span class="n">one</span> <span class="n">line</span> <span class="n">per</span> <span class="n">found</span> <span class="n">file</span><span class="o">/</span><span class="n">node</span><span class="o">.</span>
<span class="n">positional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="n">files</span>
<span class="n">optional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span> <span class="n">show</span> <span class="n">this</span> <span class="n">help</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">exit</span>
<span class="o">-</span><span class="n">V</span><span class="p">,</span> <span class="o">--</span><span class="n">version</span> <span class="n">show</span> <span class="n">version</span>
<span class="o">-</span><span class="n">B</span><span class="p">,</span> <span class="o">--</span><span class="n">base</span> <span class="n">number</span> <span class="n">of</span> <span class="n">bases</span>
<span class="o">-</span><span class="n">Z</span><span class="p">,</span> <span class="o">--</span><span class="n">zone</span> <span class="n">number</span> <span class="n">of</span> <span class="n">zones</span>
<span class="o">-</span><span class="n">S</span><span class="p">,</span> <span class="o">--</span><span class="n">structured</span> <span class="n">number</span> <span class="n">of</span> <span class="n">structured</span> <span class="n">zones</span>
<span class="o">-</span><span class="n">U</span><span class="p">,</span> <span class="o">--</span><span class="n">unstructured</span> <span class="n">number</span> <span class="n">of</span> <span class="n">unstructured</span> <span class="n">zones</span>
<span class="o">-</span><span class="n">F</span><span class="p">,</span> <span class="o">--</span><span class="n">family</span> <span class="n">number</span> <span class="n">of</span> <span class="n">families</span>
<span class="o">-</span><span class="n">L</span><span class="p">,</span> <span class="o">--</span><span class="n">links</span> <span class="n">number</span> <span class="n">of</span> <span class="n">links</span>
<span class="o">-</span><span class="n">M</span><span class="p">,</span> <span class="o">--</span><span class="n">mega</span> <span class="n">size</span> <span class="n">of</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">Mb</span>
<span class="o">-</span><span class="n">G</span><span class="p">,</span> <span class="o">--</span><span class="n">giga</span> <span class="n">size</span> <span class="n">of</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">Gb</span>
<span class="o">-</span><span class="n">P</span><span class="p">,</span> <span class="o">--</span><span class="n">points</span> <span class="n">total</span> <span class="n">number</span> <span class="n">of</span> <span class="n">points</span>
<span class="o">-</span><span class="n">r</span> <span class="n">PATH</span><span class="p">,</span> <span class="o">--</span><span class="n">restrict</span> <span class="n">PATH</span>
<span class="n">restrict</span> <span class="nb">all</span> <span class="n">counts</span> <span class="n">to</span> <span class="n">path</span> <span class="n">subtree</span>
<span class="o">-</span><span class="n">t</span><span class="p">,</span> <span class="o">--</span><span class="n">title</span> <span class="n">add</span> <span class="n">columns</span> <span class="n">header</span>
<span class="o">-</span><span class="n">k</span><span class="p">,</span> <span class="o">--</span><span class="n">keys</span> <span class="n">show</span> <span class="nb">list</span> <span class="n">of</span> <span class="n">keys</span>
<span class="o">-</span><span class="n">s</span> <span class="n">SORT</span><span class="p">,</span> <span class="o">--</span><span class="n">sort</span> <span class="n">SORT</span> <span class="n">sort</span> <span class="k">with</span> <span class="n">criteria</span> <span class="p">(</span><span class="n">see</span> <span class="n">doc</span> <span class="n">below</span><span class="p">)</span>
<span class="o">-</span><span class="n">a</span><span class="p">,</span> <span class="o">--</span><span class="nb">all</span> <span class="n">alias</span> <span class="k">for</span> <span class="o">-</span><span class="n">hVBLZSUWK</span>
<span class="o">-</span><span class="n">n</span><span class="p">,</span> <span class="o">--</span><span class="n">nolinks</span> <span class="n">do</span> <span class="ow">not</span> <span class="n">follow</span> <span class="n">links</span>
<span class="o">-</span><span class="n">f</span><span class="p">,</span> <span class="o">--</span><span class="n">force</span> <span class="n">force</span> <span class="n">parse</span> <span class="k">for</span> <span class="n">very</span> <span class="n">large</span> <span class="n">files</span> <span class="o">></span> <span class="mi">1</span><span class="n">Gb</span>
<span class="n">Sort</span> <span class="n">criteria</span><span class="p">:</span>
<span class="n">Each</span> <span class="n">letter</span> <span class="ow">is</span> <span class="n">a</span> <span class="n">key</span> <span class="k">for</span> <span class="n">the</span> <span class="n">sort</span> <span class="n">criteria</span><span class="o">.</span> <span class="n">With</span> <span class="n">the</span> <span class="n">key</span> <span class="n">K</span><span class="p">,</span> <span class="n">the</span> <span class="n">pattern</span>
<span class="n">K</span> <span class="ow">or</span> <span class="n">K</span><span class="o">+</span> <span class="ow">is</span> <span class="n">ascending</span> <span class="n">sort</span> <span class="n">on</span> <span class="n">key</span> <span class="n">K</span><span class="p">,</span> <span class="n">K</span><span class="o">-</span> <span class="ow">is</span> <span class="n">descending</span><span class="o">.</span>
<span class="n">Keys</span> <span class="n">are</span> <span class="n">N</span> <span class="k">for</span> <span class="n">filename</span><span class="p">,</span> <span class="n">B</span> <span class="n">number</span> <span class="n">of</span> <span class="n">bases</span><span class="p">,</span> <span class="n">Z</span> <span class="n">number</span> <span class="n">of</span> <span class="n">zones</span>
<span class="ow">and</span> <span class="n">so</span> <span class="n">on</span><span class="p">,</span> <span class="n">use</span> <span class="n">option</span> <span class="o">-</span><span class="n">k</span> <span class="n">to</span> <span class="n">have</span> <span class="n">key</span> <span class="nb">list</span> <span class="ow">and</span> <span class="o">-</span><span class="n">t</span> <span class="n">to</span> <span class="n">add</span> <span class="nb">list</span> <span class="n">header</span> <span class="n">leys</span><span class="o">.</span>
</pre></div>
</div>
</div>
<div class="section" id="cg-grep">
<h2>cg_grep<a class="headerlink" href="#cg-grep" title="Permalink to this headline">¶</a></h2>
<p>This tool is a grep on the CGNS file contents. It parses the file and
depending on your actual request it searches on node names, types, values,
paths, links…</p>
<p>For example you are looking for a file having a link to another one. The
following command looks at all CGNS files, stops at the first having a link:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_grep -sel '.*' *
C.hdf:/Blocks:S/WEST/ZAZA
</pre></div>
</div>
<p>To get all nodes having a link a a given file name:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cg_grep -ef 'naca12_50dom_dom4.*' naca12_50dom_TOP.hdf
naca12_50dom_TOP.hdf:/base1/dom4
naca12_50dom_TOP.hdf:/base1/dom40
naca12_50dom_TOP.hdf:/base1/dom41
naca12_50dom_TOP.hdf:/base1/dom42
naca12_50dom_TOP.hdf:/base1/dom43
naca12_50dom_TOP.hdf:/base1/dom44
naca12_50dom_TOP.hdf:/base1/dom45
naca12_50dom_TOP.hdf:/base1/dom46
naca12_50dom_TOP.hdf:/base1/dom47
naca12_50dom_TOP.hdf:/base1/dom48
naca12_50dom_TOP.hdf:/base1/dom49
</pre></div>
</div>
<p>Beware, as any other result of the grep command, the return is the matching
node, not the value. Once you have this node list, you can proceed to another
filter with <code class="docutils literal notranslate"><span class="pre">cg_list</span></code> for example:</p>
<p>The -h option returns the following usage notice:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">cg_grep</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="n">file1</span> <span class="n">file2</span> <span class="o">...</span>
<span class="n">Grep</span> <span class="n">tool</span> <span class="n">on</span> <span class="n">CGNS</span><span class="o">/</span><span class="n">HDF5</span> <span class="n">files</span>
<span class="p">(</span><span class="n">part</span> <span class="n">of</span> <span class="n">pyCGNS</span> <span class="n">distribution</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">pycgns</span><span class="o">.</span><span class="n">sourceforge</span><span class="o">.</span><span class="n">net</span><span class="p">)</span><span class="s1">'</span>
<span class="n">The</span> <span class="n">result</span> <span class="n">of</span> <span class="n">the</span> <span class="n">grep</span> <span class="ow">is</span> <span class="n">one</span> <span class="n">line</span> <span class="n">per</span> <span class="n">found</span> <span class="n">file</span><span class="o">/</span><span class="n">node</span><span class="p">,</span> <span class="k">with</span> <span class="n">the</span>
<span class="n">syntax</span> <span class="o"><</span><span class="n">file</span><span class="o">></span><span class="p">:</span><span class="o"><</span><span class="n">node</span><span class="o">-</span><span class="n">path</span><span class="o">></span>
<span class="n">positional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="n">files</span>
<span class="n">optional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span> <span class="n">show</span> <span class="n">this</span> <span class="n">help</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">exit</span>
<span class="o">-</span><span class="n">n</span> <span class="n">NAME</span><span class="p">,</span> <span class="o">--</span><span class="n">name</span> <span class="n">NAME</span> <span class="n">grep</span> <span class="n">on</span> <span class="n">node</span> <span class="n">name</span>
<span class="o">-</span><span class="n">t</span> <span class="n">SIDSTYPE</span><span class="p">,</span> <span class="o">--</span><span class="nb">type</span> <span class="n">SIDSTYPE</span>
<span class="n">grep</span> <span class="n">on</span> <span class="n">SIDS</span> <span class="nb">type</span> <span class="n">name</span>
<span class="o">-</span><span class="n">l</span> <span class="n">LINKPATH</span><span class="p">,</span> <span class="o">--</span><span class="n">linkpath</span> <span class="n">LINKPATH</span>
<span class="n">grep</span> <span class="n">on</span> <span class="n">a</span> <span class="n">path</span> <span class="n">of</span> <span class="n">a</span> <span class="n">link</span>
<span class="o">-</span><span class="n">f</span> <span class="n">LINKFILE</span><span class="p">,</span> <span class="o">--</span><span class="n">linkfile</span> <span class="n">LINKFILE</span>
<span class="n">grep</span> <span class="n">on</span> <span class="n">a</span> <span class="n">file</span> <span class="n">of</span> <span class="n">a</span> <span class="n">link</span>
<span class="o">-</span><span class="n">c</span><span class="p">,</span> <span class="o">--</span><span class="n">cut</span> <span class="n">leaf</span> <span class="n">only</span><span class="p">,</span> <span class="n">do</span> <span class="ow">not</span> <span class="n">propagate</span> <span class="n">to</span> <span class="n">subtrees</span> <span class="p">(</span><span class="n">cut</span> <span class="n">on</span> <span class="n">find</span><span class="p">)</span>
<span class="o">-</span><span class="n">e</span><span class="p">,</span> <span class="o">--</span><span class="n">regexp</span> <span class="n">args</span> <span class="n">can</span> <span class="n">contain</span> <span class="n">regular</span> <span class="n">expressions</span> <span class="p">(</span><span class="n">otherwise</span> <span class="n">plain</span>
<span class="n">strings</span> <span class="n">only</span><span class="p">)</span>
<span class="o">-</span><span class="n">s</span><span class="p">,</span> <span class="o">--</span><span class="n">stop</span> <span class="n">stop</span> <span class="n">at</span> <span class="n">first</span> <span class="n">found</span>
<span class="o">-</span><span class="n">p</span><span class="p">,</span> <span class="o">--</span><span class="n">path</span> <span class="k">return</span> <span class="n">only</span> <span class="n">the</span> <span class="n">path</span> <span class="n">of</span> <span class="n">the</span> <span class="n">matching</span> <span class="n">node</span><span class="p">,</span> <span class="n">no</span> <span class="n">filename</span>
<span class="n">Examples</span><span class="p">:</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">n</span> <span class="s1">'HybridBaseMerged'</span> <span class="o">*</span>
<span class="o">-</span> <span class="n">find</span> <span class="nb">all</span> <span class="n">nodes</span> <span class="k">with</span> <span class="n">the</span> <span class="n">name</span> <span class="s1">'HybridBaseMerged'</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">sn</span> <span class="s1">'HybridBaseMerged'</span> <span class="o">*</span>
<span class="o">-</span> <span class="n">find</span> <span class="n">he</span> <span class="n">first</span> <span class="n">file</span> <span class="k">with</span> <span class="n">a</span> <span class="n">node</span> <span class="n">having</span> <span class="n">the</span> <span class="n">name</span> <span class="s1">'HybridBaseMerged'</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">ct</span> <span class="s1">'GridConnectivityProperty_t'</span> <span class="o">*</span>
<span class="o">-</span> <span class="n">find</span> <span class="nb">all</span> <span class="n">GridConnectivityProperty_t</span> <span class="n">nodes</span> <span class="n">but</span> <span class="n">no</span> <span class="ow">not</span> <span class="k">continue</span> <span class="n">to</span> <span class="n">parse</span>
<span class="n">their</span> <span class="n">children</span> <span class="n">nodes</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">en</span> <span class="s1">'[Aa]ngle'</span> <span class="n">naca0012</span><span class="o">.</span><span class="n">hdf</span>
<span class="o">-</span> <span class="n">find</span> <span class="nb">all</span> <span class="n">nodes</span> <span class="k">with</span> <span class="s1">'Angle'</span> <span class="ow">or</span> <span class="s1">'angle'</span> <span class="k">as</span> <span class="n">substring</span> <span class="ow">in</span> <span class="n">of</span> <span class="n">the</span> <span class="n">node</span> <span class="n">name</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">en</span> <span class="s1">'^[Aa]ngle$'</span> <span class="n">naca0012</span><span class="o">.</span><span class="n">hdf</span>
<span class="o">-</span> <span class="n">find</span> <span class="nb">all</span> <span class="n">nodes</span> <span class="k">with</span> <span class="s1">'Angle'</span> <span class="ow">or</span> <span class="s1">'angle'</span> <span class="k">as</span> <span class="n">the</span> <span class="n">node</span> <span class="n">name</span>
<span class="n">cg_grep</span> <span class="o">-</span><span class="n">sel</span> <span class="s1">'.*'</span> <span class="o">*</span>
<span class="o">-</span> <span class="n">find</span> <span class="nb">all</span> <span class="n">links</span> <span class="ow">in</span> <span class="nb">all</span> <span class="n">CGNS</span><span class="o">/</span><span class="n">HDF5</span> <span class="n">files</span> <span class="ow">in</span> <span class="n">current</span> <span class="nb">dir</span><span class="p">,</span> <span class="n">stop</span> <span class="n">at</span> <span class="n">first</span>
<span class="n">file</span> <span class="n">found</span><span class="o">.</span> <span class="n">The</span> <span class="n">first</span> <span class="n">file</span> <span class="n">containing</span> <span class="n">at</span> <span class="n">least</span> <span class="n">one</span> <span class="n">link</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">result</span><span class="o">.</span>
</pre></div>
</div>
</div>
<div class="section" id="cg-link">
<h2>cg_link<a class="headerlink" href="#cg-link" title="Permalink to this headline">¶</a></h2>
<p>The link tool can be used to translate ADF links to HDF links for example,
or just to recursively browse existing links:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">cg_link</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="n">file1</span> <span class="n">file2</span> <span class="o">...</span>
<span class="n">Browsing</span> <span class="ow">and</span> <span class="n">editing</span> <span class="n">links</span> <span class="n">on</span> <span class="n">CGNS</span><span class="o">/</span><span class="n">HDF5</span> <span class="n">files</span>
<span class="p">(</span><span class="n">part</span> <span class="n">of</span> <span class="n">pyCGNS</span> <span class="n">distribution</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">pycgns</span><span class="o">.</span><span class="n">sourceforge</span><span class="o">.</span><span class="n">net</span><span class="p">)</span>
<span class="n">pyCGNS</span> <span class="n">v4</span><span class="mf">.4.481</span>
<span class="ne">Warning</span><span class="p">:</span> <span class="n">translation</span> <span class="n">of</span> <span class="n">ADF</span> <span class="n">files</span> <span class="ow">is</span> <span class="n">made</span> <span class="o">*</span><span class="ow">in</span> <span class="n">place</span><span class="o">*</span><span class="p">,</span> <span class="ow">in</span> <span class="n">other</span> <span class="n">word</span> <span class="k">if</span> <span class="n">a</span> <span class="n">link</span>
<span class="k">with</span> <span class="n">the</span> <span class="n">path</span> <span class="s1">'/A/C/D.adf'</span> <span class="ow">is</span> <span class="n">found</span><span class="p">,</span> <span class="n">its</span> <span class="n">translation</span> <span class="ow">is</span> <span class="s1">'/A/C/D.hdf'</span><span class="o">.</span> <span class="n">Then</span>
<span class="n">it</span> <span class="n">requires</span> <span class="n">correct</span> <span class="n">access</span> <span class="n">rights</span><span class="p">,</span> <span class="n">disk</span> <span class="n">place</span> <span class="ow">and</span> <span class="n">so</span> <span class="n">on</span><span class="o">...</span>
<span class="ne">Warning</span><span class="p">:</span> <span class="n">translation</span> <span class="n">of</span> <span class="n">ADF</span> <span class="n">files</span> <span class="n">requires</span> <span class="n">the</span> <span class="n">cgnsconvert</span> <span class="n">tool</span><span class="p">,</span> <span class="n">can</span> <span class="n">be</span>
<span class="n">found</span> <span class="n">on</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">cgns</span><span class="o">.</span><span class="n">org</span> <span class="n">tools</span>
<span class="n">positional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="n">files</span>
<span class="n">optional</span> <span class="n">arguments</span><span class="p">:</span>
<span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span> <span class="n">show</span> <span class="n">this</span> <span class="n">help</span> <span class="n">message</span> <span class="ow">and</span> <span class="n">exit</span>
<span class="o">-</span><span class="n">t</span><span class="p">,</span> <span class="o">--</span><span class="n">translate</span> <span class="n">translates</span> <span class="n">ADF</span> <span class="n">to</span> <span class="n">HDF</span> <span class="ow">and</span> <span class="n">propagates</span> <span class="n">through</span> <span class="n">links</span>
<span class="o">-</span><span class="n">l</span><span class="p">,</span> <span class="o">--</span><span class="n">linklist</span> <span class="nb">list</span> <span class="nb">all</span> <span class="n">link</span> <span class="n">entries</span>
<span class="o">-</span><span class="n">p</span><span class="p">,</span> <span class="o">--</span><span class="n">path</span> <span class="k">return</span> <span class="n">only</span> <span class="n">the</span> <span class="n">path</span> <span class="n">of</span> <span class="n">the</span> <span class="n">matching</span> <span class="n">node</span><span class="p">,</span> <span class="n">no</span> <span class="n">filename</span>
<span class="o">-</span><span class="n">v</span><span class="p">,</span> <span class="o">--</span><span class="n">verbose</span> <span class="n">trace</span> <span class="n">mode</span>
<span class="n">Examples</span><span class="p">:</span>
<span class="o">*</span> <span class="n">Recursively</span> <span class="n">translates</span> <span class="nb">all</span> <span class="n">ADF</span> <span class="n">files</span> <span class="p">(</span><span class="k">as</span> <span class="n">far</span> <span class="k">as</span> <span class="n">you</span> <span class="n">have</span> <span class="n">cgnsconvert</span><span class="p">)</span> <span class="ow">and</span>
<span class="n">sets</span> <span class="n">the</span> <span class="n">linked</span><span class="o">-</span><span class="n">to</span> <span class="n">file</span> <span class="n">names</span> <span class="n">to</span> <span class="n">these</span> <span class="ow">in</span><span class="o">-</span><span class="n">place</span> <span class="n">translated</span> <span class="n">files</span><span class="o">.</span> <span class="n">The</span>
<span class="n">verbose</span> <span class="n">mode</span> <span class="n">makes</span> <span class="n">cg_link</span> <span class="n">to</span> <span class="nb">print</span> <span class="nb">all</span> <span class="n">parsed</span> <span class="n">files</span><span class="p">:</span>
<span class="n">cg_link</span> <span class="o">-</span><span class="n">vt</span> <span class="mi">124</span><span class="n">Disk</span><span class="o">.</span><span class="n">cgns</span>
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018-2022, Marc Poinot.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
</div>
</body>
</html>