~ubuntu-branches/ubuntu/maverick/dolfin/maverick

« back to all changes in this revision

Viewing changes to bench/ode/reaction/bench-tol.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2008-09-16 08:41:20 UTC
  • Revision ID: james.westby@ubuntu.com-20080916084120-i8k3u6lhx3mw3py3
Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
#
 
3
# Copyright (C) 2005-2008 Anders Logg.
 
4
# Licensed under the GNU LGPL Version 2.1.
 
5
#
 
6
# Run benchmarks for varying tolerance
 
7
 
 
8
from os import system
 
9
from shutil import copy, move
 
10
from benchutil import *
 
11
 
 
12
# Log file
 
13
logfile = "bench-tol.log"
 
14
 
 
15
# Parameter set for benchmarks
 
16
tols  = [1e-4, 5e-5, 1e-5, 5e-6, 1e-6, 5e-7, 1e-7, 5e-8]
 
17
sizes = [1000]
 
18
 
 
19
# Write version and date to log file
 
20
system("pkg-config --modversion dolfin >> " + logfile)
 
21
system("date +'%Y-%m-%d %H:%M:%S' >> " + logfile)
 
22
system("uname -snm >> " + logfile)
 
23
file = open(logfile, "a")
 
24
file.write("\n");
 
25
 
 
26
# Run sets of benchmarks
 
27
run_set("cg",  "fixed-point", tols, sizes, logfile)
 
28
run_set("mcg", "fixed-point", tols, sizes, logfile)
 
29
#run_set("cg",  "newton",      tols, sizes, logfile)
 
30
#run_set("mcg", "newton",      tols, sizes, logfile)
 
31
 
 
32
file.write("\n");
 
33
file.write("---------------------------------------------------------------------------------------\n")