General Services for Advanced Coupling Algorithms

Your client can register services that can be called from the SIMULIA Co-Simulation Services Director in a coupled simulation.

Warning: This is an advanced capability.

It is possible to register callback functions to perform specialized interface computation that are then called from the SIMULIA Co-Simulation Services Director. This requires changes to the SCXML state machine, which requires requires a service project.

This page discusses:

Registering a Service

Use the SMACseRegisterService function to register a call-back function. The SMACseRegisterService function takes the following arguments:

iServiceName
Service name as specified in the SCXML state chart.
iFunction
Service function.
iUserData
Opaque point to user data to be accessed by the service function.
iCollective
Set to 1 if the function is called collectively on all compute ranks; otherwise, set to 0 to be called by the main process.
iPersistant
Set to 0.

You should call SMACseRegisterService prior to registering your model.

Example

The following example illustrates how to register services:

                             :
  SMACseRegisterService("myServiceTask1",computeLagrangeMultipliers, NULL, 0, 0);
  SMACseRegisterService("myServiceTask2",SolverInterfaceSystem, NULL, 0, 0); 
                             :
  SMACseRegisterModel( );