Commit f4ce2f1f authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

update pure particle test

parent f8d465ba
#! /usr/bin/env python2
#######################################################################
# #
# Copyright 2015 Max Planck Institute #
......@@ -25,7 +24,7 @@
from test_base import *
from base import *
class FrozenFieldParticles(bfps.NavierStokes):
def __init__(
......@@ -33,12 +32,16 @@ class FrozenFieldParticles(bfps.NavierStokes):
name = 'FrozenFieldParticles',
work_dir = './',
simname = 'test',
fluid_precision = 'single'):
frozen_fields = True,
fluid_precision = 'single',
use_fftw_wisdom = False):
super(FrozenFieldParticles, self).__init__(
name = name,
work_dir = work_dir,
simname = simname,
fluid_precision = fluid_precision)
fluid_precision = fluid_precision,
frozen_fields = frozen_fields,
use_fftw_wisdom = use_fftw_wisdom)
def fill_up_fluid_code(self):
self.fluid_includes += '#include <cstring>\n'
self.fluid_variables += 'fluid_solver<{0}> *fs;\n'.format(self.C_dtype)
......
......@@ -28,7 +28,7 @@
import numpy as np
import matplotlib.pyplot as plt
from test_base import *
from base import *
from test_frozen_field import FrozenFieldParticles
from test_convergence import convergence_test
......@@ -147,7 +147,17 @@ class err_finder:
return errlist
if __name__ == '__main__':
opt = parser.parse_args()
opt = parser.parse_args(
['-n', '16',
'--run',
'--initialize',
'--frozen',
'--ncpu', '2',
'--nparticles', '128',
'--niter_todo', '16',
'--precision', 'single',
'--wd', 'data/single'] +
sys.argv[1:])
if opt.precision == 'single':
dtype = np.complex64
elif opt.precision == 'double':
......
[tox]
envlist = py27
[testenv]
whitelist_externals =
echo
cp
passenv = LD_LIBRARY_PATH
changedir =
{envtmpdir}
commands =
cp -r {toxinidir}/tests {envtmpdir}
python tests/test_particles.py \
-n 16 \
--run \
--initialize \
--ncpu 2 \
--nparticles 32 \
--niter_todo 16 \
--precision single \
--wd "data/single"
python tests/test_particles.py \
-n 16 \
--run \
--initialize \
--ncpu 2 \
--nparticles 32 \
--niter_todo 16 \
--precision double \
--wd "data/double"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment