[cig-commits] r19020 - short/3D/PyLith/benchmarks/trunk/static/performance/solvertest

brad at geodynamics.org brad at geodynamics.org
Wed Oct 5 16:19:43 PDT 2011


Author: brad
Date: 2011-10-05 16:19:43 -0700 (Wed, 05 Oct 2011)
New Revision: 19020

Added:
   short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/calc_error.py
   short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh
Log:
Added utility scripts.

Added: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/calc_error.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/calc_error.py	                        (rev 0)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/calc_error.py	2011-10-05 23:19:43 UTC (rev 19020)
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+# Calculate error in solution field and fault tractions.
+
+test = "stable_tol8"
+base = "stable_smalltol"
+
+import tables
+import numpy
+
+h5 = tables.openFile("output/%s.h5" % base, "r")
+solnBase = h5.root.vertex_fields.displacement[:]
+h5.close()
+
+h5 = tables.openFile("output/%s.h5" % test, "a")
+solnTest = h5.root.vertex_fields.displacement[:]
+
+solnDiff = solnBase - solnTest
+if "/vertex_fields/displacement_error" in h5:
+    h5.removeNode("/vertex_fields/displacement_error")
+h5.createArray("/vertex_fields", "displacement_error", solnDiff)
+h5.copyNodeAttrs("/vertex_fields/displacement", 
+                 "/vertex_fields/displacement_error")
+h5.close()


Property changes on: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/calc_error.py
___________________________________________________________________
Name: svn:executable
   + *

Added: short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh
===================================================================
--- short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh	                        (rev 0)
+++ short/3D/PyLith/benchmarks/trunk/static/performance/solvertest/run_convtest.sh	2011-10-05 23:19:43 UTC (rev 19020)
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ $# != 1 ]; then
+  echo "Usage: runconvtest.sh VERSION"
+  exit 1
+fi
+
+ver=$1
+
+# Small tolerance w/ASM
+sim=${ver}_smalltol
+pylith hex8.cfg asm.cfg --petsc.ksp_rtol=1.0e-18 >& ${sim}.log
+cd output; changeprefix hex8 ${sim}; cd ../
+
+# Field split w/custom, PC rtol=1.0e-6
+sim=${ver}_tol6
+pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-6  >& ${sim}.log
+cd output; changeprefix hex8 ${sim}; cd ../
+
+# Field split w/custom, PC rtol=1.0e-7
+sim=${ver}_tol7
+pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-7  >& ${sim}.log
+cd output; changeprefix hex8 ${sim}; cd ../
+
+# Field split w/custom, PC rtol=1.0e-8
+sim=${ver}_tol8
+pylith hex8.cfg fieldsplit.cfg custompc.cfg --petsc.ksp_rtol=1.0e-8  >& ${sim}.log
+cd output; changeprefix hex8 ${sim}; cd ../



More information about the CIG-COMMITS mailing list