Fix mistake

This commit is contained in:
Cory Balaton 2023-12-26 15:32:58 +01:00
parent 40af4d3b1a
commit 3ec69195f0
Signed by: coryab
GPG Key ID: F7562F0EC4E4A61B

View File

@ -274,10 +274,10 @@ void WaveSimulation::solve(std::string outfile, std::vector<double> &steps)
for (size_t i=0; i < steps.size(); i++) { for (size_t i=0; i < steps.size(); i++) {
if (i == 0) { if (i == 0) {
iterations = steps[i] / this->h; iterations = steps[i] / this->dt;
} }
else { else {
iterations = (steps[i] - steps[i-1]) / this->h; iterations = (steps[i] - steps[i-1]) / this->dt;
} }
for (size_t j=0; j < iterations; j++) { for (size_t j=0; j < iterations; j++) {