**OUTDATED** writeData when subcycling is used#1414
**OUTDATED** writeData when subcycling is used#1414BenjaminRodenberg wants to merge 163 commits intoprecice:developfrom
Conversation
* Remove mapReadDataTo and mapWriteDataFrom. * Remove tests using removed API.
* Merge initialize and initializeData in SolverInterfaceImpl. * Merge initialize and initializeData in CouplingScheme. * Update tests correspondingly * Allow to check actions before initialize, especially checking whether initial data has to be written * Check for sending and receiving of initial data during coupling scheme configuration * Code simplification w.r.t waveform. * Use dt=0.0 in actions in initialize. Co-authored-by: Benjamin Uekermann <[email protected]> Co-authored-by: Frédéric Simonis <[email protected]>
…recice#1352) * Get tests and configs for serial implicit waveform interpolation from precice#1029. * Differentiate between received initial data and data (from advance). * Split data communication for SerialCouplingScheme and store initial data in waveform. * Move common functionality of serial and parallel coupling scheme into BiCouplingScheme. Co-authored-by: Benjamin Uekermann <[email protected]>
* Add test Integration/Serial/InitializeData/ImplicitBoth where both participants initialize. * Allow initialize=true for both participants in serial-implicit coupling scheme. * Raise warning, if first participant in serial coupling scheme initializes data with waveform order zero. * Remove check for write data, because participant does not know about waveform order. Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
* Make read mapping conditional to avoid unnecessary mappings. * Update corresponding tests. Co-authored-by: Benjamin Uekermann <[email protected]>
…sts for piecewise interpolation.
…olation when subcycling.
…Spline interpolation.
|
Summary of important changes of today:
|
* Remove mapReadDataTo and mapWriteDataFrom. * Remove tests using removed API.
* Increase timeouts for precice.cplscheme and precice.integration.Serial, because they will take longer with new tests introduced in #1414 Co-authored-by: Frédéric Simonis <[email protected]>
| } else { | ||
| // work-around for explicit coupling, because it does not support waveform relaxation. | ||
| if (reachedEndOfTimeWindow()) { // only necessary to trigger at end of time window. | ||
| storeTimeStepSendData(time::Storage::WINDOW_END); // only write data at end of window | ||
| } | ||
| } |
There was a problem hiding this comment.
We could probably remove this if-else block if we always give the correct data to time and let time decide what to do with it.
| if (_couplingScheme->isTimeWindowComplete() && _couplingScheme->moveWindowBeforeMapping()) { /* | ||
| * move to next window before mapping, if second in serial coupling. | ||
| * Reason: | ||
| * Window is complete, but first participant has already performed an iteration in the new window and the data just received is already from the new window. So we want to use it, but before doing this we have to use the data from the old window to initialize the waveform at 0.0. | ||
| */ |
There was a problem hiding this comment.
Discussed together: let's try to move the "before-mapping" branch up till the advance call from the previous iteration. Should always be possible when hacking isTimeWindowComplete.
But maybe we find a proper solution when seeing this refactoring?
…ultOfFirstAdvance() * Use time::Storage as receive data buffer * CplSchemeTests, TimeTests and some integration tests for time interpolation are failing
…. Remove support for second order extrapolation.
* Partially tested for serial coupling. * Integration/Serial/Time/Implicit/SerialCoupling/ReadWriteScalarDataWithWaveformSamplingZero works. * Initializing with zero is an open todo. * Integration/Serial/Time/Implicit/SerialCoupling/ReadWriteScalarDataWithWaveformSamplingFirstNoInit breaks.
* Integration/Serial/Time/Implicit/SerialCoupling works * Integration/Serial/Time/Implicit/ParallelCoupling breaks
* Integration/Serial/Time/Implicit/SerialCoupling works * Integration/Serial/Time/Implicit/ParallelCoupling works * Integration/Serial/Time/Implicit/MultiCoupling breaks
|
Current state:
Next steps:
|
|
I tried to merge #1504 into this PR in BenjaminRodenberg@3f35b8c, but there are a lot of conflicts and I think it's probably easier to reimplement the changes from #1414 on top of #1504 instead of trying to fix the merge. |
|
This PR is outdated and won't be merged. I will port all relevant work from here to #1523 and then close this PR. |
* Copied functions from precice#1414 * Requires still some debugging to get tests working
|
Closing this PR, development will continue in #1523 |
Main changes of this PR
Allows to write data to preCICE when subcycling is used. This either results in a piecewise constant or linear interpolation. Possibly also in higher-order interpolation.
Motivation and additional information
See #1171
Author's checklist
make changelogif there are user-observable changes since the last release.make formatto ensure everything is formatted correctly.Reviewers' checklist