Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions include/CUFLU.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@
// check unphysical results in the MHM half-step prediction
#if ( FLU_SCHEME == MHM )
# define MHM_CHECK_PREDICT
#ifdef MHM_CHECK_PREDICT
#ifndef SRHD
# define MHM_REPREDICT_ITER_NUM 2
# define MHM_REPREDICT_STEPS_SAFE_FAC (real)0.4
# define MHM_REPREDICT_SLOPE_SAFE_FAC (real)0.9
# define MHM_REPREDICT_SUBSTEPS_MAX 4
#endif
#endif
#endif


Expand Down
25 changes: 25 additions & 0 deletions src/Auxiliary/Aux_Check_Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,31 @@ void Aux_Check_Parameter()
# endif // #if ( FLU_SCHEME == MHM || FLU_SCHEME == CTU )


// check for MHM
// ------------------------------
# if ( FLU_SCHEME == MHM )

# ifdef MHM_CHECK_PREDICT
# ifndef SRHD

if ( MHM_REPREDICT_ITER_NUM < 1 )
Aux_Error( ERROR_INFO, "MHM_REPREDICT_ITER_NUM should be >= 1 for MHM_CHECK_PREDICT !!\n" );

if ( MHM_REPREDICT_STEPS_SAFE_FAC <= 0 )
Aux_Error( ERROR_INFO, "MHM_REPREDICT_STEPS_SAFE_FAC should be > 0 for MHM_CHECK_PREDICT !!\n" );

if ( MHM_REPREDICT_SUBSTEPS_MAX < 1 )
Aux_Error( ERROR_INFO, "MHM_REPREDICT_SUBSTEPS_MAX should be >= 1 for MHM_CHECK_PREDICT !!\n" );

if ( MHM_REPREDICT_SLOPE_SAFE_FAC <= 0 || MHM_REPREDICT_SLOPE_SAFE_FAC >= 1 )
Aux_Error( ERROR_INFO, "MHM_REPREDICT_SLOPE_SAFE_FAC should be > 0 and < 1 for MHM_CHECK_PREDICT !!\n" );

# endif // #ifndef SRHD
# endif // #ifdef MHM_CHECK_PREDICT

# endif // #if ( FLU_SCHEME == MHM )


// check for MHM_RP
// ------------------------------
# if ( FLU_SCHEME == MHM_RP )
Expand Down
6 changes: 6 additions & 0 deletions src/Auxiliary/Aux_TakeNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,12 @@ void Aux_TakeNote()

# ifdef MHM_CHECK_PREDICT
fprintf( Note, "MHM_CHECK_PREDICT ON\n" );
# ifndef SRHD
fprintf( Note, "MHM_REPREDICT_ITER_NUM % d\n", MHM_REPREDICT_ITER_NUM );
fprintf( Note, "MHM_REPREDICT_STEPS_SAFE_FAC % 14.7e\n", MHM_REPREDICT_STEPS_SAFE_FAC );
fprintf( Note, "MHM_REPREDICT_SLOPE_SAFE_FAC % 14.7e\n", MHM_REPREDICT_SLOPE_SAFE_FAC );
fprintf( Note, "MHM_REPREDICT_SUBSTEPS_MAX % d\n", MHM_REPREDICT_SUBSTEPS_MAX );
# endif // #ifndef SRHD
# else
fprintf( Note, "MHM_CHECK_PREDICT OFF\n" );
# endif
Expand Down
Loading