Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
f8d465ba
Commit
f8d465ba
authored
Dec 26, 2015
by
Cristian Lalescu
Browse files
update test_time_step
parent
3ce307aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/test_time_step.py
View file @
f8d465ba
#! /usr/bin/env python2
#######################################################################
# #
# Copyright 2015 Max Planck Institute #
...
...
@@ -30,7 +29,7 @@ import h5py
from
mpl_toolkits.mplot3d
import
axes3d
import
matplotlib.pyplot
as
plt
from
test_
base
import
*
from
base
import
*
def
convergence_test
(
opt
,
...
...
@@ -93,10 +92,19 @@ def convergence_test(
a
.
set_xscale
(
'log'
)
a
.
set_yscale
(
'log'
)
a
.
set_xlabel
(
'$
\\
|u
\\
|_
\\
infty
\\
frac{
\\
Delta t}{
\\
Delta x}$'
)
fig
.
savefig
(
'
spec
_err_vs_dt_{0}.pdf'
.
format
(
opt
.
precision
))
fig
.
savefig
(
'
vel
_err_vs_dt_{0}.pdf'
.
format
(
opt
.
precision
))
return
None
if
__name__
==
'__main__'
:
opt
=
parser
.
parse_args
()
opt
=
parser
.
parse_args
(
[
'-n'
,
'32'
,
'--run'
,
'--initialize'
,
'--ncpu'
,
'2'
,
'--nparticles'
,
'1000'
,
'--niter_todo'
,
'16'
,
'--precision'
,
'single'
,
'--wd'
,
'data/single'
]
+
sys
.
argv
[
1
:])
convergence_test
(
opt
,
launch
)
tox_time_step.ini
deleted
100644 → 0
View file @
3ce307aa
[tox]
envlist
=
py27
[testenv]
whitelist_externals
=
echo
cp
passenv
=
LD_LIBRARY_PATH
changedir
=
{envtmpdir}
commands
=
cp
-r
{toxinidir}/tests
{envtmpdir}
python
tests/test_time_step.py
\
-n
32
\
--run
\
--initialize
\
--ncpu
2
\
--nparticles
32
\
--niter_todo
16
\
--precision
single
\
--wd
"data/single"
python
tests/test_time_step.py
\
-n
32
\
--run
\
--initialize
\
--ncpu
2
\
--nparticles
32
\
--niter_todo
16
\
--precision
double
\
--wd
"data/double"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment