-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove last else-cases in FF and CHT #197
Remove last else-cases in FF and CHT #197
Conversation
Not known by any or by too many modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the contribution, @maxfirmbach!
I went ahead and added a similar error message that checks across modules. Scenarios:
- The user does not specify any read or any write data --> Nothing is happening, preCICE works, no data exchange, no warning. (do we want to change this?)
- The user mistypes a data type --> Error message.
- The user forgot to enable a module --> Error message.
- The user has extended the adapter and now has two modules defining the same read/write data set --> Error message (to not rely on picking the last occuring one).
To implement this error, I had to change the return type of the addWriters
and addReaders
methods from void
to bool
and count in how many modules a dataset is found.
@davidscn please cross-check my changes, at least by looking at the diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user does not specify any read or any write data --> Nothing is happening, preCICE works, no data exchange, no warning. (do we want to change this?)
From what I understand you raise an error in case no reader or no writer was specified. This disables unidirectional coupling. We should only raise an error message in case the reader and writer are in total zero?!
The user mistypes a data type --> Error message.
✔️
The user forgot to enable a module --> Error message.
✔️
The user has extended the adapter and now has two modules defining the same read/write data set --> Error message (to not rely on picking the last occuring one).
✔️
Co-authored-by: David Schneider <[email protected]>
Co-authored-by: David Schneider <[email protected]>
Co-authored-by: David Schneider <[email protected]>
Co-authored-by: David Schneider <[email protected]>
@davidscn thanks again for your suggestions, I am ready for another review. As a summary, I took the original suggestion (mostly a work-around) and changed every module to handle possible related errors. |
Loading several modules e.g. FF and FSI results in an error message (see issue #196).
The last else-case in the FF- and CHT-modules for writing and reading participants is deleted,
which should provide a first fix. Now the branching should be consistent in all three available modules (FSI, FF, CHT).