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
4b2d5307
Commit
4b2d5307
authored
Dec 26, 2015
by
Cristian Lalescu
Browse files
fix interpolation comparison
parent
f4ce2f1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
done.txt
View file @
4b2d5307
...
...
@@ -3,3 +3,4 @@ x 2015-12-23 decide on versioning system
x 2015-12-24 move get_grid coords to interpolator @optimization +v1.0
x 2015-12-25 get rid of temporal interpolation @optimization +v1.0
x 2015-12-26 call interpolation only when needed @optimization +v1.0
x 2015-12-26 clean up tox files, make sure all tests run @tests +v1.0
tests/test_interpolation.py
View file @
4b2d5307
#! /usr/bin/env python2
#######################################################################
# #
# Copyright 2015 Max Planck Institute #
...
...
@@ -26,35 +25,44 @@
import
numpy
as
np
from
test_
base
import
*
from
base
import
*
import
matplotlib.pyplot
as
plt
class
test_interpolation
(
bfps
.
NavierStokes
):
def
__init__
(
self
,
name
=
'test_interpolation'
,
work_dir
=
'./'
,
simname
=
'test'
):
super
(
test_interpolation
,
self
).
__init__
(
work_dir
=
work_dir
,
simname
=
simname
,
name
=
name
,
frozen_fields
=
True
)
return
None
if
__name__
==
'__main__'
:
opt
=
parser
.
parse_args
()
c
=
test_interpolation
(
work_dir
=
opt
.
work_dir
+
'/io'
)
opt
=
parser
.
parse_args
(
[
'-n'
,
'32'
,
'--run'
,
'--ncpu'
,
'2'
,
'--initialize'
,
'--neighbours'
,
'4'
,
'--smoothness'
,
'1'
,
'--nparticles'
,
'4225'
,
'--niter_todo'
,
'1'
,
'--niter_stat'
,
'1'
,
'--niter_part'
,
'1'
,
'--niter_out'
,
'1'
,
'--wd'
,
'interp'
]
+
sys
.
argv
[
1
:])
c
=
bfps
.
NavierStokes
(
name
=
'test_interpolation'
,
use_fftw_wisdom
=
False
,
frozen_fields
=
True
)
c
.
pars_from_namespace
(
opt
)
c
.
fill_up_fluid_code
()
c
.
add_particle_fields
(
name
=
'n{0}m{1}'
.
format
(
opt
.
neighbours
,
opt
.
smoothness
),
neighbours
=
opt
.
neighbours
,
smoothness
=
opt
.
smoothness
)
c
.
add_particle_fields
(
name
=
'n{0}'
.
format
(
opt
.
neighbours
),
neighbours
=
opt
.
neighbours
,
interp_type
=
'Lagrange'
)
c
.
add_particles
(
integration_steps
=
1
,
neighbours
=
4
,
smoothness
=
1
)
fields_name
=
'n{0}m{1}'
.
format
(
opt
.
neighbours
,
opt
.
smoothness
))
c
.
add_particles
(
integration_steps
=
1
,
neighbours
=
4
,
interp_type
=
'Lagrange'
)
c
.
fill_up_fluid_code
()
fields_name
=
'n{0}'
.
format
(
opt
.
neighbours
))
c
.
finalize_code
()
c
.
write_src
()
c
.
write_par
()
...
...
todo.txt
View file @
4b2d5307
(B) FFTW interpolator doesn't need its own field @optimization +v1.0
(B) clean up tox files, make sure all tests run @tests +v1.0
(B) compute z polynomials only when needed @optimization +v1.0
(B) use less memory @optimization
(B) split library into core and extra @optimization +v1.0
...
...
tox_interpolation.ini
deleted
100644 → 0
View file @
f4ce2f1f
[tox]
envlist
=
py27
[testenv]
whitelist_externals
=
echo
cp
passenv
=
LD_LIBRARY_PATH
changedir
=
{envtmpdir}
commands
=
cp
-r
{toxinidir}/tests
{envtmpdir}
python
tests/test_interpolation.py
\
-n
32
--ncpu
2
\
--initialize
\
--nparticles
4225
\
--niter_todo
1
\
--niter_stat
1
\
--niter_part
1
\
--niter_out
1
\
--run
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