Skip to content
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

[WIP] GradVal FIX for Massflow SWP #2272

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions SU2_CFD/src/solvers/CDiscAdjSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ void CDiscAdjSolver::RegisterSolution(CGeometry *geometry, CConfig *config) {
/*--- Boolean true indicates that an input is registered ---*/
direct_solver->GetNodes()->RegisterSolution(true);

direct_solver->RegisterSolutionExtra(true, config);

if (time_n_needed)
direct_solver->GetNodes()->RegisterSolution_time_n();

Expand Down Expand Up @@ -261,6 +259,8 @@ void CDiscAdjSolver::RegisterVariables(CGeometry *geometry, CConfig *config, boo
config->SetIncPressureOut_BC(BPressure);
config->SetIncTemperature_BC(Temperature);

direct_solver->RegisterSolutionExtra(reset, config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the boolean passed to this function means "reset". But I'll assign @TobiKattmann to this one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned long CIncEulerSolver::RegisterSolutionExtra(bool input, const CConfig* config) { if (config->GetKind_Streamwise_Periodic() == ENUM_STREAMWISE_PERIODIC::MASSFLOW) { if (input) AD::RegisterInput(SPvals.Streamwise_Periodic_PressureDrop); else AD::RegisterOutput(SPvalsUpdated.Streamwise_Periodic_PressureDrop); return 1; } return 0; }

Yes, you are right, so we are doing the opposite then. I will investigate a bit more.


}

/*--- Register incompressible radiation values as input ---*/
Expand Down Expand Up @@ -299,7 +299,6 @@ void CDiscAdjSolver::RegisterOutput(CGeometry *geometry, CConfig *config) {

direct_solver->GetNodes()->RegisterSolution(false);

direct_solver->RegisterSolutionExtra(false, config);
}

void CDiscAdjSolver::ExtractAdjoint_Solution(CGeometry *geometry, CConfig *config, bool CrossTerm) {
Expand Down
Loading