Skip to content

Unable to write initial data to preCICE for macro-micro coupled scenarios #54

@IshaanDesai

Description

@IshaanDesai

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:

  1. initialize()
  2. getMeshVertexIDsAndCoordinates()
  3. isWriteDataRequired()
  4. writeData...
  5. initializeData()

Step To Reproduce

https://github.com/precice/micro-manager/actions/runs/5825484943/job/15797159769?pr=51

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions