Skip to content

Simplify waveform class: Don't use data from old window, allow higher-order interpolation through BSplines #1422

Merged
BenjaminRodenberg merged 46 commits intoprecice:develop-v3.0.0from
BenjaminRodenberg:1421-simplification-of-waveform-class
Sep 28, 2022
Merged

Simplify waveform class: Don't use data from old window, allow higher-order interpolation through BSplines #1422
BenjaminRodenberg merged 46 commits intoprecice:develop-v3.0.0from
BenjaminRodenberg:1421-simplification-of-waveform-class

Conversation

@BenjaminRodenberg
Copy link
Copy Markdown
Contributor

@BenjaminRodenberg BenjaminRodenberg commented Aug 23, 2022

Main changes of this PR

Closes #1421.

Motivation and additional information

This implements an important feature needed for #1171. Multiple samples can now be stored in the waveform and higher-order interpolation is possible. Note that this feature is not yet available to the user and only implemented for the Waveform class.

Author's checklist

  • I added a changelog file with make changelog if there are user-observable changes since the last release.
  • I added a test to cover the proposed changes in our test suite.
  • I ran make format to ensure everything is formatted correctly.
  • I sticked to C++17 features.
  • I sticked to CMake version 3.16.3.
  • I squashed / am about to squash all commits that should be seen as one.
  • Already introduce (some) changes from c79636b here?

Reviewers' checklist

  • Does the changelog entry make sense? Is it formatted correctly?
  • Do you understand the code changes?

BenjaminRodenberg and others added 18 commits August 11, 2022 13:02
* 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]>
* Make read mapping conditional to avoid unnecessary mappings.
* Update corresponding tests.

Co-authored-by: Benjamin Uekermann <[email protected]>
* 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]>
* Make read mapping conditional to avoid unnecessary mappings.
* Update corresponding tests.

Co-authored-by: Benjamin Uekermann <[email protected]>
* Get changes from precice#1414 into
this independent Commit.
* Simplifies Waveform by removing data from past windows and support for
second-order interpolation by using data from old window.
* Allow to store multiple samples within one window.
* Reset all samples when window is repeated - except the sample at the
beginning of the window.
* Allow higher-order interpolation through B-Splines, if sufficiently
many samples are available.
* Update intergration tests for zeroth order interpolation for more
consistent behavior with first order interpolation.
@BenjaminRodenberg BenjaminRodenberg added the enhancement A new feature, a new functionality of preCICE (from user perspective) label Aug 23, 2022
@BenjaminRodenberg BenjaminRodenberg added this to the Version 3.0.0 milestone Aug 23, 2022
@BenjaminRodenberg BenjaminRodenberg self-assigned this Aug 23, 2022
@BenjaminRodenberg BenjaminRodenberg changed the base branch from develop to develop-v3.0.0 August 23, 2022 19:56
Copy link
Copy Markdown
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I did not read through all tests.

Minor:

  • It's a bit odd that the tests of PiecewiseWaveformTest are not part of WaveformTest. Usually, there should be a one-to-one match between class and test class.
  • We need unit tests for the Storage class.

@BenjaminRodenberg BenjaminRodenberg merged commit 270cc08 into precice:develop-v3.0.0 Sep 28, 2022
BenjaminRodenberg added a commit that referenced this pull request Nov 2, 2022
…-order interpolation through BSplines (#1422)

* Allow to store multiple samples within one window.
* Allow higher-order interpolation through B-Splines, if sufficiently
many samples are available.
* Simplifies Waveform by removing data from past windows and support for
second-order interpolation by using data from old window.
* Reset all samples when window is repeated - except the sample at the
beginning of the window.
* Update intergration tests for zeroth order interpolation for more
consistent behavior with first order interpolation.
* Introduce time::Storage

Co-authored-by: Benjamin Uekermann <[email protected]>
BenjaminRodenberg added a commit that referenced this pull request Nov 4, 2022
…-order interpolation through BSplines (#1422)

* Allow to store multiple samples within one window.
* Allow higher-order interpolation through B-Splines, if sufficiently
many samples are available.
* Simplifies Waveform by removing data from past windows and support for
second-order interpolation by using data from old window.
* Reset all samples when window is repeated - except the sample at the
beginning of the window.
* Update intergration tests for zeroth order interpolation for more
consistent behavior with first order interpolation.
* Introduce time::Storage

Co-authored-by: Benjamin Uekermann <[email protected]>
@BenjaminRodenberg BenjaminRodenberg deleted the 1421-simplification-of-waveform-class branch March 13, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature, a new functionality of preCICE (from user perspective)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplification of Waveform class

2 participants