Add write data buffer#1612
Conversation
* use DataMap<PtrWriteDataContext> and DataMap<PtrReadDataContext>
This reverts commit 5bb979d.
uekerman
left a comment
There was a problem hiding this comment.
I think such refactoring makes a lot of sense
| bool isAtWindowEnd = false; | ||
| for (const auto scheme : schemesToRun()) { | ||
| scheme->addComputedTime(timeToAdd); | ||
| isAtWindowEnd |= scheme->addComputedTime(timeToAdd); // @todo should be &= ? |
There was a problem hiding this comment.
I guess that we anyway don't support composition of coupling schemes with different time windows. Correct @fsimonis ?
Could then also become an assertion here. All true or all false.
966673d to
127d0ac
Compare
uekerman
left a comment
There was a problem hiding this comment.
Final tweaking.
Do we have an action unit test with subcycling? A single one could be enough already.
| bool isAtWindowEnd = false; | ||
| for (const auto scheme : schemesToRun()) { | ||
| scheme->addComputedTime(timeToAdd); | ||
| isAtWindowEnd |= scheme->addComputedTime(timeToAdd); // @todo should be &= ? |
There was a problem hiding this comment.
I guess that we anyway don't support composition of coupling schemes with different time windows. Correct @fsimonis ?
Could then also become an assertion here. All true or all false.
uekerman
left a comment
There was a problem hiding this comment.
Final favor: Please improve error messages 🙏
* Reproduces bug likely introduced via #1612
|
|
||
| void WriteDataContext::writeValuesIntoDataBuffer(::precice::span<const VertexID> vertices, ::precice::span<const double> values) | ||
| { | ||
| PRECICE_ASSERT(vertices.size() * getDataDimensions() == values.size()); |
There was a problem hiding this comment.
This assertion is also checked in ParticipantImp::writeData, looks like it can be removed from there
Main changes of this PR
Moves buffer, where write data is stored from
mesh::DataintoWriteDataContext.Motivation and additional information
Since the
ReadDataContextprovides read data through a waveform that is stored inside of theReadDataContexta similar implementation makes sense forWriteDataContext: Store data in a buffer and persist the data in aStoragein theWriteDataContext. This would also simplifymesh:Databy removing the values frommesh:Data.Author's checklist
pre-commithook to prevent dirty commits and usedpre-commit run --allto format old commits.make changelogif there are user-observable changes since the last release.Reviewers' checklist