Skip to content

Allow to initialize write data#2

Closed
BenjaminRodenberg wants to merge 3 commits intodata-context-to-waveform-contextfrom
initialize-write-data
Closed

Allow to initialize write data#2
BenjaminRodenberg wants to merge 3 commits intodata-context-to-waveform-contextfrom
initialize-write-data

Conversation

@BenjaminRodenberg
Copy link
Copy Markdown
Owner

@BenjaminRodenberg BenjaminRodenberg commented Aug 23, 2021

Main changes of this PR

Add API function initializeWriteScalarData(writeData, vertexIDs, dataID) which allows to set value of Waveform at starting time of the simulation. This is an optional API call.

Motivation and additional information

Currently we can only use constant interpolation in the first window, since only one data point is available from writeScalarData. This data is associated with the end of the window. Offering an API call initializeWriteScalarData which must be called before initializeData allows us to provide data associated with the beginning of the first window. Together with the data provided via writeScalarData this allows linear interpolation already in the first window.

Note that for the second and following windows the data from the previous window will be used to define the linear interpolation. Therefore, the API call initializeWriteScalarData should only change the behavior in the first window.

Todos

Author's checklist

  • I added a changelog file with this PR number in docs/changelog/ if there are noteworthy changes.
  • I ran tools/formatting/check-format and everything is formatted correctly.
  • I sticked to C++14 features.
  • I sticked to CMake version 3.10.
  • I squashed / am about to squash all commits that should be seen as one.

Reviewers' checklist

  • Does the changelog entry make sense? Is it formatted correctly?
  • Do you understand the code changes?
  • (more questions/tasks)

@BenjaminRodenberg BenjaminRodenberg changed the base branch from develop to data-context-to-waveform-context August 23, 2021 15:52
@BenjaminRodenberg
Copy link
Copy Markdown
Owner Author

To reach the goal of this PR, we actually have to communicate and map not mesh::Data, but time::Waveform. This is largely the functionality required for a waveform relaxation version of writeScalarData etc. (write direction) and therefore out of scope for precice#1029.

@BenjaminRodenberg
Copy link
Copy Markdown
Owner Author

Already covered in #1. Closing this PR.

@BenjaminRodenberg BenjaminRodenberg deleted the initialize-write-data branch August 11, 2022 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant