@@ -39,10 +39,6 @@ CDiscAdjMultizoneDriver::CDiscAdjMultizoneDriver(char* confFile,
3939
4040 : CMultizoneDriver(confFile, val_nZone, MPICommunicator) {
4141
42- retape = !config_container[ZONE_0]->GetFull_Tape ();
43-
44- RecordingState = NONE;
45-
4642 direct_nInst.resize (nZone,1 );
4743 nInnerIter.resize (nZone);
4844
@@ -236,7 +232,7 @@ void CDiscAdjMultizoneDriver::Run() {
236232 /* --- If we want to set up zone-specific tapes (retape), we do not need to record
237233 * here. Otherwise, the whole tape of a coupled run will be created. ---*/
238234
239- if (!retape && ( RecordingState != SOLUTION_VARIABLES) ) {
235+ if (RecordingState != SOLUTION_VARIABLES) {
240236 SetRecording (NONE, Kind_Tape::FULL_TAPE, ZONE_0);
241237 SetRecording (SOLUTION_VARIABLES, Kind_Tape::FULL_TAPE, ZONE_0);
242238 }
@@ -247,11 +243,6 @@ void CDiscAdjMultizoneDriver::Run() {
247243
248244 config_container[iZone]->Set_StartTime (SU2_MPI::Wtime ());
249245
250- if (retape) {
251- SetRecording (NONE, Kind_Tape::FULL_TAPE, ZONE_0);
252- SetRecording (SOLUTION_VARIABLES, Kind_Tape::ZONE_SPECIFIC_TAPE, iZone);
253- }
254-
255246 /* --- Start inner iterations from where we stopped in previous outer iteration. ---*/
256247
257248 Set_Solution_To_BGSSolution_k (iZone);
@@ -502,7 +493,6 @@ void CDiscAdjMultizoneDriver::SetRecording(unsigned short kind_recording, Kind_T
502493 AD::Push_TapePosition (); // / REGISTERED
503494
504495 for (iZone = 0 ; iZone < nZone; iZone++) {
505-
506496 iteration_container[iZone][INST_0]->SetDependencies (solver_container, geometry_container, numerics_container,
507497 config_container, iZone, INST_0, kind_recording);
508498 }
@@ -515,10 +505,15 @@ void CDiscAdjMultizoneDriver::SetRecording(unsigned short kind_recording, Kind_T
515505
516506 if ((tape_type == Kind_Tape::OBJECTIVE_FUNCTION_TAPE) || (kind_recording == MESH_COORDS)) {
517507 HandleDataTransfer ();
508+ for (iZone = 0 ; iZone < nZone; iZone++) {
509+ if (Has_Deformation (iZone)) {
510+ iteration_container[iZone][INST_0]->SetDependencies (solver_container, geometry_container, numerics_container,
511+ config_container, iZone, INST_0, kind_recording);
512+ }
513+ }
514+ SetObjFunction (kind_recording);
518515 }
519516
520- SetObjFunction (kind_recording);
521-
522517 AD::Push_TapePosition (); // / OBJECTIVE_FUNCTION
523518
524519 if (tape_type != Kind_Tape::OBJECTIVE_FUNCTION_TAPE) {
@@ -537,18 +532,10 @@ void CDiscAdjMultizoneDriver::SetRecording(unsigned short kind_recording, Kind_T
537532
538533 AD::Push_TapePosition (); // / enter_zone
539534
540- if (tape_type == Kind_Tape::ZONE_SPECIFIC_TAPE) {
541- if (iZone == record_zone) {
542- DirectIteration (iZone, kind_recording);
543- }
544- }
545- else {
546- DirectIteration (iZone, kind_recording);
547- }
535+ DirectIteration (iZone, kind_recording);
548536
549537 iteration_container[iZone][INST_0]->RegisterOutput (solver_container, geometry_container,
550538 config_container, output_container[iZone], iZone, INST_0);
551-
552539 AD::Push_TapePosition (); // / leave_zone
553540 }
554541 }
@@ -788,7 +775,6 @@ void CDiscAdjMultizoneDriver::SetObjFunction(unsigned short kind_recording) {
788775 ObjFunc += solvers[FEA_SOL]->GetTotal_OFRefGeom ()*Weight_ObjFunc;
789776 break ;
790777 case TOPOL_COMPLIANCE:
791- static_cast <CFEASolver*>(solvers[FEA_SOL])->Integrate_FSI_Loads (geometry, config);
792778 solvers[FEA_SOL]->Compute_OFCompliance (geometry, config);
793779 ObjFunc += solvers[FEA_SOL]->GetTotal_OFCompliance ()*Weight_ObjFunc;
794780 break ;
0 commit comments