User-Definable Functions

Some of the functions that you can define are on a global bookkeeping level; other functions deal more specifically with an individual entity. Global functions are called only once and allow the performance of operations not related to a specific entity. Examples of global functions include an open function, a color function, and a close function. Entity functions perform operations relating to a specific entity. For each entity type in HyperMesh, there is a possibility of up to four different user-definable functions: open entity, get entity, dictionary and close entity. The following table shows the different user-definable functions that may be created and the functions they perform. They are listed in the order in which they are called by hminlib.
Table 1.
Open HMIN_OPENFUNCTION is called once control of the program is transferred to hminlib. It sets global variables, initializes routines, and performs other tasks related to setup.
Open Entity HMIN_ENTITYOPENFUNCTION is called once before any of the entities of a specified type are read. It allows you to prepare their program to read a group of entities.
Get Entity HMIN_ENTITYGETFUNCTION is called repeatedly until all of the requested entities are transferred from the external program to hminlib. When this function is called by hminlib, you are expected to pass the information about each entity of the requested type in the input file to hminlib.
Dictionary HMIN_ENTITYDICTIONARYFUNCTION is called once after each entity which can have a dictionary is successfully passed to hminlib. It passes dictionary information about the entity to hminlib.
Close Entity HMIN_ENTITYCLOSEFUNCTION is called once after all of the entities of a specified type are read. It allows you to clean up after their program has read a group of entities.
Name HMIN_NAMEFUNCTION is called once after all of the entities are processed. It passes the names of collectors, if such information exists in the input file.
Move HMIN_MOVEFUNCTION is called once after all of the entities are processed. It moves elements into different components and is used when elements that do not have property information are read into HyperMesh.
Color HMIN_COLORFUNCTION is called once after all of the entities are processed. It passes color information about the collectors, if such information exists in the input file.
Associate HMIN_ASSOCIATEFUNCTION is called after all of the entities are processed. It associates nodes with surfaces
Close HMIN_CLOSEFUNCTION is called last. It frees memory, closes routines, and does other cleanup functions.