Chaste is capable of outputting CMGUI-readable files containing the solution of
the simulation. Since mastering CMGUI may take some time, Chaste also outputs a
little script called LoadSolutions.com that handles the first steps of reading
the mesh from file and loading the data. The Chaste CMGUI output is located
within a directory called cmgui_output. After running a Chaste simulation, the
best thing to do is to go to that cmgui_output directory and type
where PATH_TO_CMGUI_EXECUTABLE refers to the directory where you put your
CMGUI executable. This will pop up the graphics and command windows as shown
here
Within the graphic window
Left-click and move –> Rotate object
Right-click and move up –> Zoom-out
Right-click and move down –> Zoom-in
Note that the instruction above loaded the geometry and the data. It is useful
to have a look at the script and see the PERL-style syntax of CMGUI.
If you want to change the spectrum, select Graphic –> Spectrum Editor. Here you
can adjust the spectrum minimum and maximum as shown here
Another very useful window is Scene Editor which you can bring up by choosing
Graphic –> Scene Editor. Here you can manipulate what you see and how. In the
example below, the nodes are visualized as little spheres
As mentioned above, one of the most powerful features of CMGUI is that you can
feed a script to it and CMGUI will just print the image you like. The syntax of
the script is a Perl-like syntax. All CMGUI commands have the structure
Comments are preceded by a # character.
Here, we will comment an example of a script that was used for a published figure.
We start by reading in the mesh. We will issue 2 read commands, one for
nodes and one for elements, followed by the path to the node and element files
respectively. We then define the faces so that we can plot a surface. In this
example, monodomain3d is the name of the group used in the Chaste
simulation.
Now we load the data, which is contained in a .exnode file. There will be
one of these files per time step of simulation.
An alternative is to read all time steps in one go by means of a for loop
(in this case we have 200 time steps):
Then we create a graphical window:
and then adjust our preferred view. You can choose your view by playing with the
mouse and when you are happy with it, you can issue a command (in the CMGUI
command window)
The output can be copied and pasted in our script so that next time the very
same angle, point of view, etc will be re-created exactly. An example of an
output is
Similar considerations apply for the spectrum. You can play with the graphical
interface until you are happy with it and then, in the CMGUI command window,
issue a command
copy and paste the output in the script. In our example, the output will look like
The following instructions are used to make the spectrum appear on your image
The following instructions are obtained with the command
and are the ones that specify the nature of your graphical elements (e.g. nodes as spheres, lines hidden or showing, surface hidden or showing, etc)
Finally, we print the output
The full script we just discussed is
Results of the script above, i.e, the file myo_plus_fibro.eps looks like