From 13cdbdc83714cc8c4e48ca229b84cd2b9d0c3ad0 Mon Sep 17 00:00:00 2001 From: gforney Date: Mon, 20 May 2024 15:19:26 -0400 Subject: [PATCH 01/13] smokeview source: comment pp_FED directive --- Source/smokeview/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index 11252c7555..aae96c8cfd 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -6,7 +6,7 @@ #define pp_SELECT_PART // option to select a particle and show its tag //#define pp_PARTBOUND_MULTI // compute particle bounds in the background //#define pp_LUA // turn on LUA option -#define pp_FED // used to isolate fed code +//#define pp_FED // used to isolate fed code #define pp_SLICE_MULTI // load slice files in parallel //#define pp_SMOKE_MULTI // load 3d smoke in parallel //#define pp_SMOKE16 // load 16 bit smoke files From bd9a83e5eb84d4114f91d908dcc6a63d511039e1 Mon Sep 17 00:00:00 2001 From: gforney Date: Mon, 20 May 2024 15:19:58 -0400 Subject: [PATCH 02/13] smv ug: remove fed sections --- Manuals/SMV_User_Guide/SMV_User_Guide.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Manuals/SMV_User_Guide/SMV_User_Guide.tex b/Manuals/SMV_User_Guide/SMV_User_Guide.tex index 00a7328263..cd8d28eee5 100644 --- a/Manuals/SMV_User_Guide/SMV_User_Guide.tex +++ b/Manuals/SMV_User_Guide/SMV_User_Guide.tex @@ -1,9 +1,9 @@ \documentclass[11pt,twoside]{book} -\newcommand{\feda}{\input smv_ug_fed1.tex} -\newcommand{\fedb}{\input smv_ug_fed2.tex} -%\newcommand{\feda}{} -%\newcommand{\fedb}{} +%\newcommand{\feda}{\input smv_ug_fed1.tex} +%\newcommand{\fedb}{\input smv_ug_fed2.tex} +\newcommand{\feda}{} +\newcommand{\fedb}{} \newcommand{\utilchap}{\section} \newcommand{\utilsect}{\subsection} From ca0020600d6d29480bcc7a8627962f825e42eb48 Mon Sep 17 00:00:00 2001 From: gforney Date: Mon, 20 May 2024 15:20:14 -0400 Subject: [PATCH 03/13] smv vg: remove fed sections --- .../SMV_Verification_Guide.tex | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Manuals/SMV_Verification_Guide/SMV_Verification_Guide.tex b/Manuals/SMV_Verification_Guide/SMV_Verification_Guide.tex index 936fa5fbaa..42eb656b00 100644 --- a/Manuals/SMV_Verification_Guide/SMV_Verification_Guide.tex +++ b/Manuals/SMV_Verification_Guide/SMV_Verification_Guide.tex @@ -1,7 +1,12 @@ \documentclass[11pt,twoside]{book} -\newcommand{\feda}{\input smv_vg_fed1.tex} -%\newcommand{\feda}{} +%\newcommand{\feda}{\input smv_vg_fed1.tex} +%\newcommand{\fedb}{\section{fed\_test}\fdsinput{fed_test.fds}} +%\newcommand{\fedc}{\section{fed\_test}\fdsinput{fed_test.ssf}} +\newcommand{\feda}{} +\newcommand{\fedb}{} +\newcommand{\fedc}{} + \UseRawInputEncoding @@ -1714,8 +1719,7 @@ \section{colorconv} \label{FDScolorconv} \fdsinput{colorconv.fds} -\section{fed\_test} -\fdsinput{fed_test.fds} +\fedb \section{plume5c} \label{FDSplume5c} @@ -1760,8 +1764,7 @@ \section{colorconv} \label{SSFcolorconv} \fdsinput{colorconv.ssf} -\section{fed\_test} -\fdsinput{fed_test.ssf} +\fedc \section{plume5c} \label{SSFplume5c} From e285ee60bdec2017b032b79933ccf2fc70770281 Mon Sep 17 00:00:00 2001 From: gforney Date: Mon, 20 May 2024 15:30:25 -0400 Subject: [PATCH 04/13] scripts: minor edit to startXserver.sh script --- Utilities/Scripts/startXserver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/Scripts/startXserver.sh b/Utilities/Scripts/startXserver.sh index 461f2313c9..10e39c3fc5 100755 --- a/Utilities/Scripts/startXserver.sh +++ b/Utilities/Scripts/startXserver.sh @@ -1,5 +1,7 @@ #!/bin/bash lockfile=/tmp/startXlock +PAUSE=1 +XVFB=Xvfb GETNEWPORT () { while [ -e $lockfile ] ; do @@ -17,9 +19,7 @@ GETNEWPORT () } if [ "`uname`" != "Darwin" ]; then - PAUSE=1 echo "setting up graphics environment (pausing $PAUSE s)" - XVFB=Xvfb GETNEWPORT $XVFB :$display_port -fp /usr/share/X11/fonts/misc -screen 0 1280x1024x24 & export SMV_ID=$! From edb98116bc63686734f8d8262b92dc6198ec3e16 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 12:24:48 -0400 Subject: [PATCH 05/13] smokeview source: add some timing code to the update read .smv routine --- Source/smokeview/readsmv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c index 6c55557e6d..121412a6d4 100644 --- a/Source/smokeview/readsmv.c +++ b/Source/smokeview/readsmv.c @@ -1182,11 +1182,15 @@ ventdata *GetCloseVent(meshdata *ventmesh, int ivent){ /// @brief Re-read an *.smv file to read any updates. /// @param file The path to the *.smv file. void UpdateSMVDynamic(char *file){ + INIT_PRINT_TIMER(smv_timer1); ReadSMVDynamic(file); + PRINT_TIMER(smv_timer1, "ReadSMVDynamic"); + INIT_PRINT_TIMER(smv_timer2); UpdatePlot3dMenuLabels(); InitPlot3dTimeList(); UpdateTimes(); GetGlobalPlot3DBounds(); + PRINT_TIMER(smv_timer2, "UpdateSMVDynamic wrapup"); } /* ------------------ ReadSMVDynamic ------------------------ */ From 5e38a8072f0ab85d41bd9dc49a3360f7ae1f8154 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 12:26:25 -0400 Subject: [PATCH 06/13] smokeview source: check for a NULL pointer in bounds dialog routine --- Source/smokeview/glui_bounds.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/smokeview/glui_bounds.cpp b/Source/smokeview/glui_bounds.cpp index ddfe3896e3..92a5b82529 100644 --- a/Source/smokeview/glui_bounds.cpp +++ b/Source/smokeview/glui_bounds.cpp @@ -785,7 +785,7 @@ void bounds_dialog::CB(int var){ // quantity radio button case BOUND_VAL_TYPE: - if(all_boundsi == NULL)break; + if(all_bounds == NULL)break; valtype_save = bounds.set_valtype; memcpy(&bounds, all_boundsi, sizeof(cpp_boundsdata)); bounds.set_valtype = valtype_save; @@ -819,7 +819,7 @@ void bounds_dialog::CB(int var){ case BOUND_VALMIN: bounds.valmin[BOUND_SET_MIN] = bounds.glui_valmin; bounds.set_valmin = BOUND_SET_MIN; - memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); + if(all_bounds != NULL)memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); if(RADIO_set_valmin!=NULL)RADIO_set_valmin->set_int_val(BOUND_SET_MIN); if(InResearchMode()!=research_mode_cpp){ SetResearchMode(1-research_mode_cpp); @@ -828,7 +828,7 @@ void bounds_dialog::CB(int var){ case BOUND_VALMAX: bounds.valmax[BOUND_SET_MAX] = bounds.glui_valmax; bounds.set_valmax = BOUND_SET_MAX; - memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); + if(all_bounds != NULL)memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); if(RADIO_set_valmax!=NULL)RADIO_set_valmax->set_int_val(BOUND_SET_MAX); if(InResearchMode()!=research_mode_cpp){ SetResearchMode(1-research_mode_cpp); @@ -837,17 +837,17 @@ void bounds_dialog::CB(int var){ // min/max radio buttons case BOUND_SETVALMIN: - bounds.glui_valmin = all_boundsi->valmin[bounds.set_valmin]; + if(all_bounds != NULL)bounds.glui_valmin = all_boundsi->valmin[bounds.set_valmin]; if(EDIT_valmin!=NULL)EDIT_valmin->set_float_val(bounds.glui_valmin); - memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); + if(all_bounds != NULL)memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); if(InResearchMode()!=research_mode_cpp){ SetResearchMode(1-research_mode_cpp); } break; case BOUND_SETVALMAX: - bounds.glui_valmax = all_boundsi->valmax[bounds.set_valmax]; + if(all_bounds != NULL)bounds.glui_valmax = all_boundsi->valmax[bounds.set_valmax]; if(EDIT_valmax!=NULL)EDIT_valmax->set_float_val(bounds.glui_valmax); - memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); + if(all_bounds != NULL)memcpy(all_boundsi, &bounds, sizeof(cpp_boundsdata)); if(InResearchMode()!=research_mode_cpp){ SetResearchMode(1-research_mode_cpp); } @@ -873,15 +873,15 @@ void bounds_dialog::CB(int var){ // chop dialog boxes case BOUND_CHOPMIN: - all_boundsi->chopmin = bounds.chopmin; + if(all_bounds != NULL)all_boundsi->chopmin = bounds.chopmin; update_chop_colors = 1; break; case BOUND_CHOPMAX: - all_boundsi->chopmax = bounds.chopmax; + if(all_bounds != NULL)all_boundsi->chopmax = bounds.chopmax; update_chop_colors = 1; break; case BOUND_SETCHOPMIN: - all_boundsi->set_chopmin = bounds.set_chopmin; + if(all_bounds != NULL)all_boundsi->set_chopmin = bounds.set_chopmin; if(EDIT_chopmin!=NULL){ if(bounds.set_chopmin==1){ EDIT_chopmin->enable(); @@ -893,7 +893,7 @@ void bounds_dialog::CB(int var){ update_chop_colors = 1; break; case BOUND_SETCHOPMAX: - all_boundsi->set_chopmax = bounds.set_chopmax; + if(all_bounds != NULL)all_boundsi->set_chopmax = bounds.set_chopmax; if(EDIT_chopmax!=NULL){ if(bounds.set_chopmax==1){ EDIT_chopmax->enable(); @@ -907,7 +907,7 @@ void bounds_dialog::CB(int var){ // keep data checkbox case BOUND_CACHE_DATA: - { + if(all_bounds != NULL){ int i; for(i = 0; i Date: Tue, 21 May 2024 12:27:27 -0400 Subject: [PATCH 07/13] smokeview source: correction to code implementing reloading files ie 'u' shortcut --- Source/smokeview/getdatabounds.c | 12 ++++++++++-- Source/smokeview/menus.c | 8 +++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Source/smokeview/getdatabounds.c b/Source/smokeview/getdatabounds.c index 41affb3e4d..27fc702631 100644 --- a/Source/smokeview/getdatabounds.c +++ b/Source/smokeview/getdatabounds.c @@ -928,8 +928,16 @@ void BoundsUpdateSetup(int file_type){ char **sorted_filenames; ninfo = GetNinfo(file_type); - globalboundsinfo = GetGlobalBoundsinfo(file_type); - sorted_filenames = GetSortedFilenames(file_type); + if(file_type == BOUND_PLOT3D){ + FREEMEMORY(plot3dglobalboundsinfo); + FREEMEMORY(sorted_plot3d_filenames); + globalboundsinfo = NULL; + sorted_filenames = NULL; + } + else{ + globalboundsinfo = GetGlobalBoundsinfo(file_type); + sorted_filenames = GetSortedFilenames(file_type); + } if(sorted_filenames == NULL){ NewMemory((void **)&sorted_filenames, ninfo * sizeof(char *)); diff --git a/Source/smokeview/menus.c b/Source/smokeview/menus.c index 0a6c9b7506..08b9c24c0f 100644 --- a/Source/smokeview/menus.c +++ b/Source/smokeview/menus.c @@ -3510,8 +3510,10 @@ void LoadUnloadMenu(int value){ break; } } + int plot3d_loaded = 0; for(i=0;i Date: Tue, 21 May 2024 13:09:18 -0400 Subject: [PATCH 08/13] smv vv: remove fed_test case from smokeview case list --- Verification/scripts/SMV_Cases.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/Verification/scripts/SMV_Cases.sh b/Verification/scripts/SMV_Cases.sh index 1694090f33..c6c567ac06 100755 --- a/Verification/scripts/SMV_Cases.sh +++ b/Verification/scripts/SMV_Cases.sh @@ -10,7 +10,6 @@ $QFDS -d Visualization colorbar.fds $QFDS -d Visualization colorbar2.fds $QFDS -d Visualization colorconv.fds $QFDS -d Visualization color_geom.fds -$QFDS -d Visualization fed_test.fds $QFDS -d Visualization hvac_comp.fds $QFDS -d Visualization -p 8 -n 8 mplume5c8.fds $QFDS -d Visualization objects_dynamic.fds From d12d41f673127e758591ed9f6284cb3d3e8b6e57 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 13:10:18 -0400 Subject: [PATCH 09/13] smv vv: remove fed test dase from LITE case list --- Verification/scripts/LITE_Cases.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Verification/scripts/LITE_Cases.sh b/Verification/scripts/LITE_Cases.sh index b3fdea0453..19c7864cdd 100755 --- a/Verification/scripts/LITE_Cases.sh +++ b/Verification/scripts/LITE_Cases.sh @@ -1,12 +1,7 @@ #!/bin/bash -FED=1 - $QFDS -d Visualization plume5c.fds $QFDS -p 2 -d Visualization thouse5.fds $QFDS -d Visualization cell_test.fds -if [ "$FED" != "" ]; then - $QFDS -d Visualization fed_test.fds -fi $QFDS -d Visualization smokex010.fds $QFDS -d Visualization smokex020.fds $QFDS -d Visualization smokex040.fds From a28ab25700cfbbec2510394ac6b12c4878331d59 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 13:17:39 -0400 Subject: [PATCH 10/13] smokeview source: surround fed code with pp_FED in lua_api.c --- Source/smokeview/lua_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/smokeview/lua_api.c b/Source/smokeview/lua_api.c index 9944215b50..8f61a738f9 100644 --- a/Source/smokeview/lua_api.c +++ b/Source/smokeview/lua_api.c @@ -3384,6 +3384,7 @@ int LuaSetBoundzipstep(lua_State *L) { return 1; } +#ifdef pp_FED int LuaSetFed(lua_State *L) { int v = lua_tonumber(L, 1); int return_code = SetFed(v); @@ -3397,7 +3398,7 @@ int LuaSetFedcolorbar(lua_State *L) { lua_pushnumber(L, return_code); return 1; } - +#endif int LuaSetIsozipstep(lua_State *L) { int v = lua_tonumber(L, 1); int return_code = SetIsozipstep(v); @@ -5352,8 +5353,10 @@ static luaL_Reg const SMVLIB[] = { {"set_windowheight", LuaSetWindowheight}, {"set_boundzipstep", LuaSetBoundzipstep}, +#ifdef pp_FED {"set_fed", LuaSetFed}, {"set_fedcolorbar", LuaSetFedcolorbar}, +#endif {"set_isozipstep", LuaSetIsozipstep}, {"set_nopart", LuaSetNopart}, {"set_showfedarea", LuaSetShowfedarea}, From 1ff43a3aea5959ac936ff2797ff3bc0b9abb1b56 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 13:23:31 -0400 Subject: [PATCH 11/13] smokeview source: surround SetShowfedarea routine in lua_api.c with pp_FED directive --- Source/smokeview/lua_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/smokeview/lua_api.c b/Source/smokeview/lua_api.c index 8f61a738f9..18ec7363fe 100644 --- a/Source/smokeview/lua_api.c +++ b/Source/smokeview/lua_api.c @@ -3413,12 +3413,14 @@ int LuaSetNopart(lua_State *L) { return 1; } +#ifdef pp_FED int LuaSetShowfedarea(lua_State *L) { int v = lua_tonumber(L, 1); int return_code = SetShowfedarea(v); lua_pushnumber(L, return_code); return 1; } +#endif int LuaSetSliceaverage(lua_State *L) { int flag = lua_tonumber(L, 1); @@ -5359,7 +5361,9 @@ static luaL_Reg const SMVLIB[] = { #endif {"set_isozipstep", LuaSetIsozipstep}, {"set_nopart", LuaSetNopart}, +#ifdef pp_FED {"set_showfedarea", LuaSetShowfedarea}, +#endif {"set_sliceaverage", LuaSetSliceaverage}, {"set_slicedataout", LuaSetSlicedataout}, {"set_slicezipstep", LuaSetSlicezipstep}, From c77cea1ab9c4051cfaa25f51aeced22df2c8a4f1 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 13:37:05 -0400 Subject: [PATCH 12/13] smvq source: surround some fed code with pp_FED --- Source/smvq/smvq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/smvq/smvq.c b/Source/smvq/smvq.c index 32d7eb59e6..e100d86245 100644 --- a/Source/smvq/smvq.c +++ b/Source/smvq/smvq.c @@ -124,12 +124,14 @@ int SetGlobalFilenames(const char *fdsprefix) { STRCAT(ffmpeg_command_filename, ".sh"); #endif } +#ifdef pp_FED if (fed_filename == NULL) { STRCPY(fed_filename_base, fdsprefix); STRCAT(fed_filename_base, ".fed_smv"); fed_filename = GetFileName(smokeview_scratchdir, fed_filename_base, NOT_FORCE_IN_DIR); } +#endif if (stop_filename == NULL) { NewMemory((void **)&stop_filename, (unsigned int)(len_casename + strlen(".stop") + 1)); From d5a66836e3650456e0d15f657d78babf00c8bdc7 Mon Sep 17 00:00:00 2001 From: gforney Date: Tue, 21 May 2024 13:45:41 -0400 Subject: [PATCH 13/13] smv vv: remove fed entries from thouse5 script --- Verification/Visualization/thouse5.ssf | 62 -------------------------- 1 file changed, 62 deletions(-) diff --git a/Verification/Visualization/thouse5.ssf b/Verification/Visualization/thouse5.ssf index 4bf7a00eeb..7d9844cf34 100644 --- a/Verification/Visualization/thouse5.ssf +++ b/Verification/Visualization/thouse5.ssf @@ -562,68 +562,6 @@ PLOT3DPROPS RENDERONCE thouse5_plot3d_iso2 -// render fed iso file - -LABEL - render fed iso file - -UNLOADALL -LOADINIFILE - thouse5.ini -LOADISO - Fractional effective dose: 0.3, 1.0, 3.0 -SETVIEWPOINT - external -SETTIMEVAL - 5.000000 -RENDERONCE - thouse5_fed_iso_005 -SETTIMEVAL - 10.000000 -RENDERONCE - thouse5_fed_iso_010 -SETTIMEVAL - 30.000000 -RENDERONCE - thouse5_fed_iso_030 -SETTIMEVAL - 60.000000 -RENDERONCE - thouse5_fed_iso_060 -LOADINIFILE - thouse5.ini - - // render fed slice file - -LABEL - render fed slice file - -UNLOADALL -LOADINIFILE - thouse5_fed.ini -SCENECLIP - 1 -LOADSLCF - PBY=1.6 QUANTITY='Fractional effective dose' -SETTIMEVAL - 5.0 -SETVIEWPOINT - upy -RENDERONCE - thouse5_fed_z1p5_slice_005 -SETTIMEVAL - 10.000000 -RENDERONCE - thouse5_fed_z1p5_slice_010 -SETTIMEVAL - 30.000000 -RENDERONCE - thouse5_fed_z1p5_slice_030 -SETTIMEVAL - 60.000000 -RENDERONCE - thouse5_fed_z1p5_slice_060 - // render chopped slice file (ceiling jet) LABEL