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

Fix error in CGNS writing #2178

Merged
merged 10 commits into from
Dec 5, 2023
Merged

Fix error in CGNS writing #2178

merged 10 commits into from
Dec 5, 2023

Conversation

rois1995
Copy link
Contributor

Hello everyone,

I encountered an error in the writing of a CGNS file when no nodes are associated to a given rank. It usually happens when small grids are employed and the simulation is performed on more than one core. have uploaded at the following link the mesh and the config used to reproduce the error.

https://polimi365-my.sharepoint.com/:f:/g/personal/10507725_polimi_it/Ekl88a3uOKhMu4uCLRy3tHIBNNo6_3oMTNiZq97NB6ztDw?e=Hu8pqe

Notice that, if only one heatflux marker is selected to print the results onto, then it does not work when 2 or more cores are used. On the other hand, if both of the heatflux markers are used then it works in parallel.

To solve this issue I just added a check on the number of local points in the function CCGNSFileWriter::WriteField.

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

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

Add the case to our regressions please

@rois1995
Copy link
Contributor Author

rois1995 commented Dec 1, 2023

I think I managed to do it, please let me know if I did something wrong

rois1995 and others added 2 commits December 4, 2023 15:15
Co-authored-by: Mickael PHILIT <mickey.phy@gmail.com>
TestCases/cgns_writer/config.cfg Outdated Show resolved Hide resolved
TestCases/cgns_writer/config.cfg Outdated Show resolved Hide resolved
@rois1995 rois1995 merged commit 086facf into develop Dec 5, 2023
30 checks passed
@rois1995 rois1995 deleted the feature_FixCGNS branch December 5, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants