-
-
Notifications
You must be signed in to change notification settings - Fork 16
Unable to write initial data to preCICE for macro-micro coupled scenarios #54
Description
Describe your setup
Operating system (e.g. Linux distribution and version): Ubuntu 22.04
preCICE STATE: precice/precice@8393841
Add the versions/commit hashes of further adapter and/or bindings.
Micro Manager: 6dcbf68
Describe the problem
Although the Micro Manager uses the Python API, the problem is not related to it and is hence described below in terms of the original C++ API.
The Micro Manager does not need a coupling mesh of its own, but just needs the vertex information of the macro-scale participant. Using getMeshVertexIDsAndCoordinates(), it gets the vertex IDs and coordinates of the macro-scale participant mesh. It then defines one micro simulation per vertex of this mesh. Then it checks if the micro simulation objects have a function called initialize() and if they do, then it calls this function to get the initial state. Then it attempts to write the initial state to preCICE by checking requiresInitialData() and then initialize().
The problem is that the function getMeshVertexIDsAndCoordinates() cannot be run before initialize(). But without running it, the Micro Manager does not know how many micro simulations to create, and hence it cannot get their initial states.
This problem was not encountered before because the functions initialize() and initializeData() were separate. Back then the order of calling functions was:
initialize()getMeshVertexIDsAndCoordinates()isWriteDataRequired()writeData...initializeData()
Step To Reproduce
Expected behaviour
Currently I do not see a way that the Micro Manager can get the mesh information from the macro-scale participant and also give initial data of the micro simulations to preCICE. One solution is that we do not allow micro simulations to write initial data to preCICE, but I have to study how this would affect macro-micro simulations.
Opening the issue to discuss if I am looking over something rather obvious.