Skip to content

Commit 4d8def0

Browse files
committed
discrete adjoint fix for heat with mesh deformation
1 parent 51fbc78 commit 4d8def0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,10 @@ void CDiscAdjMultizoneDriver::ComputeAdjoints(unsigned short iZone, bool eval_tr
864864
AD::ComputeAdjoint(enter_izone, leave_izone);
865865

866866
/*--- Compute adjoints of transfer and mesh deformation routines, only stricktly needed
867-
* on the last inner iteration, so if for this zone this section is expensive
868-
* (due to mesh deformation) we delay its evaluation. ---*/
867+
* on the last inner iteration. Structural problems have some minor issue and we
868+
* need to evaluate this section on every iteration. ---*/
869869

870-
if (eval_transfer || !Has_Deformation(iZone))
870+
if (eval_transfer || config_container[iZone]->GetStructuralProblem())
871871
AD::ComputeAdjoint(TRANSFER, OBJECTIVE_FUNCTION);
872872

873873
/*--- Adjoints of dependencies, needed if derivatives of variables
@@ -915,7 +915,7 @@ void CDiscAdjMultizoneDriver::HandleDataTransfer() {
915915
/*--- Transfer from all the remaining zones ---*/
916916
for (unsigned short jZone = 0; jZone < nZone; jZone++){
917917
/*--- The target zone is iZone ---*/
918-
if (jZone != iZone && interface_container[iZone][jZone] != nullptr) {
918+
if (jZone != iZone && interface_container[jZone][iZone] != nullptr) {
919919
DeformMesh = DeformMesh || Transfer_Data(jZone, iZone);
920920
}
921921
}

0 commit comments

Comments
 (0)