Skip to content

Commit 0a7fc93

Browse files
committed
FIX: Add safety check for zero reference area (Fixes #2435)
1 parent 950d272 commit 0a7fc93

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4366,6 +4366,10 @@ void CPhysicalGeometry::SetPositive_ZArea(CConfig* config) {
43664366
else
43674367
config->SetRefArea(TotalPositiveYArea);
43684368

4369+
if (config->GetRefArea() < 1.0e-10) {
4370+
SU2_MPI::Error("Computed reference area is zero. Please set REF_AREA explicitly in the config file.", "SetPositive_ZArea");
4371+
}
4372+
43694373
if (rank == MASTER_NODE) {
43704374
if (D3)
43714375
cout << "Reference area = " << TotalPositiveZArea << A << ".\n";

0 commit comments

Comments
 (0)