Skip to content
Snippets Groups Projects
Commit 06b9baee authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Rewrite the testsuite in Python

Having it in bash was starting to be a pain.  This particular testsuite uses
a bit of arithmetic, which was difficult to do in bash, but trivial in Python.
parent 7f9fe977
No related branches found
No related tags found
No related merge requests found
Pipeline #
import subprocess
for order in range(1,4):
minLevel = 5 + 1 - order;
maxLevel = 10 + 1 - order;
processList = []
for numLevels in range(minLevel,maxLevel+1):
subprocess.call(["echo", "foo"])
LOGFILE = "./harmonicmaps_" + str(order) + "_" + str(numLevels) + ".log"
## run the actual simulation
executable = "./harmonicmaps-" + str(order)
p = subprocess.Popen([executable, "harmonicmaps-skyrmions-hexagon.parset", "-numLevels", str(numLevels)])
processList.append(p)
exit_codes = [p.wait() for p in processList]
subprocess.call(["echo", "Now measuring errors"])
for numLevels in range(minLevel,maxLevel+1):
# Measure the discretization errors against the solution on the finest grid
LOGFILE = "./compute-disc-error_" + str(order) + "_" + str(numLevels) + ".log"
subprocess.Popen(["../build-cmake/src/compute-disc-error", "compute-disc-error-skyrmions-hexagon.parset",
"-order", str(order),
"-numLevels", str(numLevels),
"-numReferenceLevels", str(maxLevel),
"-simulationData", "harmonicmaps-result-" + str(order) + "-" + str(numLevels) + ".data",
"-referenceData", "harmonicmaps-result-" + str(order) + "-" + str(maxLevel) + ".data"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment