Skip to content

Commit

Permalink
Fix using for cout precision
Browse files Browse the repository at this point in the history
  • Loading branch information
gpihan committed Feb 13, 2024
1 parent 8423988 commit 91ee765
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#endif

using std::vector;
using std::setw;
using std::setprecision;
using std::scientific;


MUSIC::MUSIC(std::string input_file) :
DATA(ReadInParameters::read_in_parameters(input_file)),
Expand Down Expand Up @@ -222,13 +226,11 @@ void MUSIC::check_source() {
rhoq /= tau0;
rhos /= tau0;

rhob *= DATA.delta_tau;
rhoq *= DATA.delta_tau;
rhos *= DATA.delta_tau;


rhob *= DATA.delta_tau;
rhoq *= DATA.delta_tau;
rhos *= DATA.delta_tau;

check_file << std::scientific << std::setw(18) << std::setprecision(8)
check_file << scientific << setw(18) << std::setprecision(8)
<< tau0 << " " << x_local << " " << y_local << " " << eta << " "
<< epsilon << " " << j_1 << " " << j_2 << " " << j_3
<< " " << rhob << " " << rhoq << " " << rhos << std::endl;
Expand Down

0 comments on commit 91ee765

Please sign in to comment.