本文整理汇总了C++中COutput::SetHeat_InverseDesign方法的典型用法代码示例。如果您正苦于以下问题:C++ COutput::SetHeat_InverseDesign方法的具体用法?C++ COutput::SetHeat_InverseDesign怎么用?C++ COutput::SetHeat_InverseDesign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COutput
的用法示例。
在下文中一共展示了COutput::SetHeat_InverseDesign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
StartTime = su2double(clock())/su2double(CLOCKS_PER_SEC);
#else
StartTime = MPI_Wtime();
#endif
/*--- This is temporal and just to check. It will have to be added to the regular history file ---*/
ofstream historyFile_FSI;
bool writeHistFSI = config_container[ZONE_0]->GetWrite_Conv_FSI();
if (writeHistFSI && (rank == MASTER_NODE)){
char cstrFSI[200];
string filenameHistFSI = config_container[ZONE_0]->GetConv_FileName_FSI();
strcpy (cstrFSI, filenameHistFSI.data());
historyFile_FSI.open (cstrFSI);
historyFile_FSI << "Time,Iteration,Aitken,URes,logResidual,orderMagnResidual" << endl;
historyFile_FSI.close();
}
while (ExtIter < config_container[ZONE_0]->GetnExtIter()) {
/*--- Set the value of the external iteration. ---*/
for (iZone = 0; iZone < nZone; iZone++) config_container[iZone]->SetExtIter(ExtIter);
/*--- Read the target pressure ---*/
if (config_container[ZONE_0]->GetInvDesign_Cp() == YES)
output->SetCp_InverseDesign(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
/*--- Read the target heat flux ---*/
if (config_container[ZONE_0]->GetInvDesign_HeatFlux() == YES)
output->SetHeat_InverseDesign(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
/*--- Perform a single iteration of the chosen PDE solver. ---*/
/*--- Run a single iteration of the problem using the driver class. ---*/
driver->Run(iteration_container, output, integration_container,
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 ---*/
示例2: main
//.........这里部分代码省略.........
if (rank == MASTER_NODE)
cout << endl <<"------------------------------ Begin Solver -----------------------------" << endl;
/*--- Set up a timer for performance benchmarking (preprocessing time is not included) ---*/
#ifndef HAVE_MPI
StartTime = double(clock())/double(CLOCKS_PER_SEC);
#else
MPI_Barrier(MPI_COMM_WORLD);
StartTime = MPI_Wtime();
#endif
while (ExtIter < config_container[ZONE_0]->GetnExtIter()) {
/*--- Set a timer for each iteration. Store the current iteration and
update the value of the CFL number (if there is CFL ramping specified)
in the config class. ---*/
for (iZone = 0; iZone < nZone; iZone++) {
config_container[iZone]->SetExtIter(ExtIter);
config_container[iZone]->UpdateCFL(ExtIter);
}
/*--- Read the target pressure ---*/
if (config_container[ZONE_0]->GetInvDesign_Cp() == YES)
output->SetCp_InverseDesign(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
/*--- Read the target heat flux ---*/
if (config_container[ZONE_0]->GetInvDesign_HeatFlux() == YES)
output->SetHeat_InverseDesign(solver_container[ZONE_0][MESH_0][FLOW_SOL],
geometry_container[ZONE_0][MESH_0], config_container[ZONE_0], ExtIter);
/*--- Perform a single iteration of the chosen PDE solver. ---*/
switch (config_container[ZONE_0]->GetKind_Solver()) {
case EULER: case NAVIER_STOKES: case RANS:
MeanFlowIteration(output, integration_container, geometry_container,
solver_container, numerics_container, config_container,
surface_movement, grid_movement, FFDBox);
break;
case TNE2_EULER: case TNE2_NAVIER_STOKES:
TNE2Iteration(output, integration_container,
geometry_container, solver_container,
numerics_container, config_container,
surface_movement, grid_movement, FFDBox);
break;
case FLUID_STRUCTURE_EULER: case FLUID_STRUCTURE_NAVIER_STOKES:
FluidStructureIteration(output, integration_container, geometry_container,
solver_container, numerics_container, config_container,
surface_movement, grid_movement, FFDBox);
break;
case WAVE_EQUATION:
WaveIteration(output, integration_container, geometry_container,
solver_container, numerics_container, config_container,
surface_movement, grid_movement, FFDBox);
break;
case HEAT_EQUATION:
HeatIteration(output, integration_container, geometry_container,