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


C++ CGeometry::Check_BoundElem_Orientation方法代码示例

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


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

示例1: main

int main(int argc, char *argv[]) {
	
	/*--- Variable definitions ---*/
  
	char file_name[MAX_STRING_SIZE];
  unsigned short nZone = 1;
  
#ifdef HAVE_MPI
	MPI_Init(&argc,&argv);
#endif
	
	/*--- Definition of the config problem ---*/
  
	CConfig *config;
	if (argc == 2) config = new CConfig(argv[1], SU2_MSH, ZONE_0, nZone, 0, VERB_HIGH);
	else { strcpy (file_name, "default.cfg"); config = new CConfig(file_name, SU2_MSH, ZONE_0, nZone, 0, VERB_HIGH); }
	
	/*--- Definition of the Class for the geometry ---*/
  
	CGeometry *geometry; geometry = new CGeometry;
	geometry = new CPhysicalGeometry(config, ZONE_0, nZone);
  
	cout << endl <<"----------------------- Preprocessing computations ----------------------" << endl;
	
	/*--- Compute elements surrounding points, points surrounding points, and elements surronding elements ---*/
  
	cout << "Setting local point and element connectivity." <<endl;
	geometry->SetPoint_Connectivity(); geometry->SetElement_Connectivity();
	
	/*--- Check the orientation before computing geometrical quantities ---*/
  
	cout << "Check numerical grid orientation." <<endl;
	geometry->SetBoundVolume(); geometry->Check_IntElem_Orientation(config); geometry->Check_BoundElem_Orientation(config);
	
	/*--- Create the edge structure ---*/
  
	cout << "Identify faces, edges and vertices." <<endl;
	geometry->SetFaces(); geometry->SetEdges(); geometry->SetVertex(config); geometry->SetCG();
	
	/*--- Create the control volume structures ---*/
  
	cout << "Set control volume structure." << endl;
	geometry->SetControlVolume(config, ALLOCATE); geometry->SetBoundControlVolume(config, ALLOCATE);

	
	if ((config->GetKind_Adaptation() != NONE) && (config->GetKind_Adaptation() != PERIODIC)) {
		
		cout << endl <<"--------------------- Start numerical grid adaptation -------------------" << endl;
		
		/*-- Definition of the Class for grid adaptation ---*/
    
		CGridAdaptation *grid_adaptation;
		grid_adaptation = new CGridAdaptation(geometry, config);
		
		/*--- Read the flow solution and/or the adjoint solution
		 and choose the elements to adapt ---*/
    
		if ((config->GetKind_Adaptation() != FULL)
				&& (config->GetKind_Adaptation() != WAKE) && (config->GetKind_Adaptation() != TWOPHASE)
				&& (config->GetKind_Adaptation() != SMOOTHING) && (config->GetKind_Adaptation() != SUPERSONIC_SHOCK))
			grid_adaptation->GetFlowSolution(geometry, config);
		
		switch (config->GetKind_Adaptation()) {
			case NONE:
				break;
			case SMOOTHING:
				config->SetSmoothNumGrid(true);
				grid_adaptation->SetNo_Refinement(geometry, 1);
				break;
			case FULL:
				grid_adaptation->SetComplete_Refinement(geometry, 1);
				break;
			case WAKE:
				grid_adaptation->SetWake_Refinement(geometry, 1);
				break;
			case TWOPHASE:
				grid_adaptation->SetTwoPhase_Refinement(geometry, 1);
				break;
			case SUPERSONIC_SHOCK:
				grid_adaptation->SetSupShock_Refinement(geometry, config);
				break;
			case FULL_FLOW:
				grid_adaptation->SetComplete_Refinement(geometry, 1);
				break;
			case FULL_ADJOINT:
				grid_adaptation->GetAdjSolution(geometry, config);
				grid_adaptation->SetComplete_Refinement(geometry, 1);
				break;
			case FULL_LINEAR:
				grid_adaptation->GetLinSolution(geometry, config);
				grid_adaptation->SetComplete_Refinement(geometry, 1);
				break;
			case GRAD_FLOW:
				grid_adaptation->SetIndicator_Flow(geometry, config, 1);
				break;
			case GRAD_ADJOINT:
				grid_adaptation->GetAdjSolution(geometry, config);
				grid_adaptation->SetIndicator_Adj(geometry, config, 1);
				break;
			case GRAD_FLOW_ADJ:
//.........这里部分代码省略.........
开发者ID:caomw,项目名称:SU2,代码行数:101,代码来源:SU2_MSH.cpp


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