Contents  
Functions  
 ![]() ![]() |
The SDT has three layers of code.
The policy of the GUI layer 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, since command line and script access is a key to the flexibility of SDT. In most such cases, clearing the figure (using clf) or in the worst case closing it (use close or delete) and replotting will solve the problem.
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.
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
FEnode | main set of nodes (also used by feplot) |
FEn0 | selected set of nodes |
FEn1 | alternate set of nodes |
FEelt | main finite element model description matrix |
FEel0 | selected finite element model description matrix |
FEel1 | alternate 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.