forked from topology-tool-kit/topology-tool-kit.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalyst-0.9.2.html
More file actions
782 lines (654 loc) · 29.8 KB
/
Copy pathcatalyst-0.9.2.html
File metadata and controls
782 lines (654 loc) · 29.8 KB
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="The Topology ToolKit">
<meta name="author" content="The Topology ToolKit">
<meta name="keywords" content="TTK, Topology ToolKit, Topological Data
Analysis, Visualization, Reeb graph, Reeb Space, Morse-Smale complex, contour
tree, persistence diagram, persistence curve, continuous scatterplot, fiber
surface, contour forests, jacobi set, mandatory critical points, topological
simplification, VTK, ParaView, Python" />
<title>TTK - the Topology ToolKit - Topological Data Analysis and
Visualization</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/clean-blog.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'
);
ga('create', 'UA-88087813-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-88087813-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type =
'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl'
: 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics -->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
Menu <i class="fa fa-bars"></i>
</button>
<a class="navbar-brand" href="index.html">
TTK Home</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling
-->
<div class="collapse navbar-collapse"
id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="gallery.html">Gallery</a>
</li>
<li>
<a href="downloads.html">Downloads</a>
</li>
<li>
<a href="installation.html">Installation</a>
</li>
<li>
<a href="tutorials.html">Tutorials</a>
</li>
<li>
<a href="documentation.html">Documentation</a>
</li>
<li>
<a href="events.html">Events</a>
</li>
<li>
<a href="contribute.html">Contribute</a>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
<header class="intro-header"
style="background-image: url('img/builtinExample.png'">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="page-heading">
<h1>Topology ToolKit</h1>
<hr class="small">
<span class="subheading">Tutorials</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p>
<iframe width="100%" height="420"
src="https://www.youtube.com/embed/CQrXCw1YJHY" frameborder="0"
allowfullscreen></iframe>
<h3>TTK in-situ with Catalyst</h3>
These notes describe the installation procedure of TTK for an in-situ usage with
<a href="https://www.paraview.org/in-situ/" target="new">Catalyst</a>.
In particular, this specific version of the notes describe the procedure for a
<a target="new"
href="http://releases.ubuntu.com/17.04/ubuntu-17.04-desktop-amd64.iso">Ubuntu
Linux 17.04</a>
operating system.<br>
<br>
Note that for an in-situ usage with Catalyst, TTK must be installed <b>twice</b>
(<b>same</b> version, 0.9.2):<br>
·
In an interactive client mode, on a system dedicated to the interactive design of the data analysis
and visualization pipeline, typically a workstation.
For this purpose, see the <a href=installation.html>main installation of TTK</a> and add
<code>PARAVIEW_USE_MPI=ON</code> at the step 5.a. <br>
·
In a batch server mode, on a system dedicated to the actual execution of the simulation code,
typically a high-performance system.
The remainder of these notes describe the installation for this batch server mode.<br>
<br>
For illustration purposes, the in-situ features of TTK will be showcased from within an existing
computational fluid dynamic simulation code, <a
href="http://code-saturne.org/cms/" target=new>Code_Saturne</a>,
which already implements Catalyst interfacing features. See the
<a
target="new" href="https://www.paraview.org/files/catalyst/docs/
ParaViewCatalystUsersGuide_v2.pdf">
Catalyst documentation</a> to interface your own simulation code with Catalyst.
</p>
<p>
<h4><a name="catalyst_downloads">1.</a> Downloads</h4>
The in-situ usage of TTK requires the installation of several third-party packages, <b>from source</b>:
<a target="new" href="ftp://ftp.freedesktop.org/pub/mesa/mesa-17.2.0.tar.gz">
Mesa version 17.2.0</a>,
<a
target="new"
href="http://www.paraview.org/paraview-downloads/download.php?submit
=Download&version=v5.4&type=
source&os=all&downloadFile=ParaView-v5.4.0.tar.gz">
ParaView version 5.4.0</a> and obviously <a
target="new"
href="https://codeload.github.com/topology-tool-kit/
ttk/tar.gz/v0.9.2">TTK version 0.9.2</a>.
</p>
<p>
<h4><a name="catalyst_dependencies">2.</a> Installing the dependencies</h4>
Several dependencies will need to be installed in order to compile the packages from source. Please enter
the following command (omit the <code>$</code> character) in a terminal to install them (please see the
documentation of your package manager if your operating system is not Ubuntu Linux):<br>
<br>
<code>$ sudo apt-get install cmake-curses-gui libvtk6-dev qt4-dev-tools llvm</code>
</p>
<p>
<h4><a name="catalyst_sources">3.</a> Preparing the sources</h4>
Move the tarballs to a working directory (for instance called <code>~/ttk/</code>) and decompress them by
entering the following commands in a terminal (this assumes that you downloaded the tarballs to the
<code>~/Downloads/</code> directory):<br>
<br>
<code>$ mkdir ~/ttk</code><br>
<code>$ mv ~/Downloads/mesa-17.2.0.tar.gz ~/ttk/</code><br>
<code>$ mv ~/Downloads/ParaView-v5.4.0.tar.gz ~/ttk/</code><br>
<code>$ mv ~/Downloads/ttk-0.9.2.tar.gz ~/ttk/</code><br>
<br>
<code>$ cd ~/ttk/</code><br>
<code>$ tar xvzf mesa-17.2.0.tar.gz</code><br>
<code>$ tar xvzf ParaView-v5.4.0.tar.gz</code><br>
<code>$ tar xvzf ttk-0.9.2.tar.gz</code><br>
<br>
Now , you can delete the tarballs after the source trees have been decompressed.<br>
<br>
<code>$ rm mesa-17.2.0.tar.gz</code><br>
<code>$ rm ParaView-v5.4.0.tar.gz</code><br>
<code>$ rm ttk-0.9.2.tar.gz</code><br>
</p>
<p>
<h4><a name="catalyst_patching">4.</a> Patching ParaView source tree</h4>
In order to enjoy the complete set of TTK features, we recommend at this stage to patch the ParaView source tree.
This step is optional. To proceed, go to the patch directory and apply it as follows:<br>
<br>
<code>$ cd ~/ttk/ttk-0.9.2/paraview/patch/</code><br>
<code>$ ./patch-paraview-5.4.0.sh ~/ttk/ParaView-v5.4.0/</code><br>
</p>
<p>
<h4><a name="catalyst_installing">5.</a> Configuring, building and installing</h4>
<b>a) Mesa</b><br>
To configure Mesa’s source tree, enter the following command (for more details about the
compilation flags, see this <a
target="new"
href="https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/">
blog entry</a>) :<br>
<br>
<code>$ cd ~/ttk/mesa-17.2.0/</code><br>
<code>$ mkdir build</code><br>
<code>$ cd build/</code><br>
<code>$ ../configure \</code><br>
<code>$ --disable-xvmc \</code><br>
<code>$ --disable-glx \</code><br>
<code>$ --disable-gbm \</code><br>
<code>$ --disable-dri \</code><br>
<code>$ --with-dri-drivers= \</code><br>
<code>$ --disable-egl \</code><br>
<code>$ --with-egl-platforms= \</code><br>
<code>$ --with-gallium-drivers=swrast \</code><br>
<code>$ --enable-texture-float \</code><br>
<code>$ --enable-gallium-osmesa</code><br>
<br>
Now you can start the compilation process by entering the following command, where N is the number
of available cores on your system:<br>
<br>
<code>$ make -jN</code><br>
<br>
Once the build is finished, enter the following command to install your build of ParaView on your system:<br>
<br>
<code>$ sudo make install</code><br>
<br>
<b>b) ParaView</b><br>
To enter the configuration menu of ParaView's build, enter the following commands:<br>
<br>
<code>$ cd ~/ttk/ParaView-v5.4.0/</code><br>
<code>$ mkdir build</code><br>
<code>$ cd build/</code><br>
<code>$ ccmake ../</code><br>
<br>
The configuration interface opens. Press <code>[c]</code> to configure and <code>[t]</code> to access the
advanced mode, use <code>/</code> to search a cmake option. Once the configuration is finished, please set
the following options as follows (required for TTK's installation):<br>
<br>
<code>CMAKE_BUILD_TYPE=Release</code><br>
<code>PARAVIEW_ENABLE_PYTHON=ON</code><br>
<code>PARAVIEW_INSTALL_DEVELOPMENT_FILES=ON</code><br>
<code>PARAVIEW_QT_VERSION=4</code><br>
<code>VTK_RENDERING_BACKEND=OpenGL2</code><br>
<br>
Additionally, to enable the in-situ usage of ParaView, please set the following
additional options (for further details, see this <a
target="new"
href="https://www.paraview.org/Wiki/
ParaView/ParaView_And_Mesa_3D#Configuring_ParaView_for_use_with_OSMesa">documentation</a>):<br>
<br>
<code>PARAVIEW_ENABLE_CATALYST=ON</code><br>
<code>PARAVIEW_USE_MPI=ON</code><br>
<code>PARAVIEW_BUILD_QT_GUI=OFF</code><br>
<code>VTK_USE_X=OFF</code><br>
<code>OPENGL_INCLUDE_DIR=</code><br>
<code>OPENGL_xmesa_INCLUDE_DIR=</code><br>
<code>OPENGL_gl_LIBRARY=</code><br>
<code>OPENGL_glu_LIBRARY=</code><br>
<code>OSMESA_INCLUDE_DIR=/usr/local/include</code><br>
<code>OSMESA_LIBRARY=/usr/local/lib/libOSMesa.so</code><br>
<code>VTK_OPENGL_HAS_OSMESA=ON</code><br>
<code>VTK_USE_OFFSCREEN=OFF</code><br>
<br>
Next, press<code>[g]</code> to generate
and close the configuration
interface when the generation is completed.<br>
<br>
Now you can start the compilation process by entering the following command, where N
is the number of available cores on your system (this will take a LONG time):<br>
<br>
<code>$ make -jN</code><br>
<br>
Once the build is finished, enter the following command to install your build of ParaView on your system:<br>
<br>
<code>$ sudo make install</code><br>
<br>
<b><a name="catalyst_ttk_cmake">c) TTK</a></b><br>
To enter the configuration menu of TTK's build, enter the following commands:<br>
<br>
<code>$ cd ~/ttk/ttk-0.9.2/</code><br>
<code>$ mkdir build</code><br>
<code>$ cd build/</code><br>
<code>$ ccmake ../</code><br>
<br>
The configuration interface opens. Press <code>[c]</code> to configure. At this stage, under Linux,
TTK's build should be automatically configured correctly by default so you can press <code>[g]</code> to
generate.<br>
<br>
Once the generation is completed,
start the
compilation process by entering the following command, where N is the number of available cores on your system
(this will take a LONG time):<br>
<br>
<code>$ make -jN</code><br>
<br>
Once the build is finished, enter the following command to install your build of TTK on your system:<br>
<br>
<code>$ sudo make install</code><br>
</p>
<p>
<h4><a name="catalyst_usecase">6.</a> A computational fluid dynamics use-case: Code_Saturne</h4>
In the remainder of this tutorial, we will switch to a concrete use-case of in-situ usage of TTK with Catalyst.
For this, we will focus on a computational fluid dynamics simulation code, Code_Saturne, which already
implements interfacing features with Catalyst.<br>
<br>
In particular, we will go through the following main steps:<br>
· install all the required software packages [client and server]<br>
· generate a first representative data set with Code_Saturne [client]<br>
· create an analysis and visualization pipeline for the representative data set with TTK [client]<br>
· export the analysis and visualization pipeline with Catalyst [client]<br>
· integrate the Catalyst/TTK script into Code_Saturne [client, then server]<br>
<br>
<b>a) Downloads (both systems, client and server)</b><br>
The Code_Saturne source tree (version 5.0.4) can be downloaded <a
target="new"
href="http://code-saturne.org/cms/sites/
default/files/releases/code_saturne-5.0.4.tar.gz">here</a>.<br>
The Code_Saturne tutorial example that we will use in the remainder can be
downloaded <a
target="new"
href="http://
code-saturne.org/cms/sites/default/files/file_attach/Tutorial/version-5.0/01_simple_junction.pdf">there</a>.<br>
<br>
<b>b) Installing the dependencies (both systems, client and server)</b><br>
Several dependencies will need to be installed in order to compile the packages from source. Please enter
the following command (omit the <code>$</code> character) in a terminal to install them (please see the
documentation of your package manager if your operating system is not Ubuntu Linux):<br>
<br>
<code>$ sudo apt-get install pyqt4-dev-tools</code>
</p>
<b>c) Preparing the sources (both systems, client and server)</b><br>
Move the tarballs to a working directory (for instance called <code>~/ttk/</code>) and decompress them
by entering the following commands in a terminal (this assumes that you downloaded the tarballs to the
<code>~/Downloads/</code> directory):<br>
<br>
<code>$ mv ~/Downloads/code_saturne-5.0.4.tar.gz ~/ttk/</code><br>
<code>$ cd ~/ttk/</code><br>
<code>$ tar xvzf code_saturne-5.0.4.tar.gz</code><br>
<code>$ rm code_saturne-5.0.4.tar.gz</code><br>
<br>
<b>d) Configuring, building and installing Code_Saturne (both systems, client and server)</b><br>
To configure Code_Saturne’s source tree, enter the following commands:<br>
<br>
<code>$ cd ~/ttk/code_saturne-5.0.4/</code><br>
<code>$ mkdir build</code><br>
<code>$ cd build/</code><br>
<code>$ ../configure \</code><br>
<code>$ --with-catalyst=/usr/local/ \</code><br>
<code>$ --disable-catalyst-as-plugin</code><br>
<br>
Now you can start the compilation process by entering the following command, where N is the number
of available cores on your system (this will take a LONG time):<br>
<br>
<code>$ make -jN</code><br>
<br>
Once the build is finished, enter the following command to install your build of Code_Saturne on your system:<br>
<br>
<code>$ sudo make install</code><br>
<br>
<b>e) Post-installation configuration (both systems, client and server)</b><br>
Once Code_Saturne is installed, append the following lines in the file <code>~/.bashrc</code>:<br>
<br>
<code>export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH</code><br>
<code>export LD_LIBRARY_PATH=/usr/local/lib/paraview-5.4:$LD_LIBRARY_PATH</code><br>
<br>
And to apply these modifications on the current shell, enter:<br>
<br>
<code>$ source ~/.bashrc</code><br>
<br>
<b>f) Creating the representative Code_Saturne data set (client system)</b><br>
Now, following the <a
target="new"
href="http://code-saturne.org/cms/sites/default/files/file_attach/Tutorial/
version-5.0
/01_simple_junction.pdf">Code_Saturne tutorial example</a>, we will prepare the computation directories.
Create the study <code>simple_junction</code> and the calculation directory <code>case1</code> by entering
the commands:<br>
<br>
<code>$ cd ~/ttk/</code><br>
<code>$ code_saturne create -s simple_junction -c case1</code><br>
<br>
More details on how to change the parameters of the study can be found in the tutorial.
In the following, we will use the pre-configured study located in Code_Saturne source
files <code>~/ttk/code_saturne-5.0.4/examples/simple_junction/</code> and launch the simulation.<br>
<br>
<code>$ cd ~/ttk/simple_junction/case1/DATA/</code><br>
<code>$ cp ~/ttk/code_saturne-5.0.4/examples/1-simple_junction/case1/case1.xml .</code><br>
<code>$ cd ~/ttk/simple_junction/MESH/</code><br>
<code>$ cp ~/ttk/code_saturne-5.0.4/examples/1-simple_junction/mesh/downcomer.des .</code><br>
<code>$ cd ~/ttk/simple_junction/case1/</code><br>
<code>$ code_saturne run --param case1.xml</code><br>
<br>
Once this step is finished, a representative Code_Saturne data set is generated. We will use this data
set next to design our analysis and visualization pipeline with TTK.<br>
To visualize the representative data set, open in ParaView the file <code>RESULTS_ENSIGHT.case</code> in the
directory <code>~/ttk/simple_junction/case1/RESU/<date-time>/postprocessing/</code><br>
<br>
<b>g) Generating the Catalyst script (client system)</b><br>
We will describe here the general procedure to generate automatically a ParaView Catalyst pipeline, applied
to a simple junction testcase but more details can be found in the <a
target="new"
href="https://www.paraview.org/files/
catalyst/docs/ParaViewCatalystUsersGuide_v2.pdf">ParaView Catalyst User’s Guide</a>.<br>
<br>
The first step is to start the interactive ParaView <b>on the client system</b> (typically a workstation) and
load the <code>CatalystScriptGenerator</code> plugin in the <code>Manage Plugins</code> wizard under the
<code>Tools</code> menu. Next, in order to create an analysis and visualization pipeline, we provide a
ParaView state file that reproduces the first default built-in example of TTK (critical points, warped
view, persistence curve and persistence diagram), download it
<a href="stuff/paraview_pipeline-0.9.2.pvsm">here</a>. In ParaView, click on the
<code>Load State…</code> wizard under the <code>File</code> menu. Then modify the <code>Case File
Name</code> to match the location of the file <code>RESULTS_ENSIGHT.case</code> and click on the
<code>OK</code> button.<br>
<br>
<div class=caption>
<a href="img/paraview_load_state.png">
<img width="70%" src="img/paraview_load_state.png">
</a>
</div>
<br>
ParaView will apply the visualization pipeline on the dataset and you should obtain something similar to
the screenshot below:<br>
<br>
<div class=caption>
<a href="img/paraview_pipeline.png">
<img width="100%" src="img/paraview_pipeline.png">
</a>
</div>
<br>
Once the full pipeline has been created, a Python script must be exported from ParaView. This is done by
choosing the <code>Export State</code> wizard under the <code>CoProcessing</code> menu. After that, you
must select the sources (i.e. pipeline objects without any input connections, in this example:
<code>RESULTS_ENSIGHT.case</code>) and click on <code>Next</code>. The next page in the wizard offers
several rendering options, select Output rendering components i.e. views, you will be able to modify a
few other options such as the type and the name of the output images or the write frequency, ...etc.<br>
You can iterate through the rendering views with the buttons <code>Previous View</code> and
<code>Next View</code>.<br>
<br>
<code>Image Type: png</code><br>
<code>Write Frequency: 1</code><br>
<code>Magnification: 1</code><br>
<br>
For the rendering views, use the following parameters (screenshot below):<br>
<br>
<div class="flex-container">
<a href="img/paraview_export1.png">
<img class="flex-item" src="img/paraview_export1.png">
</a>
<a href="img/paraview_export2.png">
<img class="flex-item" src="img/paraview_export2.png">
</a>
</div><br>
For the rendering views of the persistence diagram and curve, check also the parameter
<code>Fit the Screen</code> as shown by the images below:<br>
<br>
<div class="flex-container">
<a href="img/paraview_export3.png">
<img class="flex-item" src="img/paraview_export3.png">
</a>
<a href="img/paraview_export4.png">
<img class="flex-item" src="img/paraview_export4.png">
</a>
</div><br>
The persistence diagram itself is configured to be written every 10 time-steps in the <code>Properties</code>
panel of the <code>ParallelUnstructuredGridWriter1</code> filter in the pipeline (screenshot below).<br>
<br>
<div class=caption>
<a href="img/paraview_parallel_writer.png">
<img width="60%" src="img/paraview_parallel_writer.png">
</a>
</div>
<br>
Finally, click on the <code>Finish</code> button to create the Python script and name it
<b>ttk_pipeline.py</b>.<br>
<br>
<b>h) Patching the Catalyst script (client system)</b><br>
To automatically load the TTK plugins, add these lines of code just below the two Python
<code>import</code> lines in the pre-configured script <code>ttk_pipeline.py</code> like in the image below:<br>
<br>
<code>import glob</code><br>
<code>import os</code><br>
<code>from os.path import join as ttk_path_join</code><br>
<code>ttk_plugins_path = "/usr/local/lib/paraview-5.4/plugins/"</code><br>
<code>for x in glob.glob(ttk_path_join(</code><br>
<code class="tab2">ttk_plugins_path,'*.so' if os.name=='posix' else '*.dll')):</code><br>
<code class="tab1">LoadPlugin(x, ns=globals())</code><br>
<br>
<div class=caption>
<a href="img/catalyst_script_patch-0.9.2.png">
<img width="90%" src="img/catalyst_script_patch-0.9.2.png">
</a>
</div>
<br>
Note that <code>/usr/local/lib/paraview-5.4/plugins/</code> is the default location where TTK plugins are
installed. Please change this path according to the values set at <a href="#catalyst_ttk_cmake">step 5.c</a>
(cmake configuration of TTK).<br>
<br>
<b>i) Integrating the Catalyst script in the Code_Saturne project (client system)</b><br>
To configure the project to use Catalyst and execute the script in-situ, enter the commands:<br>
<br>
<code>$ cd ~/ttk/simple_junction/case1/DATA/</code><br>
<code>$ ./SaturneGUI case1.xml &</code><br>
<br>
The study configuration tool of Code_Saturne opens. In the left panel, click on
<code>Calculation control</code> then in the drop-down menu click on <code>Output control</code>, this
will update the central part of the window and show the options related to the generation of the results.
Select the <code>Writer</code> tab and click on the <code>+</code> button at the bottom to add a new writer
module. Configure the writer module with the following parameters (as shown by the screenshot image below):<br>
<br>
<code>Name: ttk_pipeline</code><br>
<code>Id: 1</code><br>
<code>Format: Catalyst</code><br>
<code>Directory: postprocessing</code><br>
<br>
Then modify the writing frequency to suit your needs, here is an example:<br>
<br>
<code>Frequency:</code><br>
<code class="tab1">· Output every ‘n’ time steps</code><br>
<code class="tab1">· 1</code><br>
<code class="tab1">· Output at end of calculation</code><br>
<br>
<div class=caption>
<a href="img/code_saturne_writer.png">
<img width="100%" src="img/code_saturne_writer.png">
</a>
</div>
<br>
Now to associate the Catalyst writer with the mesh, click on the <code>Mesh</code> tab and select the mesh
part named Fluid domain. Then click on the <code>+</code> button in the section <code>Associated writers</code>,
normally ttk_pipeline will appear as the new one. You should obtain something like the screenshot image below:<br>
<br>
<div class=caption>
<a href="img/code_saturne_mesh.png">
<img width="100%" src="img/code_saturne_mesh.png">
</a>
</div>
<br>
If you want more details about the configuration of a Code_Saturne study with Catalyst, you can follow
this <a
target="new"
href="https://www.youtube.com/watch?v=G-D0SbORutU&feature=youtu.be">video
tutorial</a>.<br>
<br>
Finally, save the parameters by clicking on the <code>Save</code> wizard under the <code>File</code> menu.<br>
<br>
<b>j) Running TTK in-situ (server system)</b><br>
In the following, we describe how to configure a Code_Saturne / Catalyst project on the server side.
Alternatively, jump to this <a href="#catalyst_package">paragraph</a> to directly download a preconfigured mirror package.<br>
<br>
First, create a “mirror” project on the server system with the commands:<br>
<br>
<code>$ cd ~/ttk/</code><br>
<code>$ code_saturne create -s simple_junction -c case1</code><br>
<br>
Now, copy the Catalyst script <code>ttk_pipeline.py</code> (section 6.f) and the parameters file
<code>case1.xml</code> from the client system (see the directory
<code>~/ttk/simple_junction/case1/DATA/</code>) to the <b>same</b> mirror directory on the server system
(same absolute path). Copy also the mesh downcomer.des located in <code>~/ttk/simple_junction/MESH/</code>
the same way. Here, please choose the appropriate transfer method between your client and server systems
based on the nature of their connection (for instance, on a TCP/IP network, the command scp may be
recommended).<br>
<br>
<a name="catalyst_package">Alternatively</a>, you can also simply download the following <a href="stuff/simple_junction-0.9.2.tar.gz">tarball</a>, which already contains a mirror
of the client’s project. To decompress this tarball, enter the following commands (this assumes that
you downloaded the tarballs to the <code>~/Downloads/</code> directory):<br>
<br>
<code>$ mv ~/Downloads/simple_junction.tar.gz ~/ttk/</code><br>
<code>$ cd ~/ttk/</code><br>
<code>$ tar xvzf simple_junction.tar.gz</code><br>
<code>$ rm simple_junction.tar.gz</code><br>
<br>
You are now ready to run your Code_Saturne simulation with an in-situ usage of TTK. For this,
enter the following commands:<br>
<br>
<code>$ cd ~/ttk/simple_junction/case1/</code><br>
<code>$ code_saturne run --param case1.xml</code><br>
<br>
<b>k) In-situ outputs (on the server system)</b><br>
The calculation results are stored in <code>~/ttk/simple_junction/case1/RESU/<date-time>/</code><br>
<br>
Once the simulation has finished, you should have a sequence of image files (*.png), for each view
configured in the Catalyst script, as well as persistence diagrams (*.vtu), computed every 10 iterations.
To generate videos out of these image sequences, please see the <a
target="new" href="http://ffmpeg.org/">
ffmpeg</a> documentation.<br>
<br>
<div class="flex-container">
<iframe width="100%" height="420" src="https://www.youtube.com/embed/97xpyJRVQtg"
frameborder="0" allowfullscreen></iframe>
<iframe width="100%" height="420" src="https://www.youtube.com/embed/5fdK_rcPERI"
frameborder="0" allowfullscreen></iframe>
</div>
<div class="flex-container">
<iframe width="100%" height="420" src="https://www.youtube.com/embed/qfDhN60AxGo"
frameborder="0" allowfullscreen></iframe>
<iframe width="100%" height="420" src="https://www.youtube.com/embed/B3UYuejmOvs"
frameborder="0" allowfullscreen></iframe>
</div>
</p>
</p>
</div>
</div>
</div>
<hr>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p class="copyright text-muted">
Contact: <a href="mailto:topology.tool.kit@gmail.com">
topology.tool.kit@gmail.com</a><br>
Updated on September 1, 2017.</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
<!-- Theme JavaScript -->
<script src="js/clean-blog.min.js"></script>
</body>
</html>