Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MATLAB assigns a handle to every graphics object it creates. One can use this handle to subsequently change the object's properties. The guihandles function allows the user to create a structure containing the handles of the objects in a figure. This feature is used in redAnTS to create a structure containing the handles of the objects in the graphical user interface (GUI) as shown below.

Image Added

The user can augment this "handles" structure with any data. Taking advantage of this feature, redAnTSuses the handles structure to store information about the mesh, material properties, displacements, strains, stresses, etc. In other words, the handles structure is the container that is used to store this FEA data. This data can be accessed and modified using the guidata function as is explained below.

...

The data fields of interest in the handles structure are listed in the redAnTS main help. To see this, type Help redAnTS at the MATLAB command line. Below is a snapshot from the help.
Image Added

Thus, the handles structure has a field called mesh that is also a structure. The mesh field in turn contains the xcoords and other fields. The statement

...

will give you a row vector containing the x-coordinates of all the nodes. You can visualize the handles structure as per the figure below. Image Added

Investigate the handles structure using the debugger

You can set use the debugger to investigate further what the fields of the handles structure look like. In the MATLAB editor, add a breakpoint in CalcStrainStress.m at the statement handles=guidata(fighandle). You can add a breakpoint by clicking to the left of the line. A red circle should appear as shown below. Image Added

We'll run a problem in redAnTS in order to force the program to stop execution at this statement. Run through the first four steps of the Introductory redAnTS Tutorial. This can be accessed from within the redAnTS folder at: redAnTS_tutorial/redAnTS_tutorial.htm. Next, calculate σxxas per the first item in Step 5 of the tutorial. Program execution should stop at the above statement. Check the Workspace. Then, step through this statement using the step icon. Image Added

In the Workspace, you should see that handlesstructure has been created. Double-click on this variable to see what the fields of the structure look like. Reconcile what you see with the fields listed in the main redAnTS help page. Image Added

Type the following at the command line to see what the nodal x-coordinates are:

...

After you are done investigating the handles structure in the debugger, exit the debug mode by clicking on the Exit debug mode icon in the editor. Image Added

You should now have enough background to provide post-processing capabilities in redAnTS by modifying the following functions:

...