Skip to content

Conversation

@ErcanUmut60
Copy link

@ErcanUmut60 ErcanUmut60 commented Oct 10, 2025

Defining Custom Objective Function does not work with shape_optimization.py. historyMap.py is updated in order to fix the problem.

  • 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.

@ErcanUmut60 ErcanUmut60 changed the base branch from master to develop October 10, 2025 10:23
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.

This file is generated via a script, we need to fix or update that script, otherwise the next time someone uses it it will break the custom objective again.

@ErcanUmut60
Copy link
Author

This file is generated via a script, we need to fix or update that script, otherwise the next time someone uses it it will break the custom objective again.

Okay I will look into it but do you mean it is generated during build/install? When I look into source code the file is inside /SU2_PY/SU2/io.

@bigfooted
Copy link
Contributor

bigfooted commented Oct 10, 2025

check SU2_PY/updateHistoryMap.py

@ErcanUmut60
Copy link
Author

I did some changes in the python file so it can read custom obj. func. from the CFlowOutput.cpp.
I am not sure I did the right changes but it works this way. If I didn't, I can try to fix the remaining with some guidance.
Otherwise, I don't mind if you take it from here.

removing json from import.
@bigfooted
Copy link
Contributor

If you run the python script updatehistorymap.py, does it generate the correct, updated, historymap?

@ErcanUmut60
Copy link
Author

If you run the python script updatehistorymap.py, does it generate the correct, updated, historymap?

Yes, I tried with Tutorials. There is no problem.

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.

3 participants