-
Notifications
You must be signed in to change notification settings - Fork 849
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
Interpolate restart file when it does not match the mesh #1277
Conversation
SU2_CFD/src/solvers/CSolver.cpp
Outdated
/* Challenges: | ||
* - Do not use too much memory by gathering the restart data in all ranks. | ||
* - Do not repeat too many computations in all ranks. | ||
* Solution?: | ||
* - Build a local ADT for the domain points (not the restart points). | ||
* - Find the closest target point for each donor, which does not match all targets. | ||
* - "Diffuse" the data to neighbor points. | ||
* Complexity is approx. Nlt + (Nlt + Nd) log(Nlt) where Nlt is the LOCAL number | ||
* of target points, Nd the TOTAL number of donors. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method
SU2_CFD/src/solvers/CSolver.cpp
Outdated
@@ -2882,16 +2884,18 @@ void CSolver::Read_SU2_Restart_ASCII(CGeometry *geometry, const CConfig *config, | |||
} | |||
} | |||
|
|||
if (iPoint_Global != geometry->GetGlobal_nPointDomain()) | |||
SU2_MPI::Error("The solution file does not match the mesh.",CURRENT_FUNCTION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not work for ASCII
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will you support it for this PR, or this is for later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit messy to do it, besides, if someone is restarting from ASCII the problem is probably not very large.
(every mpi rank needs to read the entire ASCII file because lines are defined by the \n character)
This is a great addition, I am now doing this outside of SU2 with some python code, but having this native in SU2 is really great! I haven't looked at the details yet, but I guess the assumption is that the geometry stay the same, we only have a finer mesh? Also, the 'restarts are read twice for RANS' is that a general issue when having additional solvers (like heat, scalar, nemo)? |
There is no assumption, but if the geometry is very different you'll end up with free-stream values in the boundary layer and vice versa. |
|
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 💐 this is surely a neat feature, especially for grid-independence studies.
Do you plan to add/ adapt a Testcase?
This pull request fixes 1 alert when merging a366672 into 3cc0208 - view on LGTM.com fixed alerts:
|
…ode/SU2 into feature_interpolate_restart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% % | ||
% SU2 configuration file % | ||
% Case description: Test interp. restart, and auto time-step for dual-time % |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This pull request fixes 1 alert when merging 06c818a into 3cc0208 - view on LGTM.com fixed alerts:
|
Method described below.
No config options needed.
Takes about a minute to interpolate an 8M node mesh to a 70M mesh on 1000 cores.
May or may not add OpenMP to this which would improve scalability.
Restarts are read twice for RANS problems, which is not great for this type of feature...