diff --git a/done.txt b/done.txt index 344832ae21046d40f47702000ab8b31d0128114b..e1765211012274ecc357fd396c7df0309effc3a2 100644 --- a/done.txt +++ b/done.txt @@ -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 diff --git a/tests/test_interpolation.py b/tests/test_interpolation.py index 928ae115370019c6b32a8720efddb77376d86a09..29755bd6a5207c322c7e442df89be28b7a996543 100644 --- a/tests/test_interpolation.py +++ b/tests/test_interpolation.py @@ -1,4 +1,3 @@ -#! /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() diff --git a/todo.txt b/todo.txt index 2356510f3170e2841465fa2231af6b11411fcd5b..a5a346cfa667d3a4192c733f4c786084ee9fa9a7 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,4 @@ (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 diff --git a/tox_interpolation.ini b/tox_interpolation.ini deleted file mode 100644 index 71b94b2220f43496050b09855cf7e41b9e2da51e..0000000000000000000000000000000000000000 --- a/tox_interpolation.ini +++ /dev/null @@ -1,21 +0,0 @@ -[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 -