Skip to content

Commit

Permalink
printf debugging...
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 14, 2024
1 parent a4155c9 commit 706d88f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hydro/hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ Real EstimateTimestep(MeshData<Real> *md) {
auto dt_diff_param = hydro_pkg->Param<Real>("dt_diff");
hydro_pkg->UpdateParam("dt_diff", std::min(dt_diff, dt_diff_param));
}
std::cerr << "[" << parthenon::Globals::my_rank << "] DT:\ttau=" << dt_hyp
<< " dt_diff=" << dt_diff << "\n";

if (ProblemEstimateTimestep != nullptr) {
min_dt = std::min(min_dt, ProblemEstimateTimestep(md));
Expand Down
6 changes: 6 additions & 0 deletions src/hydro/hydro_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// Parthenon headers
#include "amr_criteria/refinement_package.hpp"
#include "bvals/comms/bvals_in_one.hpp"
#include "globals.hpp"
#include "prolong_restrict/prolong_restrict.hpp"
#include <parthenon/parthenon.hpp>
// AthenaPK headers
Expand Down Expand Up @@ -218,6 +219,9 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks,
// ensure odd number of stages
if (s_rkl % 2 == 0) s_rkl += 1;

std::cerr << "[" << parthenon::Globals::my_rank << "] STS:\ttau=" << tau
<< " dt_diff=" << mindt_diff << "\n";

if (parthenon::Globals::my_rank == 0) {
const auto ratio = 2.0 * tau / mindt_diff;
std::cout << "STS ratio: " << ratio << " Taking " << s_rkl << " steps." << std::endl;
Expand Down Expand Up @@ -481,6 +485,8 @@ TaskCollection HydroDriver::MakeTaskCollection(BlockList_t &blocks, int stage) {
hydro_pkg->UpdateParam("mindx", mins[0]);
hydro_pkg->UpdateParam("dt_hyp", mins[1]);
hydro_pkg->UpdateParam("dt_diff", mins[2]);
std::cerr << "[" << parthenon::Globals::my_rank << "] INI:\ttau=" << mins[1]
<< " dt_diff=" << mins[2] << "\n";
return TaskStatus::complete;
},
hydro_pkg.get());
Expand Down

0 comments on commit 706d88f

Please sign in to comment.