Modes of Interaction

Program Startup

Start up the wish interpreter and source the moc_startup.tcl script. This gets the IMOC module loaded and the GUI components started. Alternatively, a user's script can have the same introductory commands and then continue on to do other things.

Command-Line

When wish starts up, there are two windows, one for graphical elements and one (the console) for the Tcl command line. All of the house-keeping and computational functionality of IMOC is available from the Tcl command line. Each C function that has been wrapped by SWIG and each Tcl procedure that has been sourced as part of the IMOC package is available as a command.

Commands that operate on specific nodes accept arguments specifying the index of each node. This index is used to look up the node data via an array of pointers in the moc_kernel.c module. Valid index values are in the range 0..MAX_NODE-1. For convenience, many commands return the index of the solution node. This value may be saved to a variable for later referencei but it should be checked as the commands will typically return a value of -1 if the procedure has failed in some way. On failure, the procedures usually write some information to the standard output device (usually the console from which wish was started).

Once you have established what you want to calculate, it is easy to automate the calculation either as a Tcl procedure (see, for example, the PrintStreamData procedure in streamdata.moc) or as a script which does an entire problem (see e.g. anderson_11p1.moc).

Point-and-Click

Once the GUI is started (by calling the procedure initGUI), most of the functionality is also available via the pull-down menus. Procedures that require node indices are satisfied by getting node indices from the selectedNodeList. To get nodes into this list, click on them with the left mouse button. Right clicking on a node will bring up a dialog window displaying the node's properties.


PJ, 01-Feb-2000, Updated 25-Apr-2000