@@ -244,18 +244,24 @@ void CDiscAdjSinglezoneDriver::SetRecording(RECORDING kind_recording){
244244
245245 iteration->SetRecording (solver_container, geometry_container, config_container, ZONE_0, INST_0, kind_recording);
246246
247+ if (rank == MASTER_NODE) {
248+ cout << " \n -------------------------------------------------------------------------\n " ;
249+ switch (kind_recording) {
250+ case RECORDING::CLEAR_INDICES: cout << " Clearing the computational graph." << endl; break ;
251+ case RECORDING::MESH_COORDS: cout << " Storing computational graph wrt MESH COORDINATES." << endl; break ;
252+ case RECORDING::SOLUTION_VARIABLES:
253+ cout << " Direct iteration to store the primal computational graph." << endl;
254+ cout << " Computing residuals to check the convergence of the direct problem." << endl; break ;
255+ default : break ;
256+ }
257+ }
258+
247259 /* ---Enable recording and register input of the iteration --- */
248260
249261 if (kind_recording != RECORDING::CLEAR_INDICES){
250262
251263 AD::StartRecording ();
252264
253- if (rank == MASTER_NODE && kind_recording == MainVariables) {
254- cout << endl << " -------------------------------------------------------------------------" << endl;
255- cout << " Direct iteration to store the primal computational graph." << endl;
256- cout << " Compute residuals to check the convergence of the direct problem." << endl;
257- }
258-
259265 iteration->RegisterInput (solver_container, geometry_container, config_container, ZONE_0, INST_0, kind_recording);
260266 }
261267
@@ -437,75 +443,6 @@ void CDiscAdjSinglezoneDriver::DirectRun(RECORDING kind_recording){
437443
438444}
439445
440- void CDiscAdjSinglezoneDriver::Print_DirectResidual (RECORDING kind_recording){
441-
442- /* --- Print the residuals of the direct iteration that we just recorded ---*/
443- /* --- This routine should be moved to the output, once the new structure is in place ---*/
444- if ((rank == MASTER_NODE) && (kind_recording == MainVariables)){
445-
446- switch (config->GetKind_Solver ()) {
447-
448- case DISC_ADJ_EULER: case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_RANS:
449- case DISC_ADJ_INC_EULER: case DISC_ADJ_INC_NAVIER_STOKES: case DISC_ADJ_INC_RANS:
450- case DISC_ADJ_FEM_EULER : case DISC_ADJ_FEM_NS : case DISC_ADJ_FEM_RANS :
451- cout << " log10[U(0)]: " << log10 (solver[FLOW_SOL]->GetRes_RMS (0 ))
452- << " , log10[U(1)]: " << log10 (solver[FLOW_SOL]->GetRes_RMS (1 ))
453- << " , log10[U(2)]: " << log10 (solver[FLOW_SOL]->GetRes_RMS (2 )) << " ." << endl;
454- cout << " log10[U(3)]: " << log10 (solver[FLOW_SOL]->GetRes_RMS (3 ));
455- if (geometry->GetnDim () == 3 ) cout << " , log10[U(4)]: " << log10 (solver[FLOW_SOL]->GetRes_RMS (4 ));
456- cout << " ." << endl;
457- if ( config->GetKind_Turb_Model () != NONE && !config->GetFrozen_Visc_Disc ()) {
458- cout << " log10[Turb(0)]: " << log10 (solver[TURB_SOL]->GetRes_RMS (0 ));
459- if (solver[TURB_SOL]->GetnVar () > 1 ) cout << " , log10[Turb(1)]: " << log10 (solver[TURB_SOL]->GetRes_RMS (1 ));
460- cout << " ." << endl;
461- }
462- if (config->GetWeakly_Coupled_Heat ()){
463- cout << " log10[Heat(0)]: " << log10 (solver[HEAT_SOL]->GetRes_RMS (0 )) << " ." << endl;
464- }
465- if ( config->AddRadiation ()) {
466- cout <<" log10[E(rad)]: " << log10 (solver[RAD_SOL]->GetRes_RMS (0 )) << endl;
467- }
468- break ;
469-
470- case DISC_ADJ_FEM:
471-
472- if (config->GetGeometricConditions () == STRUCT_DEFORMATION::LARGE){
473- cout << " UTOL-A: " << log10 (solver[FEA_SOL]->GetRes_FEM (0 ))
474- << " , RTOL-A: " << log10 (solver[FEA_SOL]->GetRes_FEM (1 ))
475- << " , ETOL-A: " << log10 (solver[FEA_SOL]->GetRes_FEM (2 )) << " ." << endl;
476- }
477- else {
478- if (geometry->GetnDim () == 2 ){
479- cout << " log10[RMS Ux]: " << log10 (solver[FEA_SOL]->GetRes_RMS (0 ))
480- << " , log10[RMS Uy]: " << log10 (solver[FEA_SOL]->GetRes_RMS (1 )) << " ." << endl;
481- }
482- else {
483- cout << " log10[RMS Ux]: " << log10 (solver[FEA_SOL]->GetRes_RMS (0 ))
484- << " , log10[RMS Uy]: " << log10 (solver[FEA_SOL]->GetRes_RMS (1 ))
485- << " , log10[RMS Uz]: " << log10 (solver[FEA_SOL]->GetRes_RMS (2 ))<< " ." << endl;
486- }
487- }
488-
489- break ;
490-
491- case DISC_ADJ_HEAT:
492- cout << " log10[Cons(0)]: " << log10 (solver[HEAT_SOL]->GetRes_RMS (0 )) << " ." << endl;
493- break ;
494-
495- }
496-
497- cout << " -------------------------------------------------------------------------" << endl << endl;
498- }
499- else if ((rank == MASTER_NODE) && (kind_recording == SecondaryVariables) && (SecondaryVariables != RECORDING::CLEAR_INDICES)){
500- cout << endl << " Recording the computational graph with respect to the " ;
501- switch (SecondaryVariables){
502- case RECORDING::MESH_COORDS: cout << " mesh coordinates." << endl; break ;
503- default : cout << " secondary variables." << endl; break ;
504- }
505- }
506-
507- }
508-
509446void CDiscAdjSinglezoneDriver::MainRecording (){
510447
511448 /* --- SetRecording stores the computational graph on one iteration of the direct problem. Calling it with NONE
0 commit comments