Contents     Functions         Previous Next     PDF Index

1.3  Understanding the Toolbox architecture

1.3.1  Layers of code

The SDT has three layers of code.

1.3.2  Infos in Stack

When extensible and possibly large lists of mixed data are needed, SDT uses .Stack fields which are N by 3 cell arrays with each row of the form {'type','name',val}. The purpose of these cell arrays is to deal with unordered sets of data entries which can be classified by type and name.

stack_get, stack_set and stack_rm commands are low level commands used to get/set/remove single or multiple entries from stacks. Higher level pointer access to stacks stored in iiplot (curve stacks) and feplot (model and case stacks) are described in section 2.1.2 and section 4.2.3.

1.3.3  Global variables

Pointers to variables stored in graphical objects are now prefered to global variables. The user interface for data visualization and identification (iicom, idcom, iiplot) no longer uses global variables, see section 2.1.6 for compatibility information. femesh and upcom are the only functions that use global variables.

User interfaces require knowledge of the current state of the interface and appropriate data. The policy of the Toolbox is to let the user free to perform his own operations at any point. Significant efforts are made to ensure that this does not conflict with the continued use of GUI functions, but it is accepted that it may exceptionally do so. This flexibility resulted in the use of both global variables (for information that the user is likely to modify) and graphical objects (for other information).


The femesh user interface for finite element mesh handling uses a number of standard global variables shown below


FEnodemain set of nodes (also used by feplot)
FEn0selected set of nodes
FEn1alternate set of nodes
FEeltmain finite element model description matrix
FEel0selected finite element model description matrix
FEel1alternate finite element model description matrix

By default, femesh automatically use base workspace definitions of the standard global variables: base workspace variables with the correct name are transformed to global variables even if you did not dot it initially. When using the standard global variables within functions, you should always declare them as global at the beginning of your function. If you don't declare them as global modifications that you perform will not be taken into account, unless you call femesh, ... from your function which will declare the variables as global there too. The only thing that you should avoid is to use clear and not clear global within a function and then reinitialize the variable to something non-zero. In such cases the global variable is used and a warning is passed.


©1991-2012 by SDTools
Previous Up Next