preCICE v3.1.1
Loading...
Searching...
No Matches
PythonAction.py
Go to the documentation of this file.
1def performAction(time, sourceData, targetData):
2 """This function is called at the configured timing.
3 Its parameters are time, the source data, followed by the target data.
4 Source and target data can be omitted (selectively or both) by not mentioning
5 them in the preCICE XML configuration (see the configuration reference)."""
6
7 # Usage example:
8 # for i in range(sourceData.size):
9 # targetData[i] = sourceData[i] + 1 # Add 1 to each data component
10 # i = i + 1
performAction(time, sourceData, targetData)