Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: FG-TUM <[email protected]>
  • Loading branch information
amartyads and FG-TUM authored Nov 28, 2024
1 parent 2363140 commit c0c7aae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
8 changes: 2 additions & 6 deletions src/parallel/boundaries/BoundaryHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ void BoundaryHandler::processGlobalWallLeavingParticles(ParticleContainer *molec
break;
}
default:
std::ostringstream error_message;
error_message << "BoundaryType::ERROR received in BoundaryHandler::processGlobalWallLeavingParticles!" << std::endl;
MARDYN_EXIT(error_message.str());
MARDYN_EXIT("BoundaryType::ERROR received in BoundaryHandler::processGlobalWallLeavingParticles!");
}
}
}
Expand Down Expand Up @@ -169,9 +167,7 @@ void BoundaryHandler::removeNonPeriodicHalos(ParticleContainer *moleculeContaine
break;
}
default:
std::ostringstream error_message;
error_message << "BoundaryType::ERROR received in BoundaryHandler::removeNonPeriodicHalos!" << std::endl;
MARDYN_EXIT(error_message.str());
MARDYN_EXIT("BoundaryType::ERROR received in BoundaryHandler::removeNonPeriodicHalos!");
}
}
}
10 changes: 2 additions & 8 deletions src/parallel/boundaries/DimensionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ std::string DimensionUtils::convertDimensionToString(DimensionType dimension) {
case DimensionType::NEGZ:
return "-z";
default: // ERROR
std::ostringstream error_message;
error_message << "DimesionType::ERROR received in DimensionUtils::convertDimensionToString!"
<< std::endl;
MARDYN_EXIT(error_message.str());
MARDYN_EXIT("DimesionType::ERROR received in DimensionUtils::convertDimensionToString!");
return "error";
}
}
Expand All @@ -96,10 +93,7 @@ int DimensionUtils::convertDimensionToNumeric(DimensionType dimension) {
case DimensionType::NEGZ:
return -3;
default:
std::ostringstream error_message;
error_message << "DimesionType::ERROR received in DimensionUtils::convertDimensionToNumeric!"
<< std::endl;
MARDYN_EXIT(error_message.str());
MARDYN_EXIT("DimesionType::ERROR received in DimensionUtils::convertDimensionToNumeric!");
return 0;
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/parallel/boundaries/RegionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ std::tuple<std::array<double, 3>, std::array<double, 3>> RegionUtils::getInnerRe
break;

default:
std::ostringstream error_message;
error_message << "DimensionType::ERROR received in RegionUtils::getInnerRegionSlab" << std::endl;
MARDYN_EXIT(error_message.str());
MARDYN_EXIT("DimensionType::ERROR received in RegionUtils::getInnerRegionSlab");
}
return {returnRegionBegin, returnRegionEnd};
}
Expand Down

0 comments on commit c0c7aae

Please sign in to comment.