Commit c4c9d7ec authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

various fixes for convergence and io

io fails at the moment
parent c2c1127a
......@@ -86,8 +86,7 @@ class base(object):
src_txt += 'return 0;\n}\n' # finishing read_parameters
return src_txt
def cprint_pars(self):
key = self.parameters.keys()
key.sort()
key = sorted(list(self.parameters.keys()))
src_txt = ''
for i in range(len(key)):
if type(self.parameters[key[i]]) == int:
......
......@@ -37,12 +37,14 @@ class fluid_converter(bfps.fluid_base.fluid_particle_base):
name = 'fluid_converter',
work_dir = './',
simname = 'test',
fluid_precision = 'single'):
fluid_precision = 'single',
use_fftw_wisdom = True):
super(fluid_converter, self).__init__(
name = name,
work_dir = work_dir,
simname = simname,
dtype = fluid_precision)
dtype = fluid_precision,
use_fftw_wisdom = use_fftw_wisdom)
self.parameters['write_rvelocity'] = 1
self.parameters['write_rvorticity'] = 1
self.parameters['fluid_name'] = 'test'
......
......@@ -35,12 +35,14 @@ class fluid_resize(bfps.fluid_base.fluid_particle_base):
name = 'fluid_resize',
work_dir = './',
simname = 'test',
dtype = np.float32):
dtype = np.float32,
use_fftw_wisdom = False):
super(fluid_resize, self).__init__(
name = name,
work_dir = work_dir,
simname = simname,
dtype = dtype)
dtype = dtype,
use_fftw_wisdom = use_fftw_wisdom)
self.parameters['src_simname'] = 'test'
self.parameters['dst_iter'] = 0
self.parameters['dst_nx'] = 32
......
......@@ -110,9 +110,6 @@ class CustomBuild(DistutilsBuild):
subprocess.call(command_strings)
command_strings = ['ar', 'rvs', 'bfps/libbfps.a']
command_strings += ['obj/' + fname + '.o' for fname in src_file_list]
#command_strings += ['-l' + libname for libname in libraries]
#command_strings += ['-L' + ldir for ldir in library_dirs]
#command_strings += ['-o', 'libbfps.a']
print(' '.join(command_strings))
subprocess.call(command_strings)
DistutilsBuild.run(self)
......
......@@ -71,7 +71,9 @@ def convergence_test(
code_class = code_class,
tracer_state_file = h5py.File(os.path.join(c0.work_dir, c0.simname + '.h5'), 'r'))
# get real space fields
converter = bfps.fluid_converter(fluid_precision = opt.precision)
converter = bfps.fluid_converter(
fluid_precision = opt.precision,
use_fftw_wisdom = False)
converter.write_src()
converter.set_host_info({'type' : 'pc'})
for c in [c0, c1, c2]:
......
[tox]
envlist = py27
envlist = py34
[testenv]
deps = matplotlib
whitelist_externals =
echo
cp
......
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