Skip to content
Open
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: 13 additions & 0 deletions src/Fluid/Flu_Close.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,19 @@ bool Unphysical( const real Fluid[], const int CheckMode, const real Emag )
}
# endif // #ifndef BAROTROPIC_EOS

# ifndef SRHD
if ( OPT__UNIT )
{
// check whether the speed is larger than the speed of light
if ( SQR(Fluid[MOMX]) + SQR(Fluid[MOMY]) + SQR(Fluid[MOMZ]) >= SQR(Fluid[DENS]*Const_c/UNIT_V) )
return true;

// check whether the total energy is larger than the relativistic rest-mass energy
if ( Fluid[ENGY] >= Fluid[DENS] * SQR(Const_c/UNIT_V) )
return true;
}
# endif // #ifndef SRHD


// if all checks above pass, return false
// =================================================
Expand Down