Establishing Connections
When establishing connections, each client connects to the SIMULIA Co-Simulation Services Director process in charge of the coupled simulation by specifying the host the SIMULIA Co-Simulation Services Director is running on and the port number used for the particular coupled simulation.
Use the SMACseConnect function to establish connections. The
SMACseConnect function
has
the following arguments:
iCodeName- Name of your application.
It must correspond to one of the components in the Co-Simulation Configuration file.
iJobName- Analysis job name.
It must correspond to one of the component instances in the Co-Simulation Configuration file.
iWorkDir- Folder where the SIMULIA Co-Simulation Services writes the diagnostics.
iDirectorConnection- SIMULIA Co-Simulation Services
Director process in charge of the coupled simulation.
The connection is specified as a host:port pair, where the host specifies the host name or IPV4/IPV6 TCP/IP address the SIMULIA Co-Simulation Services Director is running on, and the port is the listener port of the SIMULIA Co-Simulation Services Director.
iTimeout- Timeout period in seconds.
SMACseConnectreturns a failure if the clients do not connect within the specified timeout period. iStartTime- Set this argument to zero.
iUserPutFieldFunctionputFieldcall-back function (see Transferring Field Data from the Client to the Co-Simulation Services).iUserData- Your
userDataobject.This is an opaque pointer that is passed to the
putFieldcallback function to allow access to your client's data. iUserMessageHandlerFunction- Message handler callback function (see Message Handler).
The SIMULIA Co-Simulation Services uses this function to raise any informational, warning, and error messages.
SMACseConnect returns with success if all participants in a
coupled simulation have established the required communication channels within a
specified timeout period.
In serial mode, call SMACseConnect on the root process; in parallel
mode, call SMACseConnect on all compute ranks.