-
Notifications
You must be signed in to change notification settings - Fork 920
Fix objective functions (for shape_optimization.py) #1167
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
Conversation
| /* DESCRIPTION: Compute buffet sensor */ | ||
| addBoolOption("BUFFET_MONITORING", Buffet_Monitoring, false); |
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.
I think this was cheap enough to compute by default.
| /// DESCRIPTION: Temperature | ||
| AddHistoryOutput("TEMPERATURE", "Temp", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Total avg. temperature on all surfaces set with MARKER_MONITORING.", HistoryFieldType::COEFFICIENT); |
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 "temperature" output was removed from everywhere except the heat and incompressible solvers, because it is a right mess. i.e. not consistent for the different solvers because for ones it depends on marker_analyse for others on marker_monitoring... Also the name TOTAL_AVG_TEMPERATURE could as well have been ?_?_TEMPERATURE, just as descriptive.
| void CDiscAdjSolver::RegisterObj_Func(CConfig *config) { | ||
|
|
||
| /*--- Here we can add new (scalar) objective functions ---*/ | ||
| if (config->GetnObj()==1) { | ||
| switch (config->GetKind_ObjFunc()) { |
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 does not seem to do anything anymore.
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 a lot for this cleanup 💐
From now on I guess the history map should never be touched by hand and only via updateHistoryMap, am I right? If yes, would it be a thing to have historyMap.py removed from the repo and automatically call updateHistoryMap.py during installation process (i.e. historyMap exists only in the build folder)?
(And of course sorry for the late comments)
| } | ||
| } | ||
| } else { | ||
| } else if (false) { |
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.
I guess this is the section you refer to in #1171
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.
Yep
| */ | ||
| class CAvgGrad_NEMO : public CNEMONumerics { | ||
| private: | ||
| unsigned short iDim, iVar; /*!< \brief Iterators in dimension an variable. */ |
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.
Did you get those as compiler warnings for unused variables? If yes, did you just use gcc with -Wall -Wextra or did you use any specific tool?
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.
Using clang with --warnlevel=2
|
It could be a thing to run it on installation, but at the same time it is also not a big deal to run it ourselves. |
Proposed Changes
I tried to do something about the OF's that are not working with the python scripts.
If I got it right, the OF string needs to match the name used for history/screen output, at least to allow the automatically generated history map to be used.
Related Work
#1075
PR Checklist