当前位置: 首页>>代码示例>>C++>>正文


C++ COutput::SetResult_Files方法代码示例

本文整理汇总了C++中COutput::SetResult_Files方法的典型用法代码示例。如果您正苦于以下问题:C++ COutput::SetResult_Files方法的具体用法?C++ COutput::SetResult_Files怎么用?C++ COutput::SetResult_Files使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在COutput的用法示例。


在下文中一共展示了COutput::SetResult_Files方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........
      case ADJ_EULER: case ADJ_NAVIER_STOKES: case ADJ_RANS:
        StopCalc = integration_container[ZONE_0][ADJFLOW_SOL]->GetConvergence(); break;
      case ADJ_TNE2_EULER: case ADJ_TNE2_NAVIER_STOKES:
        StopCalc = integration_container[ZONE_0][ADJTNE2_SOL]->GetConvergence(); break;
    }
    
    /*--- Solution output. Determine whether a solution needs to be written
     after the current iteration, and if so, execute the output file writing
     routines. ---*/
    
    if ((ExtIter+1 == config_container[ZONE_0]->GetnExtIter()) ||
        ((ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq() == 0) && (ExtIter != 0) &&
         !((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_1ST) ||
           (config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND))) ||
        (StopCalc) ||
        (((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_1ST) ||
          (config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND)) &&
         ((ExtIter == 0) || (ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0)))) {
          
          /*--- Low-fidelity simulations (using a coarser multigrid level
           approximation to the solution) require an interpolation back to the
           finest grid. ---*/
          
          if (config_container[ZONE_0]->GetLowFidelitySim()) {
            integration_container[ZONE_0][FLOW_SOL]->SetProlongated_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0], solver_container[ZONE_0][MESH_1], geometry_container[ZONE_0][MESH_0], geometry_container[ZONE_0][MESH_1], config_container[ZONE_0]);
            integration_container[ZONE_0][FLOW_SOL]->Smooth_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0], geometry_container[ZONE_0][MESH_0], 3, 1.25, config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Set_MPI_Solution(geometry_container[ZONE_0][MESH_0], config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Preprocessing(geometry_container[ZONE_0][MESH_0], solver_container[ZONE_0][MESH_0], config_container[ZONE_0], MESH_0, 0, RUNTIME_FLOW_SYS);
          }
          
          /*--- Execute the routine for writing restart, volume solution,
           surface solution, and surface comma-separated value files. ---*/
          
          output->SetResult_Files(solver_container, geometry_container, config_container, ExtIter, nZone);
          
        }
    
    /*--- If the convergence criteria has been met, terminate the simulation. ---*/
    
    if (StopCalc) break;
    
    ExtIter++;
    
  }
  
  /*--- Close the convergence history file. ---*/
  
  if (rank == MASTER_NODE) {
    ConvHist_file.close();
    cout << endl <<"History file, closed." << endl;
  }
  /*
  if (config->GetKind_Solver() == RANS){
    if (config->GetKind_Turb_Model() == ML){
      // Tell the ML code to stop running
      string mlWriteFilename = config->GetML_Turb_Model_Write();
      ofstream mlWrite;
      mlWrite.open(mlWriteFilename.c_str());
      mlWrite << int(-1) << flush;
      mlWrite.close();
    }
  }
   */
  
  /*--- Solver class deallocation ---*/
  //  for (iZone = 0; iZone < nZone; iZone++) {
开发者ID:jilott,项目名称:SU2,代码行数:67,代码来源:SU2_CFD.cpp

示例2: main


//.........这里部分代码省略.........
				
				((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND) && (!fsi) &&
				 ((ExtIter == 0) || ((ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0) ||
														 ((ExtIter-1) % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0))))
				
				||
				
				((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND) && (fsi) &&
				 ((ExtIter == 0) || ((ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0))))

				||

				(((config_container[ZONE_0]->GetDynamic_Analysis() == DYNAMIC) &&
						 ((ExtIter == 0) || (ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0))))){

					
          /*--- Low-fidelity simulations (using a coarser multigrid level
           approximation to the solution) require an interpolation back to the
           finest grid. ---*/
          
          if (config_container[ZONE_0]->GetLowFidelitySim()) {
            integration_container[ZONE_0][FLOW_SOL]->SetProlongated_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0][FLOW_SOL], solver_container[ZONE_0][MESH_1][FLOW_SOL], geometry_container[ZONE_0][MESH_0], geometry_container[ZONE_0][MESH_1], config_container[ZONE_0]);
            integration_container[ZONE_0][FLOW_SOL]->Smooth_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0][FLOW_SOL], geometry_container[ZONE_0][MESH_0], 3, 1.25, config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Set_MPI_Solution(geometry_container[ZONE_0][MESH_0], config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Preprocessing(geometry_container[ZONE_0][MESH_0], solver_container[ZONE_0][MESH_0], config_container[ZONE_0], MESH_0, 0, RUNTIME_FLOW_SYS, true);
          }


          if (rank == MASTER_NODE) cout << endl << "-------------------------- File Output Summary --------------------------";
          
          /*--- Execute the routine for writing restart, volume solution,
           surface solution, and surface comma-separated value files. ---*/
          
          output->SetResult_Files(solver_container, geometry_container, config_container, ExtIter, nZone);
          
          /*--- Output a file with the forces breakdown. ---*/
          
          output->SetForces_Breakdown(geometry_container, solver_container,
                                      config_container, integration_container, ZONE_0);
          
          /*--- Compute the forces at different sections. ---*/
          
          if (config_container[ZONE_0]->GetPlot_Section_Forces()) {
            output->SetForceSections(solver_container[ZONE_0][MESH_0][FLOW_SOL],
                                     geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
          }
          
          if (rank == MASTER_NODE) cout << "-------------------------------------------------------------------------" << endl << endl;
          
        }
    
    /*--- If the convergence criteria has been met, terminate the simulation. ---*/
    
    if (StopCalc) break;
    
    ExtIter++;
    
  }
  
  /*--- Output some information to the console. ---*/
  
  if (rank == MASTER_NODE) {
    
    /*--- Print out the number of non-physical points and reconstructions ---*/
    
    if (config_container[ZONE_0]->GetNonphysical_Points() > 0)
开发者ID:sravya91,项目名称:SU2_HBDiscAdj,代码行数:67,代码来源:SU2_CFD.cpp

示例3: main


//.........这里部分代码省略.........
      case ADJ_TNE2_EULER: case ADJ_TNE2_NAVIER_STOKES:
        StopCalc = integration_container[ZONE_0][ADJTNE2_SOL]->GetConvergence(); break;
    }
    
    /*--- Solution output. Determine whether a solution needs to be written
     after the current iteration, and if so, execute the output file writing
     routines. ---*/
    
    if ((ExtIter+1 >= config_container[ZONE_0]->GetnExtIter()) ||
        ((ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq() == 0) && (ExtIter != 0) &&
         !((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_1ST) ||
           (config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND))) ||
        (StopCalc) ||
        (((config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_1ST) ||
          (config_container[ZONE_0]->GetUnsteady_Simulation() == DT_STEPPING_2ND)) &&
         ((ExtIter == 0) || (ExtIter % config_container[ZONE_0]->GetWrt_Sol_Freq_DualTime() == 0)))) {
          
          /*--- Low-fidelity simulations (using a coarser multigrid level
           approximation to the solution) require an interpolation back to the
           finest grid. ---*/
          
          if (config_container[ZONE_0]->GetLowFidelitySim()) {
            integration_container[ZONE_0][FLOW_SOL]->SetProlongated_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0][FLOW_SOL], solver_container[ZONE_0][MESH_1][FLOW_SOL], geometry_container[ZONE_0][MESH_0], geometry_container[ZONE_0][MESH_1], config_container[ZONE_0]);
            integration_container[ZONE_0][FLOW_SOL]->Smooth_Solution(RUNTIME_FLOW_SYS, solver_container[ZONE_0][MESH_0][FLOW_SOL], geometry_container[ZONE_0][MESH_0], 3, 1.25, config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Set_MPI_Solution(geometry_container[ZONE_0][MESH_0], config_container[ZONE_0]);
            solver_container[ZONE_0][MESH_0][config_container[ZONE_0]->GetContainerPosition(RUNTIME_FLOW_SYS)]->Preprocessing(geometry_container[ZONE_0][MESH_0], solver_container[ZONE_0][MESH_0], config_container[ZONE_0], MESH_0, 0, RUNTIME_FLOW_SYS, false);
          }
          
          if (rank == MASTER_NODE) cout << endl << "-------------------------- File Output Summary --------------------------";
          
          /*--- Execute the routine for writing restart, volume solution,
           surface solution, and surface comma-separated value files. ---*/
          
          output->SetResult_Files(solver_container, geometry_container, config_container, ExtIter, nZone);
          
          /*--- Output a file with the forces breakdown. ---*/
          
          output->SetForces_Breakdown(geometry_container, solver_container,
                                      config_container, integration_container, ZONE_0);
          
          /*--- Compute the forces at different sections. ---*/
          
          if (config_container[ZONE_0]->GetPlot_Section_Forces()) {
            output->SetForceSections(solver_container[ZONE_0][MESH_0][FLOW_SOL],
                                     geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
          }
          
          if (rank == MASTER_NODE) cout << "-------------------------------------------------------------------------" << endl << endl;
          
        }
    
    /*--- If the convergence criteria has been met, terminate the simulation. ---*/
    
    if (StopCalc) break;
    
    ExtIter++;
    
  }
  
  /*--- Output some information to the console. ---*/
  
  if (rank == MASTER_NODE) {
    
    /*--- Print out the number of non-physical points and reconstructions ---*/
    
    if (config_container[ZONE_0]->GetNonphysical_Points() > 0)
开发者ID:Hypersonichen,项目名称:SU2,代码行数:67,代码来源:SU2_CFD.cpp


注:本文中的COutput::SetResult_Files方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。