Command Syntax
The execution of CUBIT is
controlled either by entering commands from the command line or
by reading them in from a journal file. The commands can be
either Cubit commands or Python statements. Similarly, a journal
file may contain both Cubit commands and Python statements. By
default, a command is interpreted as a Cubit command when
starting the processing of a journal file or at the command line.
A #!python statement can be given to indicate
the subsequent commands are to be interpreted as Python
statements. A #!cubit will similarly indicate
the subsequent commands are to be interpreted as Cubit commands.
Throughout this document, each function or process will have a
description of the corresponding CUBIT command; in this section,
general conventions for command syntax will be described. The
user can obtain a quick guide to proper command format by issuing
the <keyword> help command;
see Command Line Help for
details.
CUBIT commands are described in this manual and in the help output using the following conventions. An example of a typical CUBIT command is:
Volume <range> Scheme Sweep [Source [Surface] <range>] [Target [Surface] <range>] [Rotate {on | OFF}]
The commands recognized by CUBIT are free-format and abide by the following syntax conventions.
- Case is not significant.
- The "#" character in any command line begins a comment. The "#" and any characters following it on the same line are ignored. Although note that the "#" character can also be used to start an Aprepro statement. See the Aprepro documentation for more information.
- Commands may be abbreviated as long as enough characters are used to distinguish it from other commands.
- The meaning and type of command parameters depend on the
keyword. Some parameters used in CUBIT commands are:
Numeric: A numeric parameter may be a real number or an integer. A real number may be in any legal C or FORTRAN numeric format (for example, 1, 0.2, -1e-2). An integer parameter may be in any legal decimal integer format (for example, 1, 100, 1000, but not 1.5, 1.0, 0x1F).
String: A string parameter is a literal character string contained within single or double quotes. For example, 'This is a string'.
Filename: When a command requires a filename, the filename must be enclosed in single or double quotes. If no path is specified, the file is understood to be in the current working directory. After entering a portion of a filename, typing a '?' will complete the filename, or as much of the filename as possible if there is more than one possible match.
A filename parameter must specify a legal filename on the system on which CUBIT is running. The filename may be specified using either a relative path (../cubit/mesh.jou), a fully-qualified path (/home/jdoe/cubit/mesh.jou), or no path; in the latter case, the file must be in the working directory (See Environment Commands for details.) Environment variables and aliases may also be used in the filename specification; for example, the C-Shell shorthand of referring to a file relative to the user's login directory (~jdoe/cubit/mesh.jou) is valid.
Toggle: Some commands require a "toggle" keyword to enable or disable a setting or option. Valid toggle keywords are "on", "yes", and "true" to enable the option; and "off", "no", and "false" to disable the option.
- Each command typically has either:
* an action keyword or "verb" followed by a variable number of parameters. For example:
Mesh Volume 1
Here Mesh is the verb and Volume 1 is the parameter.
* or a selector keyword or "noun" followed by a name and value of an attribute of the entity indicated. For example:
Volume 1 Scheme Sweep Source 1 Target 2
Here Volume 1 is the noun, Scheme is the attribute, and the remaining data are parameters to the Scheme keyword.
The notation conventions used in the command descriptions in this document are:
- The command will be shown in a format that looks like this:
- A word enclosed in angle brackets ( <parameter> ) signifies a user-specified parameter. The value can be an integer, a range of integers, a real number, a string, or a string denoting a filename or toggle. The valid value types should be evident from the command or the command description.
- A series of words delimited by a vertical bar ( choice1 | choice2 | choice3 ) signifies a choice between the parameters listed.
- A toggle parameter listed in ALL CAPS signifies the default setting.
- A word that is not enclosed in any brackets, or is enclosed in curly brackets ( {required} ) signifies required input.
- A word enclosed in square brackets ( [optional] ) signifies optional input which can be entered to modify the default behavior of the command.
- A curly bracket that is inside a square bracket (e.g.
[Rotate {on|OFF}] ) is only required if that
optional modifier is used.