An External function (

) interfaces with other external functions written in the C language (using a native C function or, through a wrapper function, interfacing with source code written in, for example, Fortran). You can use those functions as any other functions defined in COMSOL Multiphysics. For example, use it for a user-created shared library (depending on the platform, a DLL, .so, or .dylib file).
 
    Enter a Library path and name (the complete network path), or click 
Browse to locate a library to import. You can also click the downward arrow beside the 
Browse button and choose 
Browse From (

) to open the fullscreen 
Select File window. Click the downward arrow for the 
Location menu (

) to choose 
Show in Auxiliary Data (

) to move to the row for this file in the 
Auxiliary Data window, 
Edit Location (

) (if the location is a database), 
Copy Location (

), and (if you have copied a file location) 
Paste Location (

).
 
    For each row in the table, enter a Function name (
myfun, for example) and a space-separated or comma-separated list of the names of its input 
Arguments (
x y, for example).
 
    Enter a value in the Initialization data field. The value is sent to the library when it is loaded. Select the 
Thread safe check box to declare that the function is a thread-safe pure function (that is, a function that always returns the same results using the same input argument values and that does not have any side effects or output). Select this check box to improve performance.