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


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

本文整理汇总了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. ---*/
		
开发者ID:sravya91,项目名称:SU2_HBDiscAdj,代码行数:66,代码来源:SU2_CFD.cpp

示例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. ---*/
    
开发者ID:Hypersonichen,项目名称:SU2,代码行数:66,代码来源:SU2_CFD.cpp


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