ParaViewCatalyst.jl provides a Julia interface to
Catalyst,
used for in-situ visualization of simulation data.
The Catalyst library for Julia is provided automatically as a precompiled binary by Catalyst_jll.jl
at
JuliaBinaryWrappers
and Yggdrasil.
Although the Catalyst API is not restricted to
ParaView, this package is geared towards the
ParaView implementation of the Catalyst API.
As such ParaView needs to be present on the machine you run your simulation on. In
particular, a version is required that ships the Catalyst implementation as a library. On
Linux you should look for libcatalyst-paraview.so
.
Its path has to be set as an environment variable, e.g. by
export CATALYST_IMPLEMENTATION_PATHS=<path_to_libcatalyst-paraview.so>
Alternatively, when using ParaViewCatalyst.jl from your own application, you can use the keyword argument libpath
of the function catalyst_initialize
.
Go to the examples
folder and start julia using
julia --project=.
In package mode do
(examples) pkg> dev ..
(examples) pkg> instantiate
then
julia> include("test_init.jl")
You should see some information about the Catalyst implementation. In particular, you
should see implementation: "paraview"
.
More verbose output can be enabled by setting the
environment variable CATALYST_DEBUG=1
.
Launch ParaView. From the main menu, select "Catalyst", then "Connect", and accept the default port. Select "Catalyst" again and then "Pause Simulation". Now launch Julia as done before, and execute
julia> include("test_execute.jl")
In ParaView click on the symbol in front of "Input", then click on the symbol in front of "Extract: input". You should now see a square. In the properties tab under "Coloring", select "testdata". Now select "Catalyst" from the main menu and "Continue". The square should change its color every two seconds.
To use ParaViewCatalyst.jl from your code, you only need catalyst_initialize()
,
catalyst_execute(node)
, and catalyst_finalize()
. All information is passed
through Conduit nodes, which are required to adhere to the
Blueprint.
A user-defined ParaView pipeline script can be passed to catalyst_initialize
using the
keyword argument catalyst_pipeline
. By default src/catalyst_pipeline.py is used, which
activates live visualization. The data can also be viewed on a remote machine. In this case
options.CatalystLiveURL
has to be adjusted to point to the remote machine.
Once a pipeline in ParaView has been set up, it can be exported as a script by selecting
"File" from the main menu and then "Save Catalyst State". It might be required to modify
this file afterwards.
ParaViewCatalyst.jl is used by Trixi.jl.
ParaViewCatalyst.jl was initiated by Jake Bolewski (@jakebolewski) at https://github.com/CliMA and is now maintained by Benedict Geihe (University of Cologne, Germany).
ParaViewCatalyst.jl is licensed under the MIT license (see LICENSE.md). Since ParaViewCatalyst.jl is an open-source project, we are very happy to accept contributions from the community. Note that we strive to be a friendly, inclusive open-source community and ask all members of our community to treat each other decently. To get in touch with the developers, join us on Slack or create an issue.