5.3 Using Shortcuts

Apart from the various setup options the setup script also allows you to use shortcuts for frequently used combinations of options. For example, instead of typing in  
./setup -a Sod -with-unit=Grid/GridMain/UG
you can just type  
./setup -a Sod +ug

The +ug or any setup option starting with a `+' is considered as a shortcut. By default, setup looks at bin/setup_shortcuts.txt for a list of declared shortcuts. You can also specify a ":" delimited list of files in the environment variable SETUP_SHORTCUTS and setup will read all the files specified (and ignore those which don't exist) for shortcut declarations. See Figure 5.2 for an example file.

Figure 5.2: A sample setup_shortcuts.txt file
 
# comment line


# each line is of the form # shortcut:arg1:arg2:...:
 # These shortcuts can refer to each other.


default:-with-library=mpi:-unit=IO/IOMain:-gridinterpolation=monotonic


# io choices
 noio:-without-unit=IO/IOMain:
 io:-with-unit=IO/IOMain:


# Choice of Grid
 ug:-unit=Grid/GridMain/UG:
 pm2:-unit=Grid/GridMain/paramesh/Paramesh2:
 pm40:-unit=Grid/GridMain/paramesh/paramesh4/Paramesh4.0:
 pm4dev:-unit=Grid/GridMain/paramesh/paramesh4/Paramesh4dev:


# frequently used geometries
 cube64:-nxb=64:-nyb=64:-nzb=64:

The shortcuts are replaced by their expansions in place, so options which come after the shortcut override (or conflict with) options implied by the shortcut. A shortcut can also refer to other shortcuts as long as there are no cyclic references.

The “default" shortcut is special. setup always prepends +default to its command line thus making ./setup -a Sod equivalent to ./setup +default -a Sod. Thus changing the default IO to “hdf5/parallel", is as simple as changing the definition of the “default" shortcut.

Some of the more commonly used shortcuts are described below:


Table 5.5: Shortcuts for often-used options
Shortcut Description
+cartesian use cartesian geometry
+cylindrical use cylindrical geometry
+noio omit IO
+nolog omit logging
+pm4dev use the PARAMESH4DEV grid
+polar use polar geometry
+spherical use spherical geometry
+ug use the uniform grid in a fixed block size mode
+nofbs use the uniform grid in a non-fixed block size mode
+usm use the Unsplit Staggered Mesh MHD solver
+8wave use the 8-wave MHD solver
+splitHydro use a split Hydro solver
+vof use the volume-of-fluid interface capturing in hydro


Table 5.6: Shortcuts for HEDP options
Shortcut Description
+mtmmmt Use the 3-T, multimaterial, multitype EOS
+uhd3t Use the 3-T version of Unsplit Hydro
+usm3t Use the 3-T version of Unsplit Staggered Mesh MHD
+mgd Use Multigroup Radiation Diffusion and Opacities
+laser Use the Laser Ray Trace package