diff --git a/Manuals/SMV_User_Guide/GetUserFigures.sh b/Manuals/SMV_User_Guide/GetFigures.sh similarity index 54% rename from Manuals/SMV_User_Guide/GetUserFigures.sh rename to Manuals/SMV_User_Guide/GetFigures.sh index e8c4b2dcdc..e2456b42cc 100755 --- a/Manuals/SMV_User_Guide/GetUserFigures.sh +++ b/Manuals/SMV_User_Guide/GetFigures.sh @@ -1,3 +1,3 @@ #!/bin/bash cd ../scripts -./GetFigures.sh -s -u +./GetFigures.sh diff --git a/Manuals/SMV_User_Guide/SMV_User_Guide.tex b/Manuals/SMV_User_Guide/SMV_User_Guide.tex index dfae5d45d6..b67e0b5147 100644 --- a/Manuals/SMV_User_Guide/SMV_User_Guide.tex +++ b/Manuals/SMV_User_Guide/SMV_User_Guide.tex @@ -597,7 +597,7 @@ \subsection{Automating the Visualization} \subsubsection{Virtual Tour}\ A series of checkpoints or keyframes specifying position and view direction may be specified. (Chapter \ref{chapter:touring}) A smooth path is computed using -Kochanek-Bartels splines~\cite{Moller:02}\ to go through these key +Kochanek-Bartels splines~\cite{moller:02}\ to go through these key frames so that one may control the position and view direction of an observer as they move through the simulation. One can then see the simulation as the observer would. This option is available diff --git a/Manuals/SMV_User_Guide/copy_SMV_figures_local.sh b/Manuals/SMV_User_Guide/copy_SMV_figures_local.sh deleted file mode 100755 index ebdcd45e81..0000000000 --- a/Manuals/SMV_User_Guide/copy_SMV_figures_local.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -ROOTDIR=$1 - -CURDIR=`pwd` -FROM_SMVVGDIR=$ROOTDIR/SMV_Verification_Guide/SCRIPT_FIGURES -FROM_SMVUGDIR=$ROOTDIR/SMV_User_Guide/SCRIPT_FIGURES - -cd SCRIPT_FIGURES -TO_SMVUGDIR=`pwd` - -cd $CURDIR -cd ../SMV_Verification_Guide/SCRIPT_FIGURES -TO_SMVVGDIR=`pwd` - -cd $CURDIR - -if [ -d $FROM_SMUVGDIR ]; then - cp $FROM_SMVUGDIR/* $TO_SMVUGDIR/. - echo User Guide figures copied -else - echo $FROM_SMVUGDIR does not exist -fi -if [ -d $FROM_SMVVGDIR ]; then - cp $FROM_SMVVGDIR/* $TO_SMVVGDIR/. - echo Verification Guide figures copied -else - echo $FROM_SMVVGDIR does not exist -fi diff --git a/Manuals/SMV_User_Guide/make_guide.sh b/Manuals/SMV_User_Guide/make_guide.sh index 439fd04754..655dd58819 100755 --- a/Manuals/SMV_User_Guide/make_guide.sh +++ b/Manuals/SMV_User_Guide/make_guide.sh @@ -11,9 +11,10 @@ gitrevision=`git describe --abbrev=7 --long --dirty` echo "\\newcommand{\\gitrevision}{$gitrevision}" > ../Bibliography/gitrevision.tex pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err -biber SMV_User_Guide &> SMV_User_Guide.err +biber SMV_User_Guide &> SMV_User_Guide_biber.err pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err +cat SMV_User_Guide_biber.err >> SMV_User_Guide.err # Scan and report any errors in the LaTeX build process if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Paragraph ended before|Missing \\\$ inserted|Misplaced" -I SMV_User_Guide.err | grep -v "xpdf supports version 1.5"` == "" ]] @@ -27,13 +28,13 @@ if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Par fi # Check for LaTeX warnings (undefined references or duplicate labels) -if [[ `grep -E "undefined|multiply defined|multiply-defined" -I SMV_User_Guide.err` == "" ]] +if [[ `grep -E "undefined|WARN|multiply defined|multiply-defined" -I SMV_User_Guide.err` == "" ]] then # Continue along : else echo "LaTeX warnings detected:" - grep -E "undefined|multiply defined|multiply-defined" -I SMV_User_Guide.err + grep -E "undefined|WARN|multiply defined|multiply-defined" -I SMV_User_Guide.err clean_build=0 fi diff --git a/Manuals/SMV_Verification_Guide/GetVerFigures.sh b/Manuals/SMV_Verification_Guide/GetFigures.sh similarity index 54% rename from Manuals/SMV_Verification_Guide/GetVerFigures.sh rename to Manuals/SMV_Verification_Guide/GetFigures.sh index d5b8686faf..e2456b42cc 100755 --- a/Manuals/SMV_Verification_Guide/GetVerFigures.sh +++ b/Manuals/SMV_Verification_Guide/GetFigures.sh @@ -1,3 +1,3 @@ #!/bin/bash cd ../scripts -./GetFigures.sh -s -v +./GetFigures.sh diff --git a/Manuals/SMV_Verification_Guide/make_guide.sh b/Manuals/SMV_Verification_Guide/make_guide.sh index 64651d901e..bb4cc4c972 100755 --- a/Manuals/SMV_Verification_Guide/make_guide.sh +++ b/Manuals/SMV_Verification_Guide/make_guide.sh @@ -11,9 +11,10 @@ gitrevision=`git describe --abbrev=7 --long --dirty` echo "\\newcommand{\\gitrevision}{$gitrevision}" > ../Bibliography/gitrevision.tex pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err -biber SMV_Verification_Guide &> SMV_Verification_Guide.err +biber SMV_Verification_Guide &> SMV_Verification_Guide_biber.err pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err +cat SMV_Verification_Guide_biber.err >> SMV_Verification_Guide.err # Scan and report any errors in the LaTeX build process if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Paragraph ended before|Missing \\\$ inserted|Misplaced" -I SMV_Verification_Guide.err | grep -v "xpdf supports version 1.5"` == "" ]] @@ -27,13 +28,13 @@ if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Par fi # Check for LaTeX warnings (undefined references or duplicate labels) -if [[ `grep -E "undefined|multiply defined|multiply-defined" -I SMV_Verification_Guide.err` == "" ]] +if [[ `grep -E "undefined|WARNING|multiply defined|multiply-defined" -I SMV_Verification_Guide.err` == "" ]] then # Continue along : else echo "LaTeX warnings detected:" - grep -E "undefined|multiply defined|multiply-defined" -I SMV_Verification_Guide.err + grep -E "undefined|WARNING|multiply defined|multiply-defined" -I SMV_Verification_Guide.err clean_build=0 fi diff --git a/Manuals/scripts/Copy_Smokebot_FiguresGH.sh b/Manuals/scripts/Copy_Smokebot_FiguresGH.sh deleted file mode 100755 index e12f642472..0000000000 --- a/Manuals/scripts/Copy_Smokebot_FiguresGH.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -DOWNLOADFIGURES () -{ - FILE=$1_figures - echo ***Downloading $FILE.tar.gz - gh release download SMOKEVIEW_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber - if [ ! -e $FILE.tar.gz ]; then - echo ***error: $FILE.tar.gz failed to download - echo command: gh release download FDS_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber - else - echo " successful" - fi -} -DOWNLOADFIGURES SMV_UG -DOWNLOADFIGURES SMV_VG - -SCRIPTDIR=`pwd` -cd .. -MANDIR=`pwd` - -cd $SCRIPTDIR -rm -rf FIGS -mkdir FIGS -mkdir FIGS/SMV_UG -mkdir FIGS/SMV_VG - -SBUG=$SCRIPTDIR/FIGS/SMV_UG -SBVG=$SCRIPTDIR/FIGS/SMV_VG - -# Copy User's Guide Figures -if [ -e $SCRIPTDIR/SMV_UG_figures.tar.gz ]; then - cd $SBUG - tar xf $SCRIPTDIR/SMV_UG_figures.tar.gz - cp * $MANDIR/SMV_User_Guide/SCRIPT_FIGURES/ - echo Smokeview Users Guide figures copied to SMV_User_Guide/SCRIPT_FIGURES -fi - -# Copy Verification Guide Figures -if [ -e $SCRIPTDIR/SMV_VG_figures.tar.gz ]; then - cd $SBVG - tar xf $SCRIPTDIR/SMV_VG_figures.tar.gz - cp * $MANDIR/SMV_Verification_Guide/SCRIPT_FIGURES/. - echo SMV Verification Guide figures copied to SMV_Verification_Guide_Guide/SCRIPT_FIGURES -fi diff --git a/Manuals/scripts/GetFigures.sh b/Manuals/scripts/GetFigures.sh old mode 100644 new mode 100755 index ba2ffebfbf..e12f642472 --- a/Manuals/scripts/GetFigures.sh +++ b/Manuals/scripts/GetFigures.sh @@ -1,196 +1,44 @@ #!/bin/bash -GH_OWNER=firemodels -GH_REPO=test_bundles - -#--------------------------------------------- -# usage -#--------------------------------------------- - -function usage { -echo "Usage:" -echo "GetFigures.sh options" -echo "" -echo "Download FDS and/or Smokeview manual figures from github and copy to their" -echo "respecitve manual SCRIPT_DIRS directories" -echo "" -echo "./GetFigures.sh -a download all FDS and smokeview figures" -echo "./GetFigures.sh -F download all FDS figures" -echo "./GetFigures.sh -S download all Smokeview figures" -echo "" -echo "Options:" -echo "-a - copy all FDS and Smokeview manual figures" -echo "-f - copy FDS figures for manuals specified by -u, -v, -V and or -t options" -echo "-F - copy FDS figures for all guides" -echo "-h - display this message" -echo "-f - copy Smokeview figures for manuals specified by -u and/or -v options" -echo "-S - copy Smokeview figures for both user and verification guides" -echo "-t - copy FDS technical guide figures" -echo "-u - copy user guide figures (also specify either -f or -s)" -echo "-v - copy verification guide figures (also specify either -f or -s)" -echo "-V - copy FDS validation guide figures" -exit 0 -} - -#*** parse command line options - -FDS= -SMV= -USE= -VER= -VAL= -TECH= -while getopts 'afFhsStuvV' OPTION -do -case $OPTION in - a) - FDS=1 - SMV=1 - USE=1 - VER=1 - VAL=1 - TECH=1 - ;; - f) - FDS=1 - ;; - F) - FDS=1 - USE=1 - VER=1 - VAL=1 - TECH=1 - ;; - h) - usage; - ;; - s) - SMV=1 - ;; - S) - SMV=1 - USE=1 - VER=1 - ;; - t) - FDS=1 - TECH=1 - ;; - u) - USE=1 - ;; - v) - VER=1 - ;; - V) - FDS=1 - VAL=1 - ;; - \?) - echo "***error: unknown option entered. aborting firebot" - exit 1 - ;; -esac -done -shift $(($OPTIND-1)) - -if [[ "$FDS" == "" ]] && [[ "$SMV" == "" ]]; then - FDS=1 -fi - -if [ "SMV" != "" ]; then - if [[ "$USE" == "" ]] && [[ "$VER" == "" ]]; then - USE=1 - fi -fi - -if [ "FDS" != "" ]; then - if [[ "$USE" == "" ]] && [[ "$VER" == "" ]] && [[ "$VAL" == "" ]] && [[ "$TECH" == "" ]]; then - USE=1 - fi -fi - -CURDIR=`pwd` - -cd files -FILESDIR=`pwd` - -git clean -dxf >& /dev/null - -cd $CURDIR - -DOWNLOADFILE () +DOWNLOADFIGURES () { - TAG=$1 - FILE=$2 - echo "" - echo downloading $FILE using: - echo gh release download $TAG -p $FILE -D $FILESDIR -R github.com/$GH_OWNER/$GH_REPO - gh release download $TAG -p $FILE -D $FILESDIR -R github.com/$GH_OWNER/$GH_REPO -} - -COPYFILES () -{ - TODIR=$1 - FILE=$2 - if [ -d $TODIR ]; then - echo "untarring $FILE to $TODIR" - cd $TODIR - if [ -e $FILESDIR/$FILE ]; then - tar xf $FILESDIR/$FILE > /dev/null 2>&1 - else - echo "***error: $FILESDIR/$FILE does not exist" - fi + FILE=$1_figures + echo ***Downloading $FILE.tar.gz + gh release download SMOKEVIEW_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber + if [ ! -e $FILE.tar.gz ]; then + echo ***error: $FILE.tar.gz failed to download + echo command: gh release download FDS_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber else - echo ***error: $TODIR does not exist + echo " successful" fi } - -ROOT=../../.. -cd $ROOT -ROOT=`pwd` - -SMVREPO=$ROOT/smv -cd $SMVREPO -SMVREPO=`pwd` -cd $CURDIR - -if [ "$SMV" != "" ]; then - if [ "$USE" != "" ]; then - DOWNLOADFILE SMOKEVIEW_TEST SMV_UG_figures.tar.gz - COPYFILES $SMVREPO//Manuals/SMV_User_Guide/SCRIPT_FIGURES SMV_UG_figures.tar.gz - fi - - if [ "$VER" != "" ]; then - DOWNLOADFILE SMOKEVIEW_TEST SMV_VG_figures.tar.gz - COPYFILES $SMVREPO/Manuals/SMV_Verification_Guide/SCRIPT_FIGURES SMV_VG_figures.tar.gz - fi +DOWNLOADFIGURES SMV_UG +DOWNLOADFIGURES SMV_VG + +SCRIPTDIR=`pwd` +cd .. +MANDIR=`pwd` + +cd $SCRIPTDIR +rm -rf FIGS +mkdir FIGS +mkdir FIGS/SMV_UG +mkdir FIGS/SMV_VG + +SBUG=$SCRIPTDIR/FIGS/SMV_UG +SBVG=$SCRIPTDIR/FIGS/SMV_VG + +# Copy User's Guide Figures +if [ -e $SCRIPTDIR/SMV_UG_figures.tar.gz ]; then + cd $SBUG + tar xf $SCRIPTDIR/SMV_UG_figures.tar.gz + cp * $MANDIR/SMV_User_Guide/SCRIPT_FIGURES/ + echo Smokeview Users Guide figures copied to SMV_User_Guide/SCRIPT_FIGURES fi -FDSREPO=$ROOT/fds -cd $FDSREPO -FDSREPO=`pwd` -cd $CURDIR - -if [ "$FDS" != "" ]; then - if [ "$USE" != "" ]; then - DOWNLOADFILE FDS_TEST FDS_UG_figures.tar.gz - COPYFILES $FDSREPO/Manuals/FDS_User_Guide/SCRIPT_FIGURES FDS_UG_figures.tar.gz - fi - - if [ "$TECH" != "" ]; then - DOWNLOADFILE FDS_TEST FDS_TG_figures.tar.gz - COPYFILES $FDSREPO/Manuals/FDS_Technical_Reference_Guide/SCRIPT_FIGURES FDS_TG_figures.tar.gz - fi - - if [ "$VER" != "" ]; then - DOWNLOADFILE FDS_TEST FDS_VERG_figures.tar.gz - COPYFILES $FDSREPO/Manuals/FDS_Verification_Guide/SCRIPT_FIGURES FDS_VERG_figures.tar.gz - fi - - if [ "$VAL" != "" ]; then - DOWNLOADFILE FDS_TEST FDS_VALG_figures.tar.gz - COPYFILES $FDSREPO/Manuals/FDS_Validation_Guide/SCRIPT_FIGURES FDS_VALG_figures.tar.gz - fi +# Copy Verification Guide Figures +if [ -e $SCRIPTDIR/SMV_VG_figures.tar.gz ]; then + cd $SBVG + tar xf $SCRIPTDIR/SMV_VG_figures.tar.gz + cp * $MANDIR/SMV_Verification_Guide/SCRIPT_FIGURES/. + echo SMV Verification Guide figures copied to SMV_Verification_Guide_Guide/SCRIPT_FIGURES fi -cd $CURDIR -exit 0 diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c index d45bd0c43a..8e92ce43cb 100644 --- a/Source/smokeview/readsmv.c +++ b/Source/smokeview/readsmv.c @@ -1714,8 +1714,7 @@ void InitCellMeshInfo(void){ int i, *nxyz, ntotal; float *xyzminmax, *dxyz; float *x, *y, *z; - meshdata **cellmeshes; - + meshdata **cellmeshes, *mesh0; if(cellmeshinfo!=NULL){ nxyz = cellmeshinfo->nxyz; ntotal = nxyz[0]*nxyz[1]*nxyz[2]; @@ -1734,19 +1733,20 @@ void InitCellMeshInfo(void){ dxyz = cellmeshinfo->dxyz; nxyz = cellmeshinfo->nxyz; - x = global_scase.meshescoll.meshinfo->xplt_fds; - y = global_scase.meshescoll.meshinfo->yplt_fds; - z = global_scase.meshescoll.meshinfo->zplt_fds; + mesh0 = global_scase.meshescoll.meshinfo; + x = mesh0->xplt_fds; + y = mesh0->yplt_fds; + z = mesh0->zplt_fds; xyzminmax[0] = x[0]; - xyzminmax[1] = x[global_scase.meshescoll.meshinfo->ibar]; + xyzminmax[1] = x[mesh0->ibar]; xyzminmax[2] = y[0]; - xyzminmax[3] = y[global_scase.meshescoll.meshinfo->jbar]; + xyzminmax[3] = y[mesh0->jbar]; xyzminmax[4] = z[0]; - xyzminmax[5] = z[global_scase.meshescoll.meshinfo->kbar]; - dxyz[0] = x[global_scase.meshescoll.meshinfo->ibar] - x[0]; - dxyz[1] = y[global_scase.meshescoll.meshinfo->jbar] - y[0]; - dxyz[2] = z[global_scase.meshescoll.meshinfo->kbar] - z[0]; + xyzminmax[5] = z[mesh0->kbar]; + dxyz[0] = x[mesh0->ibar] - x[0]; + dxyz[1] = y[mesh0->jbar] - y[0]; + dxyz[2] = z[mesh0->kbar] - z[0]; for(i = 1; izplt_fds; xyzminmax[0] = MIN(xyzminmax[0], x[0]); - xyzminmax[1] = MAX(xyzminmax[1], x[global_scase.meshescoll.meshinfo->ibar]); + xyzminmax[1] = MAX(xyzminmax[1], x[meshi->ibar]); xyzminmax[2] = MIN(xyzminmax[2], y[0]); - xyzminmax[3] = MAX(xyzminmax[3], y[global_scase.meshescoll.meshinfo->jbar]); + xyzminmax[3] = MAX(xyzminmax[3], y[meshi->jbar]); xyzminmax[4] = MIN(xyzminmax[4], z[0]); - xyzminmax[5] = MAX(xyzminmax[5], z[global_scase.meshescoll.meshinfo->kbar]); - dxyz[0] = MIN(dxyz[0], x[global_scase.meshescoll.meshinfo->ibar] - x[0]); - dxyz[1] = MIN(dxyz[1], y[global_scase.meshescoll.meshinfo->jbar] - y[0]); - dxyz[2] = MIN(dxyz[2], z[global_scase.meshescoll.meshinfo->kbar] - z[0]); + xyzminmax[5] = MAX(xyzminmax[5], z[meshi->kbar]); + dxyz[0] = MIN(dxyz[0], x[meshi->ibar] - x[0]); + dxyz[1] = MIN(dxyz[1], y[meshi->jbar] - y[0]); + dxyz[2] = MIN(dxyz[2], z[meshi->kbar] - z[0]); } dxyz[0] /= (float)CELLMESH_FACTOR; dxyz[1] /= (float)CELLMESH_FACTOR;