Skip to content

Make calling initializeData mandatory? #1196

@BenjaminRodenberg

Description

@BenjaminRodenberg

Please describe the problem you are trying to solve.

Simplifying the implementation of coupling schemes and have a stricter control flow with less optional branches.

Describe the solution you propose.

I suggest to make the call to initializeData() mandatory for every preCICE program. This is clearly breaking and will affect the users. I see the following advantages:

  • Data exchange of initial data becomes more explicit for the user. If no data is written before calling initializeData(), initial data will be zero. There is an exception for the second participant of serial coupling schemes, because they receive data from the first iteration of the first iteration.
  • We know that we don't have to exchange data in initialize(). Currently, we don't know whether initializeData() will be called after initialize(). Therefore the following statements necessary:
    • receive data in initialize of serial coupling scheme, if initializeData is not called: see here
    • receive data in initializeData of serial coupling scheme, if initializeData is called: see here

Describe alternatives you've considered

Leave it as it is. This would be:

  • non-breaking
  • simpler for users that don't want to initialize data

Additional context

Metadata

Metadata

Labels

breaking changeBreaks backwards compatibility and users need to actquestionEverybody is invited to answer this question or give any hint.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions