1.8. Choosing a Linking Method

After you make your changes to the user routines supplied on your product distribution medium, you can either:

For both Windows and Linux platforms, three methods of compiling and linking are available:

  • /UPF command

  • ANSUSERSHARED script (creates a shared library on Linux or a dynamic-link library on Windows)

  • ANS_ADMIN242 Utility

The /UPF command method is typically used by individuals wanting to occasionally use their custom code for certain runs. The advantages of this method are that it is very easy to use and the source code can be displayed in the output file.

The shared library (Linux) and dynamic link library (Windows) methods are typically used to run Mechanical APDL with frequently used user-libraries or third-party libraries (material libraries, and so on). This method is advantageous if custom code is frequently used or shared with other users.

The ANS_ADMIN242 method is useful for someone wanting to create a permanently changed Mechanical APDL executable which will be used by many users, or used most of the time. Sites that validate their custom code might want to consider this option.

In some cases, you might want to combine two of the methods of compiling and linking. The program allows you to combine the ANS_ADMIN242 method with either the /UPF command method or the ANSUSERSHARED method. Note that the /UPF command method cannot be combined with the ANSUSERSHARED method.

As an example of combining these methods, you might first create a custom executable with ANS_ADMIN242 that contains user creep laws. Then, you might use the ANS_USER_PATH environment variable to include a user material (or third-party library) created with the ANSUSERSHARED method.

For detailed compiling and linking procedures, see Compiling and Linking UPFs on Linux Systems and Compiling and Linking UPFs on Windows Systems.