Skip to content

Commit eba4157

Browse files
committed
Remove WRT_MESH_QUALITY option such that MESH_QUALITY can simply be used in VOLUME_OUTPUT.
1 parent 10c2a05 commit eba4157

6 files changed

Lines changed: 27 additions & 29 deletions

File tree

Common/src/CConfig.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,8 +2038,6 @@ void CConfig::SetConfig_Options() {
20382038
addBoolOption("WRT_PERFORMANCE", Wrt_Performance, false);
20392039
/* DESCRIPTION: Output the tape statistics (discrete adjoint) \ingroup Config*/
20402040
addBoolOption("WRT_AD_STATISTICS", Wrt_AD_Statistics, false);
2041-
/* DESCRIPTION: Write the mesh quality metrics to the visualization files. \ingroup Config*/
2042-
addBoolOption("WRT_MESH_QUALITY", Wrt_MeshQuality, false);
20432041
/* DESCRIPTION: Output a 1D slice of a 2D cartesian solution \ingroup Config*/
20442042
addBoolOption("WRT_SLICE", Wrt_Slice, false);
20452043
/*!\brief MARKER_ANALYZE_AVERAGE
@@ -3215,6 +3213,13 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
32153213
}
32163214
}
32173215

3216+
/*--- Check if MESH_QUALITY is requested in VOLUME_OUTPUT and set the config boolean accordingly. ---*/
3217+
Wrt_MeshQuality = false;
3218+
for (unsigned short iField = 0; iField < nVolumeOutput; iField++) {
3219+
if(VolumeOutput[iField].find("MESH_QUALITY") != string::npos) {
3220+
Wrt_MeshQuality = true;
3221+
}
3222+
}
32183223

32193224
if (Kind_Solver == NAVIER_STOKES && Kind_Turb_Model != NONE){
32203225
SU2_MPI::Error("KIND_TURB_MODEL must be NONE if SOLVER= NAVIER_STOKES", CURRENT_FUNCTION);

SU2_CFD/src/output/CFlowCompOutput.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,9 @@ void CFlowCompOutput::SetVolumeOutputFields(CConfig *config){
415415
}
416416

417417
// Mesh quality metrics, computed in CPhysicalGeometry::ComputeMeshQualityStatistics.
418-
// WRT_MESH_QUALITY= YES has to be set, otherwise the memory holding the data is freed.
419-
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality, additionally set \"WRT_MESH_QUALITY= YES\"");
420-
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "Aspect ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
421-
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "Volume Ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
418+
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality Angle (deg.)");
419+
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "CV Face Area Aspect Ratio");
420+
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "CV Sub-Volume Ratio");
422421

423422
if (config->GetTime_Domain()){
424423
SetTimeAveragedFields();
@@ -563,8 +562,8 @@ void CFlowCompOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolv
563562
// Mesh quality metrics
564563
if (config->GetWrt_MeshQuality()) {
565564
SetVolumeOutputValue("ORTHOGONALITY", iPoint, geometry->Orthogonality[iPoint]);
566-
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
567-
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
565+
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
566+
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
568567
}
569568

570569
if (config->GetTime_Domain()){

SU2_CFD/src/output/CFlowIncOutput.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,9 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){
480480
}
481481

482482
// Mesh quality metrics, computed in CPhysicalGeometry::ComputeMeshQualityStatistics.
483-
// WRT_MESH_QUALITY= YES has to be set, otherwise the memory holding the data is freed.
484-
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality, additionally set \"WRT_MESH_QUALITY= YES\"");
485-
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "Aspect ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
486-
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "Volume Ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
483+
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality Angle (deg.)");
484+
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "CV Face Area Aspect Ratio");
485+
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "CV Sub-Volume Ratio");
487486

488487
}
489488

@@ -652,8 +651,8 @@ void CFlowIncOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolv
652651
// Mesh quality metrics
653652
if (config->GetWrt_MeshQuality()) {
654653
SetVolumeOutputValue("ORTHOGONALITY", iPoint, geometry->Orthogonality[iPoint]);
655-
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
656-
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
654+
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
655+
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
657656
}
658657

659658
}

SU2_CFD/src/output/CHeatOutput.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,9 @@ void CHeatOutput::SetVolumeOutputFields(CConfig *config){
132132
AddVolumeOutput("RES_TEMPERATURE", "Residual_Temperature", "RESIDUAL", "Residual of the temperature");
133133

134134
// Mesh quality metrics, computed in CPhysicalGeometry::ComputeMeshQualityStatistics.
135-
// WRT_MESH_QUALITY= YES has to be set, otherwise the memory holding the data is freed.
136-
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality, additionally set \"WRT_MESH_QUALITY= YES\"");
137-
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "Aspect ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
138-
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "Volume Ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
135+
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality Angle (deg.)");
136+
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "CV Face Area Aspect Ratio");
137+
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "CV Sub-Volume Ratio");
139138

140139
}
141140

@@ -160,8 +159,8 @@ void CHeatOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver *
160159
// Mesh quality metrics
161160
if (config->GetWrt_MeshQuality()) {
162161
SetVolumeOutputValue("ORTHOGONALITY", iPoint, geometry->Orthogonality[iPoint]);
163-
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
164-
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
162+
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
163+
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
165164
}
166165

167166
}

SU2_CFD/src/output/CMeshOutput.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ void CMeshOutput::SetVolumeOutputFields(CConfig *config){
5757
AddVolumeOutput("COORD-Z", "z", "COORDINATES", "z-component of the coordinate vector");
5858

5959
// Mesh quality metrics, computed in CPhysicalGeometry::ComputeMeshQualityStatistics.
60-
// WRT_MESH_QUALITY= YES has to be set, otherwise the memory holding the data is freed.
61-
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality, additionally set \"WRT_MESH_QUALITY= YES\"");
62-
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "Aspect ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
63-
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "Volume Ratio, additionally set \"WRT_MESH_QUALITY= YES\"");
60+
AddVolumeOutput("ORTHOGONALITY", "Orthogonality", "MESH_QUALITY", "Orthogonality Angle (deg.)");
61+
AddVolumeOutput("ASPECT_RATIO", "Aspect_Ratio", "MESH_QUALITY", "CV Face Area Aspect Ratio");
62+
AddVolumeOutput("VOLUME_RATIO", "Volume_Ratio", "MESH_QUALITY", "CV Sub-Volume Ratio");
6463

6564
}
6665

@@ -76,8 +75,8 @@ void CMeshOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolver *
7675
// Mesh quality metrics
7776
if (config->GetWrt_MeshQuality()) {
7877
SetVolumeOutputValue("ORTHOGONALITY", iPoint, geometry->Orthogonality[iPoint]);
79-
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
80-
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
78+
SetVolumeOutputValue("ASPECT_RATIO", iPoint, geometry->Aspect_Ratio[iPoint]);
79+
SetVolumeOutputValue("VOLUME_RATIO", iPoint, geometry->Volume_Ratio[iPoint]);
8180
}
8281

8382
}

config_template.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,9 +1422,6 @@ HISTORY_OUTPUT= (ITER, RMS_RES)
14221422
% Volume output fields/groups (use 'SU2_CFD -d <config_file>' to view list of available fields)
14231423
VOLUME_OUTPUT= (COORDINATES, SOLUTION, PRIMITIVE)
14241424
%
1425-
% Write volume data for mesh quality metrics. Additionally set VOLUME_OUTPUT= (MESH_QUALITY, ...)
1426-
WRT_MESH_QUALITY= NO
1427-
%
14281425
% Writing frequency for screen output
14291426
SCREEN_WRT_FREQ_INNER= 1
14301427
%

0 commit comments

Comments
 (0)