After compiling the libFronTier++.a, one can test the library by running example code calling the software.
Template code for application of FronTier++-Lite library are stored in FronTier++/example2d (for 2D) and FronTier++/example3d (3D) directories. These contain simple and benchmark testing cases.
1. Running in serial
- To compile the example file, for example, example00.cpp, type:
./example00 -o out-00
where out-00 is the output directory name containing all output files.
- If HDF library is linked to the code, the run will produce an output
file named out-00/hdf/comp.hdf. You may use following command to convert
to animated gid file and view the results.
hdf2gif comp.hdf comp.gif
- If HDF is not linked, then the output will be in the VTK format.
You will see the directories:
output-vtk.ts00000/, output-vtk.ts00001/, ...
Each of these contains VTK files for the interface during the named
time step (That's what the 'ts' in the file name means).
- In 2d, there is 1 file in each of these directories: 2d-intfc.vtk.
- In 3d there are two: 3d-intfc.vtk, and box.vtk.
- You may also compile all the example files by typing:
- The example directories also have a run shell called "mrun", for example
you may type: mrun 00
This is equivalent to: ./example00 -o out-00
2. Running in parallel
- The example codes in the example directory can be run in parallel if
FronTier++ is compiled with MPI enabled. To run the example in parallel,
first you must copy one of the example files to example00.c as before, for
mpirun -np 4 ./example00 -p 2 2 -o out-00
This will run the code in 2X2 parallel partition. Here "-np 4" is for total of 4 processors. It is equivalent to use mrun and type:
mrun 00 2 2
- The VTK output for this type of run will give a VTK file for each processor at each time step. The files will be of the form 'output-vtk.ts00000-nd0000' where the numbers following 'ts' are the time step number, and the numbers following 'nd' are the processor ID number.
- If HDF output is enabled, the parallel example will produce a single HDF file, just as with a serial run, which can be viewed in the exact same way.
3. Visualization of the result
Here is a brief manual about how to make a movie by VisIt.