[cig-commits] r13847 - cs/cigma/trunk

luis at geodynamics.org luis at geodynamics.org
Mon Jan 12 14:10:18 PST 2009


Author: luis
Date: 2009-01-12 14:10:17 -0800 (Mon, 12 Jan 2009)
New Revision: 13847

Modified:
   cs/cigma/trunk/quick.sh
Log:
Added -l option to quick.sh, which lists all tests in the script.

Also changed the output filenames so they can be used in stages.

Modified: cs/cigma/trunk/quick.sh
===================================================================
--- cs/cigma/trunk/quick.sh	2009-01-12 22:10:15 UTC (rev 13846)
+++ cs/cigma/trunk/quick.sh	2009-01-12 22:10:17 UTC (rev 13847)
@@ -33,11 +33,14 @@
 #
 
 t=0
-while getopts 'ht:' OPTION; do
+while getopts 'hlt:' OPTION; do
     case $OPTION in
         h) printf "Usage: %s [-t <TEST-ID>] -- <TEST-OPTS>\n" $(basename $0) >&2
            exit 255
            ;;
+        l) grep '^#t' $0 | sed 's/#t=//g'
+           exit 0
+           ;;
         t) t="$OPTARG" ;;
         *) ;;
     esac
@@ -53,10 +56,15 @@
 
 ###############################################################################
 #
-# Actual list of tests. The shell variable $t should be set above, from the
-# command line options.
+# Now, for the actual list of tests. The shell variable $t should be set above,
+# from the command line options. While the commented-out assignment preceding
+# each of the if-statements may appear useless, it is actually used by the -l
+# option to this script (which parses itself to list all possible $t values).
 #
 
+###############################################################################
+
+
 #t=1000
 if [ $t = 1000 ]; then
     set -x
@@ -104,8 +112,8 @@
     A=$D/brick1
     B=$D/brick2
     cigma extract \
-        --mesh  $A/brick1.h5 \
-        --output foo.dat \
+        --mesh      $A/brick1.h5 \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -116,8 +124,8 @@
     A=$D/brick1
     B=$D/brick2
     cigma extract \
-        --mesh  $B/brick2.h5 \
-        --output foo.dat \
+        --mesh      $B/brick2.h5 \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -129,7 +137,7 @@
     B=$D/brick2
     cigma extract \
         --mesh      $A/brick1.exo \
-        --output    foo.dat \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -141,7 +149,7 @@
     B=$D/brick2
     cigma extract \
         --mesh      $B/brick2.exo \
-        --output    foo.dat \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -151,9 +159,9 @@
 if [ $t = 1020 ]; then
     set -x
     cigma extract \
-        --mesh  /home/luis/tmp/cigma_test3/geofest/cylinder1/extcyl1_01_0000.vtk \
-        --rule  $D/qr/rules.h5:/tet4/ord5 \
-        --output foo.dat \
+        --mesh      /home/luis/tmp/cigma_test3/geofest/cylinder1/extcyl1_01_0000.vtk \
+        --rule      $D/qr/rules.h5:/tet4/ord5 \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -162,8 +170,8 @@
 if [ $t = 1021 ]; then
     set -x
     cigma extract \
-        --mesh  /home/luis/tmp/cigma_test3/geofest/cylinder1/extcyl1_01_0000.vtk \
-        --output foo.dat \
+        --mesh      /home/luis/tmp/cigma_test3/geofest/cylinder1/extcyl1_01_0000.vtk \
+        --output    qpts.dat \
         $*
     exit $?
 fi
@@ -177,26 +185,38 @@
     A=$D/brick1
     B=$D/brick2
     cigma eval \
-        --field     'test.cube' \
-        --points    $A/brick1.h5:/coordinates  \
-        --output    cubefn.h5:/values \
+        --field     "test.cube" \
+        --points    "qpts.h5:/points" \
+        --output    "qvals.h5:/values" \
         $*
     exit $?
 fi
 
-#t=2001
-if [ $t = 2001 ]; then
+#t=2101
+if [ $t = 2101 ]; then
     set -x
     A=$D/brick1
     B=$D/brick2
     cigma eval \
-        --field     'test.cube' \
-        --points    qpts.h5:/points \
-        --output    qvals.h5:/values \
+        --field     "test.cube" \
+        --points    "$A/brick1.h5:/coordinates" \
+        --output    "test-cube.h5:/values" \
         $*
     exit $?
 fi
 
+#t=2102
+if [ $t = 2102 ]; then
+    set -x
+    A=$D/brick1
+    B=$D/brick2
+    cigma eval \
+        --field     "test.cube" \
+        --points    "$B/brick2.h5:/coordinates" \
+        --output    "test-cube.h5:/values" \
+        $*
+    exit $?
+fi
 
 ###############################################################################
 
@@ -218,7 +238,7 @@
         --mesh-coords           $A/coords.dat \
         --mesh-connect          $A/connect.dat \
         --mesh-cell             hex8 \
-        --output                CubeFn.dat \
+        --output                CubeCmp.dat \
         $*
     exit $?
 fi
@@ -237,7 +257,7 @@
         --second-mesh-coords    $B/coords.dat \
         --second-mesh-connect   $B/connect.dat \
         --second-mesh-cell      tet4 \
-        --output                CubeFn.dat \
+        --output                CubeCmp.dat \
         $*
     exit $?
 fi
@@ -260,7 +280,7 @@
         --second-mesh-coords    $B/brick2.h5:/coordinates \
         --second-mesh-connect   $B/brick2.h5:/connectivity \
         --second-mesh-cell      tet4 \
-        --output                CubeFn.h5 \
+        --output                CubeCmp.h5 \
         $*
     exit $?
 fi
@@ -277,7 +297,7 @@
         --second            $B/Data.h5:/Var/step0 \
         --second-mesh       $B/brick2.h5 \
         --second-mesh-cell  tet4 \
-        --output            CubeFn.h5 \
+        --output            CubeCmp.h5 \
         $*
     exit $?
 fi
@@ -292,7 +312,7 @@
         --first-mesh        $A/brick1.h5 \
         --second            $B/Data.h5:/Var/step0 \
         --second-mesh       $B/brick2.h5 \
-        --output            CubeFn.h5 \
+        --output            CubeCmp.h5 \
         $*
     exit $?
 fi
@@ -305,7 +325,7 @@
     cigma compare \
         --first             $A/Data.h5:/Var/step0 \
         --second            $B/Data.h5:/Var/step0 \
-        --output            CubeFn.h5 \
+        --output            CubeCmp.h5 \
         $*
     exit $?
 fi
@@ -318,7 +338,7 @@
     cigma compare \
         --first             $A/Data.h5:/Var/step0 \
         --second            $B/Data.h5:/Var/step0 \
-        --output            Compare.h5:/B1-B2/step0 \
+        --output            CubeCmp.h5:/B1-B2/step0 \
         $*
     exit $?
 fi



More information about the CIG-COMMITS mailing list