Method Manager

Use the Method Manager dialog to create new methods and populate libraries or import existing libraries from .xml files, as explained in previous chapters.

The Method Manager is a notebook with two sheets (Library or Resources).




Figure 1. Library Editor (normal and edit mode)

Settings

When the Method Manager is invoked for the first time, it is populated only with the default library and no resource. An empty library called Session is added to the list; it aims to contain temporary method definitions used in the live session only.

When you exit the HyperMesh session, a settings file is saved. The settings file contains the list of libraries and resources loaded before exit; the content of the Session library is removed. The settings file is saved in user/.altair/StressTool/settings.xml for Windows and /home/.altair/StressTool/settings.xml for Linux.

When starting a new instance of HyperMesh, without deleting the settings file, all previously loaded libraries and resources are scanned; hence, they are available in the Method Manager and are up-to-date.

Features

When the Method Manager is invoked from other tools such as Assign Method or Run Method, you can only review method definitions and create designpointmethod entities in the database from the selected methods in the browser.

However, when the Method Manager is invoked from the Create Methods tool, it opens in edit mode and provides you with several options to:
  • Import or delete resources (OML, Python, Tcl files)
  • Import an existing library (from an .xml file)
  • Create a new library (empty)
  • Delete a library
  • Edit a library (except the default library)
    • Add or delete methods in a library
    • Define method inputs/outputs

Manage Resources

Functions defined in files (OML, Python, Tcl) are considered as resources that can be used to create a method. These can be managed in the Resources tab (Figure 2).

Context menu options are:

Add Resource
Folder level (Compose, Python, Tcl) or empty area.
Prompts for a file of the selected type and scans the file for functions (resp def for Python and procs for Tcl). If valid functions are found, they are listed under the resource node.
You can also click to add a resource.
Delete
Resource level
Deletes the selected resource unless any of its functions are used by a method in libraries.
You can also click to delete a resource.
Edit
Resource level
Run system command to open the file with its associated editor.
Create Method & Assign Method
Function level
Create is enabled only if a library is in edit mode; it adds a new method in the current library, using the function/resource from which it is invoked. Assign is enabled if a method is currently edited. As a result, it updates the current method to refer to the function from which the menu is invoked.
It is also possible if an *.oml file is edited in Altair Compose to use Register Function in Compose to directly make it available in the list of registered functions in the Resources tab.


Figure 2. Register OML Function

Manage Libraries

By default, the Library browser is in review mode only. Selecting a method in the list displays its details in the method editor:
  • Input argument list and mapping
  • Output argument list
  • Sort block
  • Options


Figure 3. Attribute Mapping Review
Selecting an attribute in the list shows its mapping and Type. Hovering the mouse on the row shows in the tooltip the resolved key queried by the engine. Attribute Type can be:
  • Undefined
    • Parameter unresolved
    • Status color red
    • Method selection is disabled (cannot be created from the template)
  • User
    • Parameter defined locally inside the library file
    • Value shown as a tooltip only
    • Takes precedence over any built-in parameter
  • Model
    • Parameter found in pre-defined list of model attributes
    • Populates the Model tab
    • Not overwritten locally in the library file
  • Result
    • Parameter found in pre-defined list of result attributes
    • Populates the Result tab
    • Not overwritten locally in the library file
  • Metadata
    • User input
    • Populates the Metadata tab
  • Method
    • Parameter coming from another method
    • Implies that this method run along the selected method
    • The status color is orange due to dependencies
      • Independent methods are listed in hierarchy under caller


        Figure 4.

Import/New/Delete Library

Import Library
Prompts you to import an *.xml file, which must follow the schema detailed in Author Custom Methods. If the selected file is malformed, nothing is added to the browser. If the import is successful, a new library folder is added to the browser with a list of methods available. Moreover, an automatic scan of functions used by new methods may result in new resources being added (available in the Resources tab).
New Library
Adds a new library to the list and brings it to edit mode to let you add methods.
A library added from Import or New has an automatic name that can be changed using the Rename Library option on the library node.
Delete Library
Removes the library and its methods from the list, unless a designpointmethod entity in the database refers to a method defined in that library.
Resources are not deleted.

Scan/Open Library

Scan Library
Available on a library node. It re-scans the library file to check for updates. Such an operation is performed automatically each time you open the Library tab.
Open Library
Open the library .xml file calling its associated file editor.

Edit Library

Edit Library is available on a library node (except Default) or method and puts the Library tab in edit mode. The browser is populated only with the given library (works with Session too). Alternatively, you can double-click a method/library to reach the same state.
Note: Editing capabilities are available only when the browser display method is in hierarchy view .
The / icons add or delete methods. New methods inherit their category from the current config set in the display filters.
  • default engine is “COMPOSE”
  • default function is the first registered function if any exist
  • otherwise, it defaults to the first COMPOSE resource and points to its first function
At this point, you can fully edit the method (see Edit Methods).

If the current library is Session, using Save commits the changes in the session library and leaves edit mode. Using Save as gives a change to transform methods in Session onto a saved library; it results in an .xml file written and imported in the Library Manager. The Session library will be clean.

If the current library edited is a regular library, Save asks for confirmation to overwrite the original .xml file. If accepted, changes done to the library file are permanent (no Undo) and you are returned to the library view mode; otherwise, operations are cancelled. Using Save as saves a new .xml file and imports it as a new library. If method names from the newly imported library conflict with existing libraries, the methods are disabled from selection. To resolve the issue, you need to either rename the method display name in edit mode or delete the previous library from the list (where methods are duplicated). This is true for all libraries except Session. Using Save as from Session, the methods in Session are deleted when a newly saved library is imported.

Cancel will cancel all changes and leave library edit mode.

Edit Methods

You can edit an existing method by double-clicking a method name or library name to enter Edit mode. Method is then active.


Figure 5.
You can assign a function from the available resources in the Resources tab when library is in Edit mode. Otherwise, you can click Engine > Resource > Function from the menu in the method list.


Figure 6.

Input Argument Mapping

If the selected function was defined with an explicit list of arguments, such as func(a,b,c)=, the number of inputs is set by default to the number of arguments. You can increase/decrease the number of inputs by no less than the number of function arguments. If the last argument name starts with arg it is considered as an optional argument. If args is used in the function definition, inputs default to zero.


Figure 7.

Each input argument listed in the input table has multiple columns where the first is the function’s variable name. It is filled by the variable name as read in function definition but can be overwritten without any impact. It is only for reference.

Map inputs with database value:
  1. Select an input row.
  2. Select a tab (Model/Result).
    1. Select an argument in the tree and double-click to map.
  3. For extended data:
    1. Select the Metadata tab.
    2. Select the entity type.
    3. Set data type.
    4. Change Show as, if applicable.
      • Set to unspecified to remove allowables.
      • Set to combo box to enable allowables and fill pre-defined by values separated by spaces.
    5. Set the Default value.
  4. For method chain select the Method tab.
    1. Select a Method in the available list.
    2. Select a Column value (populated from the selected method).
    3. Rename the argument (optional).
For each row you can define the input aggregation by selecting:
  • Sort type
  • Level of aggregation

The menu option on a row allows you to propagate the aggregation.

The menu option also allows you to reset mapping of the current row or all inputs.
Tip: To map an attribute with a key close to a previously mapped argument:
  • Select the mapped argument, which populates the Model/Result tab.
  • Select an argument to map (needs to be reset first).
  • The attribute tree remains open in the previous state.
    • It is helpful to define ie Stress YY from Stress XX.

Define Method Outputs

Select the Outputs tab and change the number of outputs.
  • Rename every output with meaningful names.

Define Post Evaluation Sorting

  1. Select the Sort tab.
  2. Change the Sorting value to any of the input/output of the method used as an aggregation metric. This value is used to compare entities altogether and retain min (resp max.)
  3. Select the Aggregation type.
  4. Select Envelope if a loadcase envelope is needed.
    • If off results per loadcase are kept
    • Only spatial aggregation occurs
  5. Select an Output location.
    • Manage internally domains to finally retain value bounded to selection.
  6. Select a sub option, if applicable.
    • Retain layers or aggregate across layers.
    • Keep nodes/corners.


      Figure 8.

Define Options

In the Options tab, you can select the default for corners and averaging, and if these options need to be hidden.
Note: Average simple does not means scalar averaging. It is a true tensor averaging where invariants are extracted after averaging.


Figure 9.