Project

General

Profile

iSALEPar

iSALEPar is an executable frontend of the ptools-library (libptool.a). The main purpose of this tool is to clean up the model input file
(asteroid.inp) used for iSALE-2D and iSALE-3D and to perform some sanity and value checks, if required.

For command-line information about this tool, invoke:

./iSALEPar --help

Checking whether an input file is valid

To check whether an input file is valid:

./iSALEPar -i asteroid.inp

If there are no problems with the input options, iSALEPar will return a message:

Number of parameters in database.........................192
Number of parameters in asteroid.inp......................82
Checking non-optional parameters; errors................none
Checking list of valid values; errors...................none
Checking physical range; errors.........................none
------ TOTAL NUMBER OF ERRORS OCCURED...................none
Checking recommended range; warnings....................none
------ TOTAL NUMBER OF WARNINGS OCCURED.................none

If an option raises an error or warning, iSALEPar will return:

------------------------------------------------------------
INVALID VALUE FOR PARAMETER..........................GRIDSPC
 ... value is...................................2.000000E+06

This will be followed by information about the parameter in question:

############################################################
Parameter information for GRIDSPC
Meaning.........................................grid spacing
Parameter type........................................real*8
Behavior for iSALE-2D.......................................
  Allowed range....................... [ 1.D-9 : +infinite ]
  Recommended range........................ [ 1.D-6 : 1.D6 ]
  Optional parameter......................................no
Behavior for iSALE-3D.......................................
  Allowed range....................... [ 1.D-9 : +infinite ]
  Recommended range........................ [ 1.D-6 : 1.D6 ]
  Optional parameter......................................no
Corresponding section...................................MESH
############################################################
------------------------------------------------------------
Checking recommended range; warnings.......................1
------ TOTAL NUMBER OF WARNINGS OCCURED....................1

In this case the User specified that the grid spacing (cell size) should be 2000 km, which is outside the recommended range for this parameter.

Getting input parameter information in the terminal

iSALEPar can also be used to quickly find out a description of reads and analyzes the parameter database provided with the iSALE-suite:

./iSALEPar --info <ABBREV>

Where <ABBREV> is the iSALE input option tag used in asteroid.inp/material.inp to identify an option. For example, to find out information about the GRIDSPC option:

./iSALEPar --info GRIDSPC

This returns:

############################################################
Parameter information for GRIDSPC
------------------------------------------------------------

Meaning.........................................grid spacing

Description:
   The real-life spacing of cells in the high-resolution zone in metres.
   Two (or three) spacings can be defined: the first is the cell size in
   the horizontal direction; the second is the cell size in the vertical
   direction; the third is the cell size in the third dimension.
   If only one value is defined, the same spacing will be used for all
   coordinate directions.

   Note that when regridding (iSALE2D only), GRIDSPC is used to define
   the dimensions of the cell in the new grid; however, the only permissable
   values for GRIDSPC in this case are two times the GRIDSPC in the run

Parameter type........................................real*8

Behavior for iSALE-2D.......................................

  Allowed range....................... [ 1.D-9 : +infinite ]

  Recommended range........................ [ 1.D-6 : 1.D6 ]

  Optional parameter......................................no

Behavior for iSALE-3D.......................................

  Allowed range....................... [ 1.D-9 : +infinite ]

  Recommended range........................ [ 1.D-6 : 1.D6 ]

  Optional parameter......................................no

Corresponding section...................................MESH
############################################################

In addition to a description of the parameter, its data type, and whether or not this option is optional, this information also specifies the "allowed range" and the "recommended range".

Information provided by iSALEPar

  • Description -- describes the option
  • Parameter type -- string, float or integer
  • Optional -- is this parameter optional or not?
  • Default value -- if the parameter is optional, what is the default value?
  • Allowed range -- this defines the range of permitted values. Typically, only unphysical or nonsensical values are excluded. iSALE will not run if an input parameter is specified outside the allowed range.
  • Recommended range -- this defines the range of values of the parameter that have been used successfully. Note that the recommended range may be more restrictive than the allowed range, as the recommended range only spans the parameter space that existing iSALE Users and Developers have experience with. By default, iSALE will not run if an input parameter outside the recommended range is specified. This behaviour can be overridden, and the extreme value used, by invoking the --ignore command line option for iSALE2D/3D.
  • Values -- list of allowed values (for string or integer parameters)
  • Section -- the section in the manual where this option is explained

Locating the parameter database

iSALEPar reads and analyzes the parameter database provided with the iSALE-suite, which is stored in the file parameters.db. iSALEPar expects to find the parameters.db file in the current working directory. To specify an alternate location for the parameters.db file, use the -D option.

./iSALEPar -D <path/to/parameters.db>