Skip to content

Commit

Permalink
Merge pull request #83 from HSU-HPC/thermostat_fix
Browse files Browse the repository at this point in the history
Fixed thermostat applied on wrong number of cell layers
  • Loading branch information
Thinkpiet authored Nov 27, 2024
2 parents 708d9e0 + 0a890b9 commit 8e00ead
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions coupling/configurations/ThermostatConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ class coupling::configurations::ThermostatConfiguration : public tarch::configur
_type = onlyOutestLayer;
} else if (value == "outerLayers") {
_type = outerLayers;
int cellsTemp = 0;
tarch::configuration::ParseConfiguration::readIntOptional(cellsTemp, node, "number-layers");
if (cellsTemp <= 0) {
tarch::configuration::ParseConfiguration::readIntMandatory(_cells, node, "number-layers");
if (_cells < 0) {
std::cout << "ERROR coupling::ThermostatConfiguration: Wrong number of cells to use!" << std::endl;
_isValid = false;
exit(EXIT_FAILURE);
}
_cells = cellsTemp - 1;
} else if (value == "all") {
_type = all;
} else if (value == "nowhere") {
Expand Down

0 comments on commit 8e00ead

Please sign in to comment.