Skip to content
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 deprecated isReadDataAvailable #247

Merged
merged 2 commits into from
Sep 19, 2022
Merged

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Sep 19, 2022

As discussed in precice/precice#1223, preCICE v2.5.0 deprecated isReadDataAvailable(), which is planned for removal in preCICE v3. Related: #235.

This PR already removes this call, to avoid the deprecation warning when compiling the adapter.

It should currently not matter for results, as it re-reads the same information on the boundary, but it should make time interpolation easier in the future. I quickly ran the flow-over-heated-plate case with subcycling (2 solver time steps for 1 coupling time window) and implicit coupling (hint: we currently have issues with FSI and subcycling #58), and the result files are identical. In this small case, the runtime seems to be approximately the same (without any rigorous performance test, just one sample for each case).

Still, the adapter performs now each assignment on the boundaries every time.

@uekerman / @davidscn Anything else to consider here?

The diff may look a bit complicated, but it is just removing one if check and indenting-out.

TODO list:

  • I updated the documentation in docs/
  • I added a changelog entry in changelog-entries/ (create directory if missing)

@MakisH MakisH added the compatibility Affecting only specific OpenFOAM / preCICE versions label Sep 19, 2022
@MakisH MakisH self-assigned this Sep 19, 2022
@MakisH MakisH added this to the v1.2.0 milestone Sep 19, 2022
Copy link
Member

@davidscn davidscn 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

@MakisH MakisH merged commit 43fef26 into develop Sep 19, 2022
@MakisH MakisH deleted the remove-isReadDataAvailable branch September 19, 2022 19:11
@thesamriel
Copy link
Contributor

Using serial coupling, participant 1 reads all quantities from a zero buffer before the first timestep. This sets the boundary values at the interface to 0 for all read variables, correct?

This becomes problematic when using compressible flows in fluid-fluid coupling, since a 0 pressure leads to a division by 0 error.

Ran into this problem for my flow over heated wall segment test case for fluid-fluid coupling after updating the adapter.

@MakisH
Copy link
Member Author

MakisH commented Feb 2, 2023

This sounds like a data initialization issue to me, which should be documented independently.

The purpose of the isReadDataAvailable was mostly to not read again and again when subcycling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Affecting only specific OpenFOAM / preCICE versions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants