本文整理汇总了C++中CGeometry::SetBoundTecPlot方法的典型用法代码示例。如果您正苦于以下问题:C++ CGeometry::SetBoundTecPlot方法的具体用法?C++ CGeometry::SetBoundTecPlot怎么用?C++ CGeometry::SetBoundTecPlot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGeometry
的用法示例。
在下文中一共展示了CGeometry::SetBoundTecPlot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
ObjectiveFunc_New[iVar] = 0.0;
Gradient[iVar] = 0.0;
}
/*--- Evaluation of the objective function ---*/
if (rank == MASTER_NODE)
cout << endl <<"----------------------- Preprocessing computations ----------------------" << endl;
/*--- Boundary geometry preprocessing ---*/
if (rank == MASTER_NODE) cout << "Identify vertices." <<endl;
boundary->SetVertex();
/*--- Compute elements surrounding points & points surrounding points ---*/
if (rank == MASTER_NODE) cout << "Setting local point and element connectivity." << endl;
boundary->SetPoint_Connectivity();
boundary->SetEdges();
/*--- Create the control volume structures ---*/
if (rank == MASTER_NODE) cout << "Set boundary control volume structure." << endl;
boundary->SetBoundControlVolume(config, ALLOCATE);
/*--- Compute the surface curvature ---*/
if (rank == MASTER_NODE) cout << "Compute the surface curvature." << endl;
boundary->ComputeSurf_Curvature(config);
if (rank == MASTER_NODE) cout << "Writing a Tecplot file of the surface curvature." << endl;
if (size > 1) sprintf (buffer_char, "_%d.plt", rank+1); else sprintf (buffer_char, ".plt");
strcpy (out_file, "Surface_Curvature"); strcat(out_file, buffer_char); boundary->SetBoundTecPlot(out_file, true, config);
/*--- Create plane structure ---*/
if (rank == MASTER_NODE) cout << "Set plane structure." << endl;
if (boundary->GetnDim() == 2) {
MinXCoord = -1E6; MaxXCoord = 1E6;
Plane_Normal[0][0] = 0.0; Plane_P0[0][0] = 0.0;
Plane_Normal[0][1] = 1.0; Plane_P0[0][1] = 0.0;
Plane_Normal[0][2] = 0.0; Plane_P0[0][2] = 0.0;
}
else if (boundary->GetnDim() == 3) {
MinPlane = config->GetSection_Location(0); MaxPlane = config->GetSection_Location(1);
MinXCoord = -1E6; MaxXCoord = 1E6;
for (iPlane = 0; iPlane < nPlane; iPlane++) {
Plane_Normal[iPlane][0] = 0.0; Plane_P0[iPlane][0] = 0.0;
Plane_Normal[iPlane][1] = 0.0; Plane_P0[iPlane][1] = 0.0;
Plane_Normal[iPlane][2] = 0.0; Plane_P0[iPlane][2] = 0.0;
Plane_Normal[iPlane][config->GetAxis_Orientation()] = 1.0;
Plane_P0[iPlane][config->GetAxis_Orientation()] = MinPlane + iPlane*(MaxPlane - MinPlane)/double(nPlane-1);
}
}
/*--- Create airfoil section structure ---*/
if (rank == MASTER_NODE) cout << "Set airfoil section structure." << endl;
for (iPlane = 0; iPlane < nPlane; iPlane++) {
boundary->ComputeAirfoil_Section(Plane_P0[iPlane], Plane_Normal[iPlane], iPlane, MinXCoord, MaxXCoord, NULL,
Xcoord_Airfoil[iPlane], Ycoord_Airfoil[iPlane], Zcoord_Airfoil[iPlane], Variable_Airfoil[iPlane], true, config);
}
/*--- Compute the internal volume of a 3D body. ---*/
示例2: main
//.........这里部分代码省略.........
break;
case COMPUTABLE_ROBUST:
grid_adaptation->GetAdjSolution(geometry, config);
grid_adaptation->GetLinResidual(geometry, config);
grid_adaptation->SetIndicator_Computable_Robust(geometry, config);
break;
default :
cout << "The adaptation is not defined" << endl;
}
/*--- Perform an homothetic adaptation of the grid ---*/
CPhysicalGeometry *geo_adapt; geo_adapt = new CPhysicalGeometry;
cout << "Homothetic grid adaptation" << endl;
if (geometry->GetnDim() == 2) grid_adaptation->SetHomothetic_Adaptation2D(geometry, geo_adapt, config);
if (geometry->GetnDim() == 3) grid_adaptation->SetHomothetic_Adaptation3D(geometry, geo_adapt, config);
/*--- Smooth the numerical grid coordinates ---*/
if (config->GetSmoothNumGrid()) {
cout << "Preprocessing for doing the implicit smoothing." << endl;
geo_adapt->SetPoint_Connectivity(); geo_adapt->SetElement_Connectivity();
geo_adapt->SetBoundVolume(); geo_adapt->Check_IntElem_Orientation(config); geo_adapt->Check_BoundElem_Orientation(config);
geo_adapt->SetEdges(); geo_adapt->SetVertex(config);
cout << "Implicit smoothing of the numerical grid coordinates." << endl;
geo_adapt->SetCoord_Smoothing(5, 1.5, config);
}
/*--- Original and adapted grid ---*/
strcpy (file_name, "original_grid.plt");
geometry->SetTecPlot(file_name, true);
strcpy (file_name, "original_surface.plt");
geometry->SetBoundTecPlot(file_name, true, config);
/*--- Write the adapted grid sensor ---*/
strcpy (file_name, "adapted_grid.plt");
geo_adapt->SetTecPlot(file_name, true);
strcpy (file_name, "adapted_surface.plt");
geo_adapt->SetBoundTecPlot(file_name, true, config);
/*--- Write the new adapted grid, including the modified boundaries surfaces ---*/
geo_adapt->SetMeshFile(config, config->GetMesh_Out_FileName());
/*--- Write the restart file ---*/
if ((config->GetKind_Adaptation() != SMOOTHING) && (config->GetKind_Adaptation() != FULL) &&
(config->GetKind_Adaptation() != WAKE) && (config->GetKind_Adaptation() != TWOPHASE) &&
(config->GetKind_Adaptation() != SUPERSONIC_SHOCK))
grid_adaptation->SetRestart_FlowSolution(config, geo_adapt, config->GetRestart_FlowFileName());
if ((config->GetKind_Adaptation() == GRAD_FLOW_ADJ) || (config->GetKind_Adaptation() == GRAD_ADJOINT)
|| (config->GetKind_Adaptation() == FULL_ADJOINT) || (config->GetKind_Adaptation() == ROBUST)
|| (config->GetKind_Adaptation() == COMPUTABLE) || (config->GetKind_Adaptation() == COMPUTABLE_ROBUST) ||
(config->GetKind_Adaptation() == REMAINING))
grid_adaptation->SetRestart_AdjSolution(config, geo_adapt, config->GetRestart_AdjFileName());
if ((config->GetKind_Adaptation() == FULL_LINEAR) || (config->GetKind_Adaptation() == COMPUTABLE_ROBUST)) {
grid_adaptation->SetRestart_LinSolution(config, geo_adapt, config->GetRestart_LinFileName());
}
}
else {