Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -2299,9 +2299,9 @@ class DOCTEST_INTERFACE Context {
#endif // DOCTEST_CONFIG_WITH_VARIADIC_MACROS

// for subcases
#define DOCTEST_SUBCASE(name) \
if (const doctest::detail::Subcase& DOCTEST_ANONYMOUS( \
_DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \
#define DOCTEST_SUBCASE(name) \
if (const doctest::detail::Subcase \
& DOCTEST_ANONYMOUS(_DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \
doctest::detail::Subcase(name, __FILE__, __LINE__))

// for grouping tests in test suites by using code blocks
Expand Down Expand Up @@ -2488,7 +2488,7 @@ constexpr T to_lvalue = x;
#expr, DOCTEST_TOSTR(DOCTEST_HANDLE_BRACED_VA_ARGS(as))); \
try { \
expr; \
} catch (const DOCTEST_HANDLE_BRACED_VA_ARGS(as) &) { \
} catch (const DOCTEST_HANDLE_BRACED_VA_ARGS(as)&) { \
_DOCTEST_RB.m_threw = true; \
_DOCTEST_RB.m_threw_as = true; \
} catch (...) { \
Expand Down Expand Up @@ -4348,10 +4348,9 @@ void Color::init() {
#endif // DOCTEST_CONFIG_COLORS_WINDOWS
}

void Color::use(
Code
void Color::use(Code
#ifndef DOCTEST_CONFIG_COLORS_NONE
code
code
#endif // DOCTEST_CONFIG_COLORS_NONE
) {
const ContextState* p = contextState;
Expand Down
8 changes: 7 additions & 1 deletion src/evolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ int Evolve::EvolveIt(
// }
// }

int evoFileStatus = 0;
if (it % Nskip_timestep == 0) {
if (DATA.outputEvolutionData == 1) {
grid_info.OutputEvolutionDataXYEta(*fpCurr, tau);
} else if (DATA.outputEvolutionData == 2) {
grid_info.OutputEvolutionDataXYEta_chun(*fpCurr, tau);
evoFileStatus =
grid_info.OutputEvolutionDataXYEta_chun(*fpCurr, tau);
} else if (DATA.outputEvolutionData == 3) {
grid_info.OutputEvolutionDataXYEta_photon(*fpCurr, tau);
} else if (DATA.outputEvolutionData == 4) {
Expand All @@ -144,6 +146,10 @@ int Evolve::EvolveIt(
grid_info.OutputEvolution_Knudsen_Reynoldsnumbers(*fpCurr, tau);
}
}
if (evoFileStatus == -1) {
DATA.reRunHydro = true;
return (-1);
}

if (it == iFreezeStart || it == iFreezeStart + 10
|| it == iFreezeStart + 30 || it == iFreezeStart + 50) {
Expand Down
5 changes: 3 additions & 2 deletions src/grid_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void Cell_info::OutputEvolutionDataXYEta_memory(
}

//! This function outputs hydro evolution file in binary format
void Cell_info::OutputEvolutionDataXYEta_chun(Fields &arena, double tau) {
int Cell_info::OutputEvolutionDataXYEta_chun(Fields &arena, double tau) {
// the format of the file is as follows,
// itau ix iy ieta e P T cs^2 ux uy ueta
// if turn_on_shear == 1:
Expand Down Expand Up @@ -524,7 +524,7 @@ void Cell_info::OutputEvolutionDataXYEta_chun(Fields &arena, double tau) {
<< DATA.output_evolution_e_cut
<< " GeV/fm^3, are reaching the grid edge! "
<< "ix = " << ix << ", iy = " << iy << std::endl;
exit(-1);
return (-1);
}

eos.getThermalVariables(e_local, rhob_local, thermalVec);
Expand Down Expand Up @@ -623,6 +623,7 @@ void Cell_info::OutputEvolutionDataXYEta_chun(Fields &arena, double tau) {
}
}
fclose(out_file_xyeta);
return 0;
}

//! This function outputs hydro evolution file in binary format for photon
Expand Down
2 changes: 1 addition & 1 deletion src/grid_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Cell_info {
void OutputEvolutionDataXYEta(Fields &arena, double tau);

//! This function outputs hydro evolution file in binary format
void OutputEvolutionDataXYEta_chun(Fields &arena, double tau);
int OutputEvolutionDataXYEta_chun(Fields &arena, double tau);

//! This function outputs hydro evolution file in binary format for photon
//! production
Expand Down
11 changes: 7 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ int main(int argc, char *argv[]) {
music_hydro.setReRunHydro(false);

int running_mode = music_hydro.get_running_mode();
int evoStatus = 0;
if (running_mode == 1 || running_mode == 2) {
music_hydro.initialize_hydro();
music_hydro.run_hydro();
evoStatus = music_hydro.run_hydro();
bReRunHydro = music_hydro.getReRunHydro();
}

if (running_mode == 1 || running_mode == 3 || running_mode == 4
|| running_mode == 13 || running_mode == 14) {
music_hydro.run_Cooper_Frye();
if (evoStatus == 1) {
if (running_mode == 1 || running_mode == 3 || running_mode == 4
|| running_mode == 13 || running_mode == 14) {
music_hydro.run_Cooper_Frye();
}
}

if (running_mode == 71) {
Expand Down
8 changes: 5 additions & 3 deletions src/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ int MUSIC::run_hydro() {
if (hydro_info_ptr == nullptr && DATA.store_hydro_info_in_memory == 1) {
hydro_info_ptr = std::make_shared<HydroinfoMUSIC>();
}
evolve_local.EvolveIt(
int evoStatus = evolve_local.EvolveIt(
arenaFieldsPrev, arenaFieldsCurr, arenaFieldsNext, (*hydro_info_ptr));
flag_hydro_run = 1;
return (0);
if (evoStatus == 1) {
flag_hydro_run = 1;
}
return (evoStatus);
}

//! this is a shell function to run Cooper-Frye
Expand Down