Multizone adjoints for turbomachinery - #2446
Open
joshkellyjak wants to merge 122 commits into
Open
Conversation
pcarruscag
reviewed
Feb 20, 2025
6 tasks
…ding of objective function calculation
6 tasks
added 2 commits
March 21, 2025 13:06
… to run in quasi-MZ approach. (NEEDS CLEANING)
… MZ turbo testcase
…m/su2code/SU2 into feature_mz_turbomachinery_adjoint
…m/su2code/SU2 into feature_mz_turbomachinery_adjoint
It is anticipated the these changes arise due to the changes in input registration during the tape recording.
pcarruscag
reviewed
Jul 30, 2026
| else { | ||
| VolumeOutputFrequencies[iVolumeFreq] = Time_Domain ? 1 : 250; | ||
| } | ||
| VolumeOutputFrequencies[iVolumeFreq] = Time_Domain ? 1 : nOuterIter; |
Comment on lines
+83
to
+84
| //std::shared_ptr<CTurbomachineryStagePerformance> TurbomachineryStagePerformance; /*!< \brief turbo stage performance calculator. */ | ||
|
|
Member
There was a problem hiding this comment.
Suggested change
| //std::shared_ptr<CTurbomachineryStagePerformance> TurbomachineryStagePerformance; /*!< \brief turbo stage performance calculator. */ |
Comment on lines
+154
to
+156
| inline virtual void RecoverTarget_Span_Endwall(const su2activevector &bcastVariable, unsigned long idx) { } | ||
|
|
||
| inline virtual void RecoverTarget_Span(const su2activevector &bcastVariable, unsigned long idx, su2double donorCoeff) { } |
Member
There was a problem hiding this comment.
Rename the new function without the mishmash of underscores please.
Plus documentation and formatting, please.
Comment on lines
+151
to
+152
| AD::SetPreaccOut(Jacobian_i, nVar, nVar); | ||
| AD::SetPreaccOut(Jacobian_j, nVar, nVar); |
| inline void SetZeroValues() { | ||
| Density = Pressure = Entropy = Enthalpy = Temperature = TotalTemperature = TotalPressure = TotalEnthalpy = 0.0; | ||
| AbsFlowAngle = FlowAngle = MassFlow = Rothalpy = TotalRelPressure = 0.0; | ||
| }; |
Comment on lines
+190
to
+201
| /*! | ||
| * \brief Allocates the final pointer of MixingState depending on how many donor spans donate to it. That number is stored in MixingStateSpans[val_marker][val_Span]. | ||
| * \param[in] val_marker - marker index | ||
| * \param[in] val_span - vertex index | ||
| */ | ||
| inline void SetMixingStateStructure(unsigned short val_marker, unsigned long val_span) final { | ||
| assert(val_marker < MixingState.size()); | ||
| assert(val_span < MixingState[val_marker].size()); | ||
| if( MixingState[val_marker][val_span] != nullptr ) delete [] MixingState[val_marker][val_span]; | ||
|
|
||
| MixingState[val_marker][val_span] = new su2double[8]; | ||
| } |
Member
There was a problem hiding this comment.
I don't wanna know what's going on here, but unfortunately I have to, 🤣
Seems like inner dimension doesn't have to be a pointer at all.
Also, the documentation for both the variable and this function don't match what is being perpetrated here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This is a cleaned up PR of the fixes needed for multizone adjoints for turbomachinery from the previous PR of @oleburghardt and I's work.
This hopefully is useable, so if you would like to test and report please feel free to contact me on Slack.
TODO:
Related Work
Now closed PR #2317
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.
pre-commit run --allto format old commits.