Skip to content

Commit

Permalink
Fixed #1292: Wrong abs() function used in example
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Oct 25, 2014
1 parent 470a4c4 commit 7035745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/1d_hydro/1d_hydro_upwind.cpp
Expand Up @@ -453,7 +453,7 @@ cell compute(boost::uint64_t timestep, boost::uint64_t location)
double e_kinetic = 0.5*middle.mom*middle.mom/middle.rho;
double e_internal = middle.etot - e_kinetic;
//dual energy formalism
if ( abs(e_internal) > 0.1*middle.etot)
if ( std::abs(e_internal) > 0.1*middle.etot)
{
//cout << (boost::format("gas is shocking!\n")) << flush;
now.tau = pow(e_internal,(1.0/fluid_gamma));
Expand Down Expand Up @@ -493,7 +493,7 @@ double get_pressure(cell input)
double e_internal = input.etot - e_kinetic;

// dual energy
if ( abs(e_internal) > 0.001*input.etot )
if ( std::abs(e_internal) > 0.001*input.etot )
{
pressure = (fluid_gamma-1.0)*e_internal;
}
Expand Down

0 comments on commit 7035745

Please sign in to comment.