AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++

Quickstart Guide

previous     next
It is assumed that all codes have been compiled successfully with $(MPISWITCH)=off.

Go to the AMROC main directory and type


This will add AMROC's binary directory to your local PATH-variable.

1. One-dimensional example: Shocktube

Go to applications/euler/1d/Shocktube/Cal1 and simply type


The program solves a typical one-dimensional Riemann problem for the Euler equations and dumps the result of intermediate time-steps into HDF-files. Parameters are given in, while the Riemann problem is defined in init.dat.

If you rerun this example multiple times, you will notice that the size of the HDF-files is growing. This is a specialty of the codes internally employed inside AMROC's DAGH that generate HDF-output. They always append data to files, but never delete them. Consequently, existing HDF-files should always be deleted before a new run.

To simplify the startup-procedure a script is therefore supplied for each example. It is intended to be run in the background. Now type &

to restart the example. You can use tail -f out.txt to display the current state of the job.

After the run, the script will automatically call hdf2file and will convert the HDF-files into ASCII-tabulars. Additionally, script-files for the popular Gnuplot-program will be generated. Type

gnuplot Density.gnu

to display the temporal development of the density or type

gnuplot 1280.gnu

to browse through the data of the final result.

Compare your results to the reference data.

2. Two-dimensional example: Flow over a ramp

Go to applications/euler/2d/Ramp and type &

Execution will take a few minutes. The HDF-files can be displayed with Matlab, Visual3 or with IBM's Data Explorer.

2.1 Matlab

To use Matlab, set the MATLABPATH-variable to the matlab-directory of AMROC before Matlab is started from the directory applications/euler/2d/Ramp. Type


in Matlab's command window to display the data. plotconf.m, filenames.m have to be adjusted, if the discretization or the output-filenames are changed in menu_automation.m can be employed to automatically browse through the data.

Compare your results to the reference data that have been calculated with refinement factor 4 for the highest level.

2.2 Visual3

To use Visual3, ensure that hdf2v3 has been build successfully and your .Xresources are configured correctly (see installation text). Type

hdf2v3 496

to start the visualizer with all data of the last time-step. hdf2v3 reads its configuration from and will display the density distribution. By typing ? all defined keys will be displayed for the active Visual3-window. If you activate for instance the 3D-window and press p the pressure distribution will be displayed. The visualizer assumes standard Euler equations for a polytropic gas, if being started without any options. See the Visual3 user's & programmer's manual for a detailed description on how to use Visual3.

Instead of hdf2v3 496 you may also use hdf2v3 -s r 496 to start the visualizer. The option -s will force hdf2v3 to read only the HDF-file of the density. Derived quantities like pressure of temperature can not be displayed in this mode.

Hit the Esc-key in the 3D-window to terminate Visual3.

2.3 IBM's Data Explorer

hdf2file can be used as an external filter in IBM Data Explorer. As IBM's Data Explorer offers nearly unlimited graphical capabilities only an elementary example to demonstrate the import of AMROC's HDF-data will be provided here.

Ensure that hdf2file is in your path and start Data Explorer by typing dx & in the directory applications/euler/2d/Ramp. Select Run Visual Programs and choose The program will produce a plane color plot of the density distribution of the last time-step with index 496 and a three-dimensional rubbersheet.

3. Three-dimensional example: Periodic boundary conditions

Go to applications/euler/3d/Pbc and type &

Execution will take a quiet while, but you can start already visualizing HDF-files during the run. Note that the HDF-file that has been written at last remains in open file-mode until the next HDF-file is opened. Only this particular HDF-file is not terminated until the next HDF-file is written and usually is not displayed correctly.

3.1 Matlab

Set MATLABPATH and start Matlab from the directory applications/euler/3d/Pbc. Start plothdf and answer the question Make 3d-cut? with 1. Choose a plane rectangular to the z-axis and position this plane at z=0.0 or z=0.5. Select the last time-step and Matlab should display a cut through the three-dimensional data set that should be comparable to the cuts through the reference data.

Note that the plothdf-script is written especially to generate two-dimensional pictures and will terminate with three-dimensional data, if no cut is selected.

3.2 Visual3

Type hdf2v3 32 to display the time-step for t=0.21 or type hdf2v3 118 to display the data for t=0.84, activate the 3D-window of Visual3 and hit F7. This toggles an isosurface and the picture should be similar to the reference data. Use the Scan-button in the dials-window to change the value of the isosurface.

3.3 Data Explorer

Ensure that hdf2file is in your path and start the Data Explorer by typing dx & in the directory applications/euler/3d/Pbc. Select Run Visual Programs and choose The program will produce a graphic for the last time-step with index 118 that is similar to the reference graphics produced with Visual3.

4. Parallel execution

Set $(MPISWITCH) to on in amroc.config and clean and recompile the entire AMROC package. Ensure that bin/startup.$(ARCH).sh works for your parallel machine. Execute the examples again by typing [No. processors] &

in the directories of the different examples.

Note that the last processor is always reserved for parallel IO of HDF-files. Only this node writes to the file-system and no access of the computational nodes to the file-system is therefore required. If for instance 4 computational nodes have be used, the command should be 5 &.


Quickstart       Users Guide     Programmers Reference     Installation      Examples     Download

AMROC Main      Home      Contact
last update: 6/1/04