Merge pull request 'Change deviation to absolute value' (#15) from coryab/code into develop
Reviewed-on: https://gitea.balaton.dev/FYS3150/Project-5/pulls/15
This commit was merged in pull request #15.
This commit is contained in:
@@ -308,7 +308,7 @@ void WaveSimulation::probability_deviation(std::string outfile,
|
||||
if (write_each_step) {
|
||||
for (size_t i = 0; i < iterations; i++) {
|
||||
sum = arma::accu(this->U % arma::conj(this->U)).real();
|
||||
ofile << i*this->dt << '\t' << 1. - sum << '\n';
|
||||
ofile << i*this->dt << '\t' << std::abs(1. - sum) << '\n';
|
||||
this->step();
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ void WaveSimulation::probability_deviation(std::string outfile,
|
||||
}
|
||||
}
|
||||
sum = arma::accu(this->U % arma::conj(this->U)).real();
|
||||
ofile << this->T << '\t' << 1. - sum << '\n';
|
||||
ofile << this->T << '\t' << std::abs(1. - sum) << '\n';
|
||||
ofile.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user