Skip to content

Commit

Permalink
fixup: critical timestep output
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Mar 21, 2024
1 parent 486f598 commit fd5b289
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/CabanaPD_Input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

#include <fstream>
#include <iostream>
#include <sstream>
#include <string>

#include <nlohmann/json.hpp>

#include <CabanaPD_Output.hpp>

namespace CabanaPD
{
class Inputs
Expand Down Expand Up @@ -165,11 +166,12 @@ class Inputs
double dt = inputs["timestep"]["value"];
if ( dt > dt_crit )
{
std::cout << "WARNING: timestep (" << dt
<< ") is larger than estimated stable timestep ("
<< dt_crit << "), using safety factor of "
<< safety_factor << ".\n";
log( std::cout, "WARNING: timestep (", dt,
") is larger than estimated stable timestep (", dt_crit,
"), using safety factor of ", safety_factor, ".\n" );
}
// Store in inputs
inputs["critical_timestep"]["value"] = dt_crit;
}

// Parse JSON file.
Expand Down

0 comments on commit fd5b289

Please sign in to comment.