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

Skip velocity object from the initializer list #330

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Jun 19, 2024

@Fujikawas noticed that the volume-coupled flow tutorial was failing early on, complaining that it could not find U_vol when adding coupling data readers.

In the original implementation (#270), the velocity was not initialized in the initializer list of the Velocity constructor, but it was deferred to the body, where it was created if needed. This is actually needed when reading source terms, since we need a temporary object to read data from preCICE.

In the follow-up extension #281, the OpenFOAM velocity object was added to the initializer list, at which point it tries to find an object that (intentionally) does not exist at that point. @thesamriel do I overlook any other reason this was added again into the initializer list?

TODO list:

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

@MakisH MakisH added the bug Unexpected problems (crashes, numerical issues, etc) label Jun 19, 2024
@MakisH MakisH added this to the Next v1.x milestone Jun 19, 2024
@MakisH MakisH requested a review from Fujikawas June 19, 2024 14:21
@MakisH MakisH self-assigned this Jun 19, 2024
@thesamriel
Copy link
Contributor

I think this is just something overlooked during merging my branch since all solvers I tested had a velocity field available.
_U was initialized in the initializer list in the original version of the adapter, on which I had based my branch. (Before the volume coupling).

@MakisH
Copy link
Member Author

MakisH commented Jun 19, 2024

I assumed so, makes sense. Thank you for the quick reply!

Copy link

@Fujikawas Fujikawas left a comment

Choose a reason for hiding this comment

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

The changes make sense for me and solved the error in the tutorial case.

@MakisH MakisH merged commit 74fb301 into precice:develop Jun 19, 2024
4 checks passed
@MakisH MakisH deleted the fix-uvol branch June 19, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problems (crashes, numerical issues, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants