fixed a bug that returned the wrong grid to the test method

This commit is contained in:
philippun 2023-08-02 13:19:33 +02:00
parent 78cf41f57e
commit 85c5e55601
3 changed files with 7 additions and 7 deletions

View File

@ -103,11 +103,11 @@ class Simulation {
void printConcentrationsCSV(string filename);
/**
* @brief Start the simulation with all of the previously set parameters.
* @brief
*
* @return auto
* @return Grid
*/
void run();
Grid run();
private:

View File

@ -146,7 +146,7 @@ void Simulation::printConcentrationsCSV(string filename) {
file.close();
}
void Simulation::run() {
Grid Simulation::run() {
string filename;
if (this->console_output > CONSOLE_OUTPUT_OFF) {
printConcentrationsConsole();
@ -191,4 +191,6 @@ void Simulation::run() {
if (this->csv_output > CSV_OUTPUT_OFF) {
printConcentrationsCSV(filename);
}
return grid;
}

View File

@ -50,9 +50,7 @@ static Grid setupSimulation() {
// RUN
sim.run();
return grid;
return sim.run();
}
TEST_CASE("equality to reference matrix") {