Skip to content

Commit b6e0398

Browse files
committed
Merge branch 'heat_solver_fixes' of https://github.com/su2code/SU2 into heat_solver_fixes
2 parents 20e012f + 85419fe commit b6e0398

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8425,7 +8425,7 @@ void CPhysicalGeometry::ComputeMeshQualityStatistics(CConfig *config) {
84258425
const unsigned long jPoint = edges->GetNode(iEdge,1);
84268426

84278427
const unsigned long GlobalIndex_i = nodes->GetGlobalIndex(iPoint);
8428-
const unsigned long GlobalIndex_j = nodes->GetGlobalIndex(iPoint);
8428+
const unsigned long GlobalIndex_j = nodes->GetGlobalIndex(jPoint);
84298429

84308430
/*-- Area normal for the current edge. Recall that this normal
84318431
is computed by summing the normals of adjacent faces along

SU2_DEF/src/SU2_DEF.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
160160
/*--- Add the Send/Receive boundaries ---*/
161161

162162
geometry_container[iZone]->SetBoundaries(config_container[iZone]);
163-
163+
164164
}
165165

166166
/*--- Set up a timer for performance benchmarking (preprocessing time is included) ---*/
@@ -190,7 +190,8 @@ int main(int argc, char *argv[]) {
190190
/*--- Create the edge structure ---*/
191191

192192
if (rank == MASTER_NODE) cout << "Identify edges and vertices." <<endl;
193-
geometry_container[iZone]->SetEdges(); geometry_container[iZone]->SetVertex(config_container[iZone]);
193+
geometry_container[iZone]->SetEdges();
194+
geometry_container[iZone]->SetVertex(config_container[iZone]);
194195

195196
if (config_container[iZone]->GetDesign_Variable(0) != NO_DEFORMATION) {
196197

@@ -202,6 +203,7 @@ int main(int argc, char *argv[]) {
202203
/*--- Create the dual control volume structures ---*/
203204

204205
if (rank == MASTER_NODE) cout << "Setting the bound control volume structure." << endl;
206+
geometry_container[iZone]->SetControlVolume(config_container[iZone], ALLOCATE);
205207
geometry_container[iZone]->SetBoundControlVolume(config_container[iZone], ALLOCATE);
206208

207209
}
@@ -334,6 +336,24 @@ int main(int argc, char *argv[]) {
334336

335337
for (iZone = 0; iZone < nZone; iZone++){
336338

339+
/*--- Compute Mesh Quality if requested. Necessary geometry preprocessing re-done beforehand. ---*/
340+
341+
if (config_container[iZone]->GetWrt_MeshQuality() && !config->GetStructuralProblem()) {
342+
343+
if (rank == MASTER_NODE) cout << "Recompute geometry properties necessary to evaluate mesh quality statistics.\n";
344+
345+
geometry_container[iZone]->SetPoint_Connectivity();
346+
geometry_container[iZone]->SetBoundVolume();
347+
geometry_container[iZone]->SetEdges();
348+
geometry_container[iZone]->SetVertex(config_container[iZone]);
349+
geometry_container[iZone]->SetCoord_CG();
350+
geometry_container[iZone]->SetControlVolume(config_container[iZone], ALLOCATE);
351+
geometry_container[iZone]->SetBoundControlVolume(config_container[iZone], ALLOCATE);
352+
353+
if (rank == MASTER_NODE) cout << "Computing mesh quality statistics for the dual control volumes.\n";
354+
geometry_container[iZone]->ComputeMeshQualityStatistics(config_container[iZone]);
355+
}// Mesh Quality Output
356+
337357
/*--- Load the data --- */
338358

339359
output[iZone]->Load_Data(geometry_container[iZone], config_container[iZone], nullptr);

0 commit comments

Comments
 (0)