Skip to content

Commit

Permalink
Merge pull request #1881 from gforney/master
Browse files Browse the repository at this point in the history
fix to 3D slice and 3D vector slice menu display
  • Loading branch information
gforney authored Apr 24, 2024
2 parents cd9603f + 86b6cc9 commit 796b08e
Show file tree
Hide file tree
Showing 6 changed files with 892 additions and 20 deletions.
58 changes: 46 additions & 12 deletions Manuals/SMV_Verification_Guide/SMV_Verification_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,9 @@ \section{Slices}
hazard due to combustion gases\cite{SFPE:Purser}. Images are drawn at \SI{30}{s},
\SI{60}{s} and \SI{120}{s} and \SI{240}{s}. The FED is computed using three data slices with concentration of $1000~\mathrm{ppm}$ for $\mathrm{CO}$ and volume fractions of 0.02 and 0.07 for $\mathrm{CO_2}$ and $\mathrm{O_2}$ respectively. These values result in FED values of 1.5 at \SI{30}{s}, 3.0 at \SI{60}{s}, 6.0 at \SI{120}{s} and 12.0 at \SI{240}{s}.

Figure \ref{figslice3D} presents images of shaded 3D slices oriented in XY, XY and YZ planes.
Images are drawn at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.

Figure \ref{figgslicetest} presents images of 3D slices oriented in two different
ways. Images are drawn at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.

Expand Down Expand Up @@ -681,6 +684,7 @@ \section{Slices}
\label{fignodeslicetest}%
\end{figure}


\begin{figure}[bph]
\begin{center}
\begin{tabular}{rccp{1.0in}}
Expand All @@ -704,18 +708,6 @@ \section{Slices}
\label{figsliceaveragetest}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/testsort_x0p4}&
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/testsort_y1p2}\\
$x=0.4$&$y=1.2$\\
\end{tabular}
\end{center}
\caption[Two vertical slices drawn at $x=0.4$ and $y=1.2$.]{Two vertical slices drawn at $x=0.4$ and $y=1.2$.}
\label{figslicexy}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
Expand All @@ -730,6 +722,18 @@ \section{Slices}
\label{figslicesort}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/testsort_x0p4}&
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/testsort_y1p2}\\
$x=0.4$&$y=1.2$\\
\end{tabular}
\end{center}
\caption[Two vertical slices drawn at $x=0.4$ and $y=1.2$.]{Two vertical slices drawn at $x=0.4$ and $y=1.2$.}
\label{figslicexy}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
Expand Down Expand Up @@ -828,6 +832,19 @@ \section{Slices}
\label{figfedslicetest}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{ccp{1.0in}}
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_slice_00}\\
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_slice_10}\\
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_slice_30}\\
&&\raisebox{0.5in}[0pt]{\includegraphics[height=7.5in]{\SMVfigdir/colorbar_20_620}}\\
\end{tabular}
\end{center}
\caption[A shaded 3D slice files]{A shaded 3D slice files at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.}
\label{figslice3D}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
Expand Down Expand Up @@ -878,10 +895,14 @@ \section{Vector Slices}
The test cases consist of three meshes with different resolutions. With the uniform option selected, vector
skipping is set in each mesh so that vectors are spaced uniformly.

Figure \ref{figvslice3D} presents images of 3D vector slices oriented in XY, XY and YZ planes.
Images are drawn at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.

Figure \ref{figvgslicetest} presents images of 3D vector slices oriented in two different
ways. Images are drawn at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.



\begin{figure}[bph]
\begin{center}
\begin{tabular}{ccl}
Expand Down Expand Up @@ -934,6 +955,19 @@ \section{Vector Slices}
\label{figvsliceuniformz}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{ccp{1.0in}}
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_vslice_00}\\
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_vslice_10}\\
\includegraphics[height=\figheightE]{SCRIPT_FIGURES/mplume5c8_vslice_30}\\
&&\raisebox{0.5in}[0pt]{\includegraphics[height=7.5in]{\SMVfigdir/colorbar_20_620}}\\
\end{tabular}
\end{center}
\caption[A test showing 3D vector slice data]{A test showing 3D vector slice data at \SI{0}{s}, \SI{10}{s} and \SI{30}{s}.}
\label{figvslice3D}%
\end{figure}

\begin{figure}[bph]
\begin{center}
\begin{tabular}{cccp{1.0in}}
Expand Down
2 changes: 1 addition & 1 deletion Source/smokebot_trigger.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
master: dummy text to trigger smokebot
master: dummy text to trigger smokebot
devel: dummy text to trigger smokebot
devel2: dummy text to trigger smokebot
test: dummy text to trigger smokebot
10 changes: 6 additions & 4 deletions Source/smokeview/IOslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1994,10 +1994,12 @@ int SliceCompare( const void *arg1, const void *arg2 ){
if(strcmp(slicei->label.longlabel,slicej->label.longlabel)>0)return 1;
if(slicei->volslice==1&&slicej->volslice==0)return -1;
if(slicei->volslice==0&&slicej->volslice==1)return 1;
if(slicei->idir<slicej->idir)return -1;
if(slicei->idir>slicej->idir)return 1;
if(slicei->position_orig<slicej->position_orig)return -1;
if(slicei->position_orig>slicej->position_orig)return 1;
if(slicei->volslice==0){
if(slicei->idir<slicej->idir)return -1;
if(slicei->idir>slicej->idir)return 1;
if(slicei->position_orig<slicej->position_orig)return -1;
if(slicei->position_orig>slicej->position_orig)return 1;
}
if(slicei->slice_filetype<slicej->slice_filetype)return -1;
if(slicei->slice_filetype>slicej->slice_filetype)return 1;
if(slicei->slcf_index<slicej->slcf_index)return -1;
Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -7927,7 +7927,7 @@ void InitUnloadMultiSliceMenu(int *unloadmultislicemenuptr){
glutAddMenuEntry(_("Unload all"), UNLOAD_ALL);
}

/* ------f------------ InitLoadMultiSubMenu ------------------------ */
/* ------------------ InitLoadMultiSubMenu ------------------------ */

void InitLoadMultiSubMenu(int **loadsubmslicemenuptr, int *nmultisliceloadedptr){
int i, *loadsubmslicemenu, nloadsubmslicemenu;
Expand Down
36 changes: 34 additions & 2 deletions Verification/Visualization/mplume5c8.ssf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,37 @@
RENDERDIR
..\..\Manuals\SMV_Verification_Guide\SCRIPT_FIGURES



UNLOADALL
LOADINIFILE
mplume5c8_sl3d.ini
LOADSLCF
QUANTITY='TEMPERATURE', PB3D=T
SETTIMEVAL
0
RENDERONCE
mplume5c8_slice_00
SETTIMEVAL
10
RENDERONCE
mplume5c8_slice_10
SETTIMEVAL
30
RENDERONCE
mplume5c8_slice_30
UNLOADALL
LOADINIFILE
mplume5c8_sl3d.ini
LOADSLCF
QUANTITY='TEMPERATURE', PB3D=T VECTOR=T
SETTIMEVAL
0
RENDERONCE
mplume5c8_vslice_00
SETTIMEVAL
10
RENDERONCE
mplume5c8_vslice_10
SETTIMEVAL
30
RENDERONCE
mplume5c8_vslice_30
Loading

0 comments on commit 796b08e

Please sign in to comment.