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

Mesh connectivity for preCICE v3 #297

Merged
merged 15 commits into from
Aug 7, 2023
Merged

Mesh connectivity for preCICE v3 #297

merged 15 commits into from
Aug 7, 2023

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Jul 25, 2023

With preCICE v2, the adapter does:

  • set mesh vertices
  • ask OpenFOAM to compute triangles
  • give the triangle nodes coordinates to preCICE and ask for vertex IDs
  • use the vertex IDs to define triangles

With this PR (and preCICE v3), the adapter does:

  • create a std::map from vertices (std::tuple of double-triplets (coordinates)) to vertex IDs, initializing the vertex IDs to -1.
  • set mesh vertices
  • Assign vertex IDs (values) to the point-triplets (keys)
  • ask OpenFOAM to compute triangles
  • Parse the map the define triangles using the map to get IDs

I ran the flow-over-heated-plate-nearest-projection tutorial and the results look similar. Comparing all VTK files with fieldcompare, I get some successes, some failures where the difference is on the last digit, and some failures where just fieldcompare could not open the files.

co-authored by @fsimonis

Depends on #285

Closes #258.

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 compatibility Affecting only specific OpenFOAM / preCICE versions label Jul 25, 2023
@MakisH MakisH requested a review from davidscn July 25, 2023 11:55
@MakisH MakisH self-assigned this Jul 25, 2023
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.

Functionality looks good (haven't tested it). Only minor comments below.

Interface.C Outdated Show resolved Hide resolved
Interface.C Outdated Show resolved Hide resolved
Interface.C Show resolved Hide resolved
Interface.C Show resolved Hide resolved
Interface.C Outdated Show resolved Hide resolved
Interface.C Outdated Show resolved Hide resolved
Interface.C Show resolved Hide resolved
Interface.C Outdated Show resolved Hide resolved
@MakisH
Copy link
Member Author

MakisH commented Aug 4, 2023

After #285 is merged, I would rebase this branch and merge it next.
I think it is ready.

@MakisH
Copy link
Member Author

MakisH commented Aug 7, 2023

The CI is expected to fail because it is using preCICE v2.5.0. I will update this in a separate PR.

@MakisH MakisH merged commit a8f1945 into develop Aug 7, 2023
@MakisH MakisH deleted the v3-connectivity branch August 7, 2023 10:31
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
Status: Done
Development

Successfully merging this pull request may close these issues.

Reimplement connectivity definition
3 participants