本文整理汇总了C++中COutput::SetConvHistory_Body方法的典型用法代码示例。如果您正苦于以下问题:C++ COutput::SetConvHistory_Body方法的具体用法?C++ COutput::SetConvHistory_Body怎么用?C++ COutput::SetConvHistory_Body使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COutput
的用法示例。
在下文中一共展示了COutput::SetConvHistory_Body方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
geometry_container, solver_container, numerics_container,
config_container, surface_movement, grid_movement, FFDBox,
interpolator_container, transfer_container);
/*--- Synchronization point after a single solver iteration. Compute the
wall clock time required. ---*/
#ifndef HAVE_MPI
StopTime = su2double(clock())/su2double(CLOCKS_PER_SEC);
#else
StopTime = MPI_Wtime();
#endif
UsedTime = (StopTime - StartTime);
/*--- For specific applications, evaluate and plot the equivalent area. ---*/
if (config_container[ZONE_0]->GetEquivArea() == YES) {
output->SetEquivalentArea(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
}
/*--- Check if there is any change in the runtime parameters ---*/
CConfig *runtime = NULL;
strcpy(runtime_file_name, "runtime.dat");
runtime = new CConfig(runtime_file_name, config_container[ZONE_0]);
runtime->SetExtIter(ExtIter);
/*--- Update the convergence history file (serial and parallel computations). ---*/
if (!fsi){
output->SetConvHistory_Body(&ConvHist_file, geometry_container, solver_container,
config_container, integration_container, false, UsedTime, ZONE_0);
}
/*--- Evaluate the new CFL number (adaptive). ---*/
if (config_container[ZONE_0]->GetCFL_Adapt() == YES) {
output->SetCFL_Number(solver_container, config_container, ZONE_0);
}
/*--- Check whether the current simulation has reached the specified
convergence criteria, and set StopCalc to true, if so. ---*/
switch (config_container[ZONE_0]->GetKind_Solver()) {
case EULER: case NAVIER_STOKES: case RANS:
StopCalc = integration_container[ZONE_0][FLOW_SOL]->GetConvergence(); break;
case WAVE_EQUATION:
StopCalc = integration_container[ZONE_0][WAVE_SOL]->GetConvergence(); break;
case HEAT_EQUATION:
StopCalc = integration_container[ZONE_0][HEAT_SOL]->GetConvergence(); break;
case FEM_ELASTICITY:
StopCalc = integration_container[ZONE_0][FEA_SOL]->GetConvergence(); break;
case ADJ_EULER: case ADJ_NAVIER_STOKES: case ADJ_RANS:
case DISC_ADJ_EULER: case DISC_ADJ_NAVIER_STOKES: case DISC_ADJ_RANS:
StopCalc = integration_container[ZONE_0][ADJFLOW_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. ---*/
示例2: main
//.........这里部分代码省略.........
AdjTNE2Iteration(output, integration_container, geometry_container,
solver_container, numerics_container, config_container,
surface_movement, grid_movement, FFDBox);
break;
}
/*--- Synchronization point after a single solver iteration. Compute the
wall clock time required. ---*/
#ifndef HAVE_MPI
StopTime = double(clock())/double(CLOCKS_PER_SEC);
#else
StopTime = MPI_Wtime();
#endif
UsedTime = (StopTime - StartTime);
/*--- For specific applications, evaluate and plot the equivalent area. ---*/
if (config_container[ZONE_0]->GetEquivArea() == YES) {
output->SetEquivalentArea(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
}
/*--- Check if there is any change in the runtime parameters ---*/
CConfig *runtime = NULL;
strcpy(runtime_file_name, "runtime.dat");
runtime = new CConfig(runtime_file_name, config_container[ZONE_0]);
/*--- Update the convergence history file (serial and parallel computations). ---*/
output->SetConvHistory_Body(&ConvHist_file, geometry_container, solver_container,
config_container, integration_container, false, UsedTime, ZONE_0);
/*--- Evaluate the new CFL number (adaptive). ---*/
if (config_container[ZONE_0]->GetCFL_Adapt() == YES) {
output->SetCFL_Number(solver_container, config_container, ZONE_0);
}
/*--- Check whether the current simulation has reached the specified
convergence criteria, and set StopCalc to true, if so. ---*/
switch (config_container[ZONE_0]->GetKind_Solver()) {
case EULER: case NAVIER_STOKES: case RANS:
StopCalc = integration_container[ZONE_0][FLOW_SOL]->GetConvergence(); break;
case TNE2_EULER: case TNE2_NAVIER_STOKES:
StopCalc = integration_container[ZONE_0][TNE2_SOL]->GetConvergence(); break;
case WAVE_EQUATION:
StopCalc = integration_container[ZONE_0][WAVE_SOL]->GetConvergence(); break;
case HEAT_EQUATION:
StopCalc = integration_container[ZONE_0][HEAT_SOL]->GetConvergence(); break;
case LINEAR_ELASTICITY:
StopCalc = integration_container[ZONE_0][FEA_SOL]->GetConvergence(); break;
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. ---*/