-
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
Fix adjoint MUSCL species bug #1550
Conversation
…lence boundary conditions: limiting the implementation of uniform inlet bc to the actual inlets
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 @bigfooted for enum class-ing the limiters 💐
I also dont know how and why this fixes the problem you saw but I would also suspect that this doesnt solve the root-cause. So valgrinding a DA case with species limiters would be nice. But in CConfig.cpp::3454 I would certainly add KindSLopeLimit_Species=NONE if !MUSCL_Species. On that note: Did your case had MUSCL_SPECIES with limiters on or off?
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com>
…into feature_enum_limiter
the valgrind message has been solved by the most recent commit |
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
@pcarruscag When running SU2_CFD_AD, the solver is DISC_ADJ_INC_RANS, and a number of initializations are skipped when we do not include this check. Most notably setting kind_limiter, which then leads to the 'conditional depends on uninitialized value' message from valgrind. |
Proposed Changes
change limiter to enum class.
Note: For some reason this fixes a problem for the species transport, where the discrete adjoint solver would stop in computelimiters.hpp with the message "unknown limiter type". This only happens when a computation is run over more than one node (more than one core is OK though). This is because in CSolver::SetSolution_Limiter, GetKind_SlopeLimit() does not return a valid value for an existing slope limiter. Kind_SlopeLimit is set in CConfig::SetKind_ConvNumScheme, called in CConfig::SetGlobalParam, but this looks OK to me.
I did just notice that in CConfig:: line 3454 we check for MUSCL_Flow, MUSCL_Turb and MUSCL_AdjFlow and MUSCL_AdjTurb, but not for MUSCL_Species or MUSCL_Adj_Species(does not even exist). It looks like there is still something missing here.
I do not know why the error "unknown limiter type" occured and why it is now fixed by only changing to enum class.
Related Work
continuing effort to change all enums to enum class
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.