Permalink
Browse files

fix -nan RFRG glitch

  • Loading branch information...
jacob1 committed Jul 25, 2017
1 parent 5414170 commit 2b3fbbd50e607f51df6275b3f48c6298dd3bd63f
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/simulation/elements/RFRG.cpp
@@ -49,6 +49,11 @@ int Element_RFRG::update(UPDATE_FUNC_ARGS)
{
float new_pressure = sim->pv[y/CELL][x/CELL];
float *old_pressure = (float *)&parts[i].tmp;
if (std::isnan(*old_pressure))
{
*old_pressure = new_pressure;
return 0;
}
// * 0 bar seems to be pressure value -256 in TPT, see Air.cpp. Also, 1 bar seems to be pressure value 0.
// With those two values we can set up our pressure scale which states that ... the highest pressure

0 comments on commit 2b3fbbd

Please sign in to comment.