Documentation for Release 2024.2
Making the 'MeshConvert' utility and using it to help produce scalable mesh loading
File related to this tutorial
What it’s for
When you run Chaste on large clusters or supercomputers the part of the simulation that might scale least well is the initial mesh load.
- Traditional mesh files come in ASCII format with a variable amount of characters per line.
- Because random access into ASCII files is difficult each process must spool through unwanted lines
- This means each file is read in its entirety by all processes causing file contention
This page shows you how to convert from a given 3D mesh format (Tetgen/Memfem/CARP/VTK) to our special binary version of the Triangle/Tetgen format.
- This allows for random access when running in parallel
- This also produces a “node connectivity list”
file which is a map from node indices
to containing element indices. The presence of this file cuts the calculation cost at mesh load time.
- If a Chaste format fibre file (.axi or .ortho) is associated with the mesh then this will also be converted to our binary format.
Making the executable(s)
Running the converter
You may want to download and save the attached file and unpack the files for testing purposes. Either use an Archive Manager to extract the content to disk or save it and then unpack it with
These files are just test ASCII mesh data. Run the converter like so:
The argument
should be the full relative path to the place where you unpacked the mesh files. Note that no suffix is given. If you have compiled with VTK enabled then you will be able to convert a single
file into a binary-format file.
You will see the usual Chaste Copyright notice and information about the compilation details followed by:
You can control the location of the folder for the output using
The space labelled
in the above will be taken from the environmental variable
if it is set, but will be
otherwise.
Running in parallel
If you run the program in parallel then the original mesh is loaded (in a non-scalable way) and then
partitioned before writing back out. This means that the original node ordering may be permuted.
The advantage to pre-processing by running this converter in parallel (on n
processes) is that
mesh partitioning may be faster when the Chaste code is run live (also on n
processes).