Skip to main content

File syscSystemCoupling.h

Location: syscSystemCoupling.h

Includes

  • SystemCouplingParticipant/LibraryType.hpp
  • SystemCouplingParticipant/syscCommonTypes.h
  • SystemCouplingParticipant/syscCouplingInterface.h
  • SystemCouplingParticipant/syscFunctionTypes.h
  • SystemCouplingParticipant/syscLegacyInterfaces.h
  • SystemCouplingParticipant/syscParameter.h
  • SystemCouplingParticipant/syscPointCloud.h
  • SystemCouplingParticipant/syscRegion.h
  • SystemCouplingParticipant/syscVariable.h
  • SystemCouplingParticipant/syscVolumeMesh.h
  • SystemCouplingParticipant/syscSurfaceMesh.h
  • <stddef.h>
graph LR
7["SystemCouplingParticipant/syscParameter.h"]

3["SystemCouplingParticipant/syscCommonTypes.h"]

13["stddef.h"]

11["SystemCouplingParticipant/syscVolumeMesh.h"]

5["SystemCouplingParticipant/syscFunctionTypes.h"]

1["syscSystemCoupling.h"]
click 1 "syscSystemCoupling_8h.md#syscSystemCoupling_8h"
1 --> 2
1 --> 3
1 --> 4
1 --> 5
1 --> 6
1 --> 7
1 --> 8
1 --> 9
1 --> 10
1 --> 11
1 --> 12
1 --> 13

12["SystemCouplingParticipant/syscSurfaceMesh.h"]

2["SystemCouplingParticipant/LibraryType.hpp"]

10["SystemCouplingParticipant/syscVariable.h"]

6["SystemCouplingParticipant/syscLegacyInterfaces.h"]

9["SystemCouplingParticipant/syscRegion.h"]

8["SystemCouplingParticipant/syscPointCloud.h"]

4["SystemCouplingParticipant/syscCouplingInterface.h"]

Functions

Function syscStartStandaloneParallel

SyscError syscStartStandaloneParallel(const size_t mpiCommunicator)

Provide a function to start standalone mode in parallel.

Parameters:

  • mpiCommunicator: MPI communicator cast to size_t.

This will initialize the participant library in standalone mode and will use the provided MPI communicator for all parallel communication.

Note that if the MPI communicator is MPI_COMM_WORLD, then it is not necessary to call this function.

Parameters:

  • const size_t mpiCommunicator

Return type: SyscError

Function syscConnect

SyscError syscConnect(const char *scHost, const unsigned short scPort, const char *participantName, const char *buildInformation)

Provide a function to establish connection to System Coupling.

A participant must have obtained the host and port information from System Coupling prior to calling this function (e.g. via an input argument when participant application was started).

Parameters:

  • scHost: Name of the host on which System Coupling is running.
  • scPort: Port number on which System Coupling is listening for participant connections.
  • participantName: Name of this participant (e.g. "MAPDL-1").
  • buildInformation: Information about the build of this participant solver.

Returns:

SyscError Can be checked for any errors.

Parameters:

  • const char * scHost
  • const unsigned short scPort
  • const char * participantName
  • const char * buildInformation

Return type: SyscError

Function syscConnectParallel

SyscError syscConnectParallel(const char *scHost, const unsigned short scPort, const char *participantName, const size_t communicator, const char *buildInformation)

Provide a function to establish connection to System Coupling in parallel.

This function is an alternative to syscConnect function. It works the same way as syscConnect, but it takes in one additional argument, which is the MPI communicator, cast as size_t.

Note that if the MPI communicator is MPI_COMM_WORLD, then it is not necessary to call this function and syscConnect() can be used instead.

Parameters:

  • const char * scHost
  • const unsigned short scPort
  • const char * participantName
  • const size_t communicator
  • const char * buildInformation

Return type: SyscError

Function syscConnectUseStruct

SyscError syscConnectUseStruct(SyscParticipantInfo participantInfo)

Provide a function to establish connection to System Coupling in serial using a C structure.

Parameters:

  • participantInfo: A C structure containing the participant attributes

Returns:

SyscError

Parameters:

Return type: SyscError

Function syscConnectParallelUseStruct

SyscError syscConnectParallelUseStruct(SyscParticipantInfo participantInfo, const size_t communicator)

Provide a function to establish connection to System Coupling in parallel using a C structure.

Parameters:

  • participantInfo: A C structure containing the participant attributes
  • communicator: A size_t flag signifying what mode to run in parallel with.

Returns:

SyscError

Parameters:

Return type: SyscError

Function syscAddRegion

SyscError syscAddRegion(const SyscRegion region)

Provide a function to add a region that could be used in a coupled analysis.

If this region has already been added, then this call will have no effect.

If a different region with the same has already been added, then an error will be returned.

If the region name contains invalid characters, then a runtime error will be thrown.

Parameters:

Return type: SyscError

Function syscAddInputParameter

SyscError syscAddInputParameter(const SyscParameter parameter)

Provide a method to add an input parameter that could be used in a coupled analysis.

If this parameter has already been added as an input solver parameter, then this call will have no effect.

If a different parameter with the same name has already been added as an input parameter, then a runtime error will be thrown.

If a parameter with the same name has already been added as an output parameter, then a runtime error will be thrown.

If the parameter name contains invalid characters, a runtime error will be thrown.

Parameters:

  • parameter: Parameter whose values are provided by System Coupling and consumed by the participant.

Parameters:

Return type: SyscError

Function syscAddOutputParameter

SyscError syscAddOutputParameter(const SyscParameter parameter)

Provide a method to add an output parameter that could be used in a coupled analysis.

If this parameter has already been added as an output solver parameter, then this call will have no effect.

If a different parameter with the same name has already been added as an output parameter, then a runtime error will be thrown.

If a parameter with the same name has already been added as an input parameter, then a runtime error will be thrown.

If the parameter name contains invalid characters, a runtime error will be thrown.

Parameters:

  • parameter: Parameter whose values are provided by System Coupling and consumed by the participant.

Parameters:

Return type: SyscError

Function syscGetNumInputParameters

size_t syscGetNumInputParameters()

Provide a method to get the number of input parameters.

Returns:

Number of input parameters.

Return type: size_t

Function syscGetNumOutputParameters

size_t syscGetNumOutputParameters()

Provide a method to get the number of output parameters.

Returns:

Number of output parameters.

Return type: size_t

Function syscGetAddedInputParameter

SyscParameter syscGetAddedInputParameter(size_t index)

Provide a function to return input parameter information.

Parameters:

  • index: - input parameter index

Returns:

Input parameter information at specified index.

Parameters:

  • size_t index

Return type: SyscParameter

Function syscGetAddedOutputParameter

SyscParameter syscGetAddedOutputParameter(size_t index)

Provide a function to return input parameter information.

Parameters:

  • index: - input parameter index

Returns:

Output parameter information at specified index.

Parameters:

  • size_t index

Return type: SyscParameter

Function syscGetNumRealAttributes

size_t syscGetNumRealAttributes()

Provide a function to get the number of real attributes.

Returns:

Number of real attributes.

Return type: size_t

Function syscGetNumIntegerAttributes

size_t syscGetNumIntegerAttributes()

Provide a function to get the number of integer attributes.

Returns:

Number of integer attributes.

Return type: size_t

Function syscGetAddedRealAttribute

SyscRealAttribute syscGetAddedRealAttribute(size_t index)

Provide a function to return real attribute information.

Parameters:

  • index: - real attribute index.

Returns:

Real attribute information at specified index.

Parameters:

  • size_t index

Return type: SyscRealAttribute

Function syscGetAddedIntegerAttribute

SyscIntegerAttribute syscGetAddedIntegerAttribute(size_t index)

Provide a function to return integer attribute information.

Parameters:

  • index: - integer attribute index.

Returns:

Integer attribute information at specified index.

Parameters:

  • size_t index

Return type: SyscIntegerAttribute

Function syscAddRealAttribute

SyscError syscAddRealAttribute(const SyscRealAttribute attribute)

Provide a method to add a real attribute that could be used in a coupled analysis.

If this attribute has already been added as a real attribute, then this call will have no effect.

If a different real attribute with the same name has already been added, then a runtime error will be thrown.

If a an attribute with the same name has already been added as an integer attribute, then a runtime error will be thrown.

If the attribute name contains invalid characters, a runtime error will be thrown.

Parameters:

  • attribute: Real attribute.

Parameters:

Return type: SyscError

Function syscAddIntegerAttribute

SyscError syscAddIntegerAttribute(const SyscIntegerAttribute attribute)

Provide a method to add an integer attribute that could be used in a coupled analysis.

If this attribute has already been added as an integer attribute, then this call will have no effect.

If a different integer attribute with the same name has already been added, then a runtime error will be thrown.

If a an attribute with the same name has already been added as a real attribute, then a runtime error will be thrown.

If the attribute name contains invalid characters, a runtime error will be thrown.

Parameters:

  • attribute: Integer attribute.

Parameters:

Return type: SyscError

Function syscGetParameterValue

double syscGetParameterValue(const char *parameterName, SyscError *errorCode)

Provide a function to get a Parameter value.

Parameters:

  • parameterName: - name of the parameter.
  • errorCode: - error status for the fuction.

Parameters:

  • const char * parameterName
  • SyscError * errorCode

Return type: double

Function syscSetParameterValue

SyscError syscSetParameterValue(const char *parameterName, double value)

Provide a function to set a Parameter value.

Parameters:

  • parameterName: - name of the parameter.
  • value: - value of the parameter.

Parameters:

  • const char * parameterName
  • double value

Return type: SyscError

Function syscGetRealAttributeValue

double syscGetRealAttributeValue(const char *attributeName, SyscError *errorCode)

Provide a function to get a RealAttribute value.

Parameters:

  • attributeName: - name of the attribute.
  • errorCode: - error status for the function.

Parameters:

  • const char * attributeName
  • SyscError * errorCode

Return type: double

Function syscGetIntegerAttributeValue

int64_t syscGetIntegerAttributeValue(const char *attributeName, SyscError *errorCode)

Provide a function to get an IntegerAttribute value.

Parameters:

  • attributeName: - name of the attribute.
  • errorCode: - error status for the function.

Parameters:

  • const char * attributeName
  • SyscError * errorCode

Return type: int64_t

Function syscAddCouplingInterface

SyscError syscAddCouplingInterface(const SyscCouplingInterface couplingInterface)

Provide a function to add a coupling interface.

If this coupling interface has already been added, then this call will have no effect.

If a different coupling interface with the same has already been added, then an error status will be returned.

If the coupling interface name contains invalid characters, then an error status will be returned.

See SyscCouplingInterface for more details.

Parameters:

Return type: SyscError

Function syscAddCouplingInterfaceA

SyscError syscAddCouplingInterfaceA(const SyscCouplingInterface couplingInterface, int autoGenerateDataTransfers)

Provide a function to add a coupling interface.

If this coupling interface has already been added, then this call will have no effect.

If a different coupling interface with the same has already been added, then an error status will be returned.

If the coupling interface name contains invalid characters, then an error status will be returned.

See SyscCouplingInterface for more details.

Parameters:

Return type: SyscError

Function syscCompleteSetup

SyscError syscCompleteSetup(const SyscSetupInfo setupInfo)

Provide a function to notify System Coupling that setup can be completed.

After this function is called, coupled analysis setup can no longer be updated, i.e. regions and variables cannot be changed.

Once the setup is complete, any subsequent call to complete the setup will have no effect.

Parameters:

  • setupInfo: - setup information.

Parameters:

Return type: SyscError

Function syscRegisterInputScalarDataAccess

SyscError syscRegisterInputScalarDataAccess(SyscInputScalarDataAccess dataAccess)

Provide a function to register input scalar data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputScalarDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputScalarDataAccessWithPointer

SyscError syscRegisterInputScalarDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscInputScalarDataAccessWithPointer dataAccess)

Provide a function to register input scalar data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscInputScalarDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputScalarDataMultiZoneAccess

SyscError syscRegisterInputScalarDataMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscInputScalarDataMultiZoneAccess dataAccess)

Provide a function to register input scalar data multi-zone access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputScalarDataMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputVectorDataAccess

SyscError syscRegisterInputVectorDataAccess(SyscInputVectorDataAccess dataAccess)

Provide a function to register input vector data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputVectorDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputVectorDataAccessWithPointer

SyscError syscRegisterInputVectorDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscInputVectorDataAccessWithPointer dataAccess)

Provide a function to register input vector data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscInputVectorDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputVectorDataMultiZoneAccess

SyscError syscRegisterInputVectorDataMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscInputVectorDataMultiZoneAccess dataAccess)

Provide a function to register input vector data multi-zone access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputVectorDataMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputScalarDataAccess

SyscError syscRegisterOutputScalarDataAccess(SyscOutputScalarDataAccess dataAccess)

Provide a function to register output scalar data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputScalarDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputScalarDataAccessWithPointer

SyscError syscRegisterOutputScalarDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputScalarDataAccessWithPointer dataAccess)

Provide a function to register output scalar data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscOutputScalarDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputScalarDataMultiZoneAccess

SyscError syscRegisterOutputScalarDataMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputScalarDataMultiZoneAccess dataAccess)

Provide a function to register output scalar data multi-zone access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputScalarDataMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputVectorDataAccess

SyscError syscRegisterOutputVectorDataAccess(SyscOutputVectorDataAccess dataAccess)

Provide a function to register output vector data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputVectorDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputVectorDataAccessWithPointer

SyscError syscRegisterOutputVectorDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputVectorDataAccessWithPointer dataAccess)

Provide a function to register output vector data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscOutputVectorDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputVectorDataMultiZoneAccess

SyscError syscRegisterOutputVectorDataMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputVectorDataMultiZoneAccess dataAccess)

Provide a function to register output vector data multi-zone access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputVectorDataMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputComplexScalarDataAccess

SyscError syscRegisterInputComplexScalarDataAccess(SyscInputComplexScalarDataAccess dataAccess)

Provide a function to register input complex scalar data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputComplexScalarDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputComplexScalarDataAccessWithPointer

SyscError syscRegisterInputComplexScalarDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscInputComplexScalarDataAccessWithPointer dataAccess)

Provide a function to register input complex scalar data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscInputComplexScalarDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputComplexVectorDataAccess

SyscError syscRegisterInputComplexVectorDataAccess(SyscInputComplexVectorDataAccess dataAccess)

Provide a function to register input complex vector data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscInputComplexVectorDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterInputComplexVectorDataAccessWithPointer

SyscError syscRegisterInputComplexVectorDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscInputComplexVectorDataAccessWithPointer dataAccess)

Provide a function to register input complex vector data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscInputComplexVectorDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputComplexScalarDataAccess

SyscError syscRegisterOutputComplexScalarDataAccess(SyscOutputComplexScalarDataAccess dataAccess)

Provide a function to register output complex scalar data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputComplexScalarDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputComplexScalarDataAccessWithPointer

SyscError syscRegisterOutputComplexScalarDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputComplexScalarDataAccessWithPointer dataAccess)

Provide a function to register output complex scalar data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscOutputComplexScalarDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputComplexVectorDataAccess

SyscError syscRegisterOutputComplexVectorDataAccess(SyscOutputComplexVectorDataAccess dataAccess)

Provide a function to register output complex vector data access.

Parameters:

  • dataAccess: - a pointer to the function that conforms to SyscOutputComplexVectorDataAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterOutputComplexVectorDataAccessWithPointer

SyscError syscRegisterOutputComplexVectorDataAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscOutputComplexVectorDataAccessWithPointer dataAccess)

Provide a function to register output complex vector data access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • dataAccess: - a pointer to the function that conforms to SyscOutputComplexVectorDataAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterSurfMeshAccess

SyscError syscRegisterSurfMeshAccess(SyscSurfMeshAccess meshAccess)

Provide a function to register surface mesh access.

Parameters:

  • meshAccess: - a pointer to the function that conforms to SyscSurfMeshAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterSurfaceMeshAccessWithPointer

SyscError syscRegisterSurfaceMeshAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscSurfaceMeshAccessWithPointer meshAccess)

Provide a function to register surface mesh access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • meshAccess: - a pointer to the function that conforms to SyscSurfaceMeshAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterSurfaceMeshMultiZoneAccess

SyscError syscRegisterSurfaceMeshMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscSurfaceMeshMultiZoneAccess meshAccess)

Provide a function to register surface mesh multi-zone access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • meshAccess: - a pointer to the function that conforms to SyscSurfaceMeshMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterVolumeMeshAccess

SyscError syscRegisterVolumeMeshAccess(SyscVolumeMeshAccess meshAccess)

Provide a function to register volume mesh access.

Parameters:

  • meshAccess: - a pointer to the function that conforms to SyscVolumeMeshAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterVolumeMeshAccessWithPointer

SyscError syscRegisterVolumeMeshAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscVolumeMeshAccessWithPointer meshAccess)

Provide a function to register volume mesh access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • meshAccess: - a pointer to the function that conforms to SyscVolumeMeshAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterVolumeMeshMultiZoneAccess

SyscError syscRegisterVolumeMeshMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscVolumeMeshMultiZoneAccess meshAccess)

Provide a function to register volume mesh multi-zone access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • meshAccess: - a pointer to the function that conforms to SyscVolumeMeshMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterPointCloudAccess

SyscError syscRegisterPointCloudAccess(SyscPointCloudAccess pointCloudAccess)

Provide a function to register point cloud access.

Parameters:

  • pointCloudAccess: - a pointer to the function that conforms to SyscPointCloudAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterPointCloudAccessWithPointer

SyscError syscRegisterPointCloudAccessWithPointer(SyscOpaqueDataAccess opaqueDataAccess, SyscPointCloudAccessWithPointer pointCloudAccess)

Provide a function to register point cloud access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • pointCloudAccess: - a pointer to the function that conforms to SyscPointCloudAccessWithPointer prototype.

Parameters:

Return type: SyscError

Function syscRegisterPointCloudMultiZoneAccess

SyscError syscRegisterPointCloudMultiZoneAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscPointCloudMultiZoneAccess pointCloudAccess)

Provide a function to register point cloud multi-zone access.

Parameters:

  • opaqueDataAccess: - a pointer to an address in memory. This pointer will be passed into the callback function.
  • meshAccess: - a pointer to the function that conforms to SyscPointCloudMultiZoneAccess prototype.

Parameters:

Return type: SyscError

Function syscRegisterZoneCountAccess

SyscError syscRegisterZoneCountAccess(SyscOpaqueDataAccess opaqueDataAccess, SyscZoneCountAccess zoneCountAccess)

Provide a function to register zone count access.

Parameters:

Return type: SyscError

Function syscRegisterRestartPointCreation

SyscError syscRegisterRestartPointCreation(SyscRestartPointCreation restartPointCreation)

Provide a function to register restart point creation callback.

Parameters:

  • restartPointCreation: - a pointer to the function that conforms to SyscRestartPointCreation function prototype. See SyscRestartPointCreation for details.

Parameters:

Return type: SyscError

Function syscInitializeAnalysis

SyscError syscInitializeAnalysis()

Provide a function to notify System Coupling that analysis initialization can be completed.

This function must be called after registering mesh and variable data access and prior to entering the coupled analysis loop.

If this function is called before the coupled analysis is complete, it will automatically complete the coupled analysis and assume steady analysis type.

Return type: SyscError

Function syscDoIteration

int syscDoIteration()

Provide a function to check whether to do a coupling iteration.

This function returns 1 (true) if another coupling iteration is required, otherwise it returns 0 (false).

Return type: int

Function syscDoTimeStep

int syscDoTimeStep()

Provide a function to check whether to do a coupling time step.

This function returns 1 (true) if another coupling time step is required, otherwise it returns 0 (false).

This function should be called to check if another coupling time step should be done. If the previous coupling time step is finished and another time step should be performed, then calling this function will tell System Coupling that the coupling participant is going to advance to the next time step (i.e. calling syscDoTimeStep() will cause syscDoIteration() to change from returning false to returning true, under the conditions described above).

This function only makes sense for transient analysis. It will always return false for steady analysis.

Return type: int

Function syscGetCurrentTimeStep

SyscTimeStep syscGetCurrentTimeStep()

Provide a function to get current time step.

This function returns a time step struct, which contains time step number, start time, and time step size for the current coupling time step.

A default value (time step number 0, start time 0.0, time step size 0.0) is returned if this function is called outside the coupled analysis loop or if the analysis is steady.

Return type: SyscTimeStep

Function syscUpdateInputs

SyscError syscUpdateInputs()

Provide a function to update the participants input variables.

Solution data for all input variables will be updated. Depending on the defined interfaces, data will be transferred from another coupling participant solver, or from the opposite side of the same-participant coupling interface.

When doing cosimulation, this function must be called from inside the coupled analysis loop. It tells System Coupling that the participant is about to begin its solver iterations. All input variable data will be up-to-date after returning from this function. If any local coupling interfaces are defined, all corresponding input variable data will also be updated.

When doing same-participant mapping only (without cosimulation), this function should be called whenever input data needs to be brought up-to-date.

Return type: SyscError

Function syscUpdateOutputs

SyscError syscUpdateOutputs(const enum SyscConvergenceStatus convStatus)

Provide a function to update the participants output variables.

This function must be called from inside the coupled analysis loop. It tells System Coupling that the participant has finished performing its solver iterations.

Parameters:

Return type: SyscError

Function syscDisconnect

SyscError syscDisconnect()

Provide a function to end the analysis and disconnect from System Coupling.

Return type: SyscError

Function syscFatalError

void syscFatalError(const char *errorMessage)

Provide a function to notify System Coupling about a fatal error.

Parameters:

  • const char * errorMessage

Return type: void

Function syscNonFatalError

void syscNonFatalError(const char *errorMessage)

Provide a function to notify System Coupling about a non fatal error.

Parameters:

  • const char * errorMessage

Return type: void

Function syscCheckSurfaceMeshValidity

SyscError syscCheckSurfaceMeshValidity(SyscSurfaceMesh mesh)

Provide a function to perform simple mesh validity checks.

This function is provided as a testing and debugging tool and is not meant to be used in production workflows. System Coupling itself will not call this function for performance reasons.

The function will check the surface mesh for detectable problems. For example, it will check if array sizes are consistent, that elemNodeIds array only contains ids that are found in nodeIds array, etc. It is not an exhaustive validity check - the mesh can still have problems even if all checks passed.

Returns:

Return value is SyscError struct. If mesh checks passed, then retcode will be 0. If mesh checks failed, then retcode will be not 0 and message that contains information about about the particular issue.

Parameters:

Return type: SyscError

Function syscWriteSetupFile

int syscWriteSetupFile(const SyscSetupFileInfo setupFileInfo)

Provide a function to write the setup file.

This function can be used to generate a System Coupling setup file, which contains participant's setup information. It should be called after calling syscCompleteCouplingSetup.

It takes SyscSetupFileInfo struct as input parameter.

It will return true (1) if the setup file was successfully written, and false (0) otherwise.

Parameters:

Return type: int

Function syscWriteResults

SyscError syscWriteResults(const SyscResultsInfo resultsInfo)

Write results to a file.

Parameters:

Return type: SyscError

Function syscGetNumRegions

size_t syscGetNumRegions()

Provide a function to return the number of added regions.

Returns:

Number of regions.

Return type: size_t

Function syscGetAddedRegion

SyscRegion syscGetAddedRegion(size_t index)

Provide a function to return added region given the region index.

Parameters:

Returns:

Region at specified index.

Parameters:

  • size_t index

Return type: SyscRegion

Function syscGetSolutionControl

SyscSolutionControl syscGetSolutionControl()

Get solution control.

Return type: SyscSolutionControl

Function syscGetNumCouplingInterfaces

size_t syscGetNumCouplingInterfaces()

Provide a function to return the number of added coupling interfaces.

Returns:

Number of coupling interfaces.

Return type: size_t

Function syscGetAddedCouplingInterface

SyscCouplingInterface syscGetAddedCouplingInterface(size_t index)

Parameters:

  • size_t index

Return type: SyscCouplingInterface

Source

/*
* Copyright ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
*/

#pragma once

#include "SystemCouplingParticipant/LibraryType.hpp"

#include "SystemCouplingParticipant/syscCommonTypes.h"
#include "SystemCouplingParticipant/syscCouplingInterface.h"
#include "SystemCouplingParticipant/syscFunctionTypes.h"
#include "SystemCouplingParticipant/syscLegacyInterfaces.h"
#include "SystemCouplingParticipant/syscParameter.h"
#include "SystemCouplingParticipant/syscPointCloud.h"
#include "SystemCouplingParticipant/syscRegion.h"
#include "SystemCouplingParticipant/syscVariable.h"
#include "SystemCouplingParticipant/syscVolumeMesh.h"
#include "SystemCouplingParticipant/syscSurfaceMesh.h"

#include `<stddef.h>`

#ifdef __cplusplus
extern "C" {
#endif

SyscError syscStartStandaloneParallel(const size_t mpiCommunicator);

SyscError syscConnect(
const char* scHost,
const unsigned short scPort,
const char* participantName,
const char* buildInformation);

SyscError syscConnectParallel(
const char* scHost,
const unsigned short scPort,
const char* participantName,
const size_t communicator,
const char* buildInformation);

SyscError syscConnectUseStruct(
SyscParticipantInfo participantInfo);

SyscError syscConnectParallelUseStruct(
SyscParticipantInfo participantInfo,
const size_t communicator);

SyscError syscAddRegion(
const SyscRegion region);

SyscError syscAddInputParameter(
const SyscParameter parameter);

SyscError syscAddOutputParameter(
const SyscParameter parameter);

size_t syscGetNumInputParameters();

size_t syscGetNumOutputParameters();

SyscParameter syscGetAddedInputParameter(size_t index);

SyscParameter syscGetAddedOutputParameter(size_t index);

size_t syscGetNumRealAttributes();

size_t syscGetNumIntegerAttributes();

SyscRealAttribute syscGetAddedRealAttribute(size_t index);

SyscIntegerAttribute syscGetAddedIntegerAttribute(size_t index);

SyscError syscAddRealAttribute(
const SyscRealAttribute attribute);

SyscError syscAddIntegerAttribute(
const SyscIntegerAttribute attribute);

double syscGetParameterValue(const char* parameterName, SyscError* errorCode);

SyscError syscSetParameterValue(
const char* parameterName,
double value);

double syscGetRealAttributeValue(
const char* attributeName,
SyscError* errorCode);

int64_t syscGetIntegerAttributeValue(
const char* attributeName,
SyscError* errorCode);

SyscError syscAddCouplingInterface(
const SyscCouplingInterface couplingInterface);

SyscError syscAddCouplingInterfaceA(
const SyscCouplingInterface couplingInterface,
int autoGenerateDataTransfers);

SyscError syscCompleteSetup(const SyscSetupInfo setupInfo);

SyscError syscRegisterInputScalarDataAccess(
SyscInputScalarDataAccess dataAccess);

SyscError syscRegisterInputScalarDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputScalarDataAccessWithPointer dataAccess);

SyscError syscRegisterInputScalarDataMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputScalarDataMultiZoneAccess dataAccess);

SyscError syscRegisterInputVectorDataAccess(
SyscInputVectorDataAccess dataAccess);

SyscError syscRegisterInputVectorDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputVectorDataAccessWithPointer dataAccess);

SyscError syscRegisterInputVectorDataMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputVectorDataMultiZoneAccess dataAccess);

SyscError syscRegisterOutputScalarDataAccess(
SyscOutputScalarDataAccess dataAccess);

SyscError syscRegisterOutputScalarDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputScalarDataAccessWithPointer dataAccess);

SyscError syscRegisterOutputScalarDataMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputScalarDataMultiZoneAccess dataAccess);

SyscError syscRegisterOutputVectorDataAccess(
SyscOutputVectorDataAccess dataAccess);

SyscError syscRegisterOutputVectorDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputVectorDataAccessWithPointer dataAccess);

SyscError syscRegisterOutputVectorDataMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputVectorDataMultiZoneAccess dataAccess);

SyscError syscRegisterInputComplexScalarDataAccess(
SyscInputComplexScalarDataAccess dataAccess);

SyscError syscRegisterInputComplexScalarDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputComplexScalarDataAccessWithPointer dataAccess);

SyscError syscRegisterInputComplexVectorDataAccess(
SyscInputComplexVectorDataAccess dataAccess);

SyscError syscRegisterInputComplexVectorDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscInputComplexVectorDataAccessWithPointer dataAccess);

SyscError syscRegisterOutputComplexScalarDataAccess(
SyscOutputComplexScalarDataAccess dataAccess);

SyscError syscRegisterOutputComplexScalarDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputComplexScalarDataAccessWithPointer dataAccess);

SyscError syscRegisterOutputComplexVectorDataAccess(
SyscOutputComplexVectorDataAccess dataAccess);

SyscError syscRegisterOutputComplexVectorDataAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscOutputComplexVectorDataAccessWithPointer dataAccess);

SyscError syscRegisterSurfMeshAccess(SyscSurfMeshAccess meshAccess);

SyscError syscRegisterSurfaceMeshAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscSurfaceMeshAccessWithPointer meshAccess);

SyscError syscRegisterSurfaceMeshMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscSurfaceMeshMultiZoneAccess meshAccess);

SyscError syscRegisterVolumeMeshAccess(SyscVolumeMeshAccess meshAccess);

SyscError syscRegisterVolumeMeshAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscVolumeMeshAccessWithPointer meshAccess);

SyscError syscRegisterVolumeMeshMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscVolumeMeshMultiZoneAccess meshAccess);

SyscError syscRegisterPointCloudAccess(SyscPointCloudAccess pointCloudAccess);

SyscError syscRegisterPointCloudAccessWithPointer(
SyscOpaqueDataAccess opaqueDataAccess,
SyscPointCloudAccessWithPointer pointCloudAccess);

SyscError syscRegisterPointCloudMultiZoneAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscPointCloudMultiZoneAccess pointCloudAccess);

SyscError syscRegisterZoneCountAccess(
SyscOpaqueDataAccess opaqueDataAccess,
SyscZoneCountAccess zoneCountAccess);

SyscError syscRegisterRestartPointCreation(
SyscRestartPointCreation restartPointCreation);

SyscError syscInitializeAnalysis();

int syscDoIteration();

int syscDoTimeStep();

SyscTimeStep syscGetCurrentTimeStep();

SyscError syscUpdateInputs();

SyscError syscUpdateOutputs(const enum SyscConvergenceStatus convStatus);

SyscError syscDisconnect();

void syscFatalError(const char* errorMessage);

void syscNonFatalError(const char* errorMessage);

SyscError syscCheckSurfaceMeshValidity(SyscSurfaceMesh mesh);

int syscWriteSetupFile(const SyscSetupFileInfo setupFileInfo);

SyscError syscWriteResults(const SyscResultsInfo resultsInfo);

size_t syscGetNumRegions();

SyscRegion syscGetAddedRegion(size_t index);

SyscSolutionControl syscGetSolutionControl();

size_t syscGetNumCouplingInterfaces();


SyscCouplingInterface syscGetAddedCouplingInterface(size_t index);

#ifdef __cplusplus
}
#endif