diff --git a/bfps/cpp/particles/particles_field_computer.hpp b/bfps/cpp/particles/particles_field_computer.hpp index 80f4745070953509efee5af587230d6941287d14..ac185662a58d4f551d5e38c13a7eb7b4e9608e89 100644 --- a/bfps/cpp/particles/particles_field_computer.hpp +++ b/bfps/cpp/particles/particles_field_computer.hpp @@ -48,6 +48,7 @@ class particles_field_computer : public abstract_particles_distr<real_number, 3, real_number particles_current_rhs[], const int nb_particles) const final{ TIMEZONE("particles_field_computer::apply_computation"); + DEBUG_MSG("just entered particles_field_computer::apply_computation\n"); for(int idxPart = 0 ; idxPart < nb_particles ; ++idxPart){ const real_number reltv_x = get_norm_pos_in_cell(particles_positions[idxPart*3+IDX_X], IDX_X); const real_number reltv_y = get_norm_pos_in_cell(particles_positions[idxPart*3+IDX_Y], IDX_Y); @@ -130,6 +131,7 @@ class particles_field_computer : public abstract_particles_distr<real_number, 3, } } } + DEBUG_MSG("exiting particles_field_computer::apply_computation\n"); } virtual void reduce_particles_rhs(real_number particles_current_rhs[], diff --git a/tests/test_vorticity_equation.py b/tests/test_vorticity_equation.py index 67a3b0e94a207230970289cea2d76bc3e1f44f4d..21c52e3dbf4a37d8968c13480917db4906a30bda 100644 --- a/tests/test_vorticity_equation.py +++ b/tests/test_vorticity_equation.py @@ -29,6 +29,7 @@ import os import numpy as np import h5py import argparse +import subprocess import bfps import bfps.tools @@ -37,7 +38,7 @@ from bfps_addons import NSReader import matplotlib.pyplot as plt def main(): - c = bfps.NavierStokes() + c = bfps.NavierStokes(simname = 'fluid_solver') c.launch( ['-n', '32', '--simname', 'fluid_solver', @@ -45,29 +46,31 @@ def main(): '--niter_todo', '16', '--niter_out', '16', '--niter_stat', '1', - #'--nparticles', '100', + '--nparticles', '10', '--niter_part', '1', '--wd', './', '--dtfactor', '0.1'] + sys.argv[1:]) + #subprocess.call('rm *vorticity_equation* NSVE*', shell = True) data = c.read_cfield(iteration = 0) - #f = h5py.File('vorticity_equation_checkpoint_0.h5', 'w') - #f['vorticity/complex/0'] = data - #f.close() - #c = bfps.NSVorticityEquation() - #c.launch( - # ['-n', '32', - # '--simname', 'vorticity_equation', - # '--np', '2', - # '--ntpp', '2', - # '--niter_todo', '16', - # '--niter_out', '1', - # '--niter_stat', '1', - # '--checkpoints_per_file', '32', - # '--nparticles', '100', - # '--wd', './'] + - # sys.argv[1:]) - c0 = NSReader(simname = 'fluid_solver') + f = h5py.File('vorticity_equation_checkpoint_0.h5', 'w') + f['vorticity/complex/0'] = data + f.close() + c = bfps.NSVorticityEquation() + c.launch( + ['-n', '32', + '--simname', 'vorticity_equation', + '--np', '2', + '--ntpp', '2', + '--niter_todo', '16', + '--niter_out', '1', + '--niter_stat', '1', + '--checkpoints_per_file', '32', + '--nparticles', '10', + '--wd', './'] + + sys.argv[1:]) + subprocess.call('cat err_file_vorticity_equation_0', shell = True) + #c0 = NSReader(simname = 'fluid_solver') #c1 = NSReader(simname = 'vorticity_equation') #df0 = c0.get_data_file() #df1 = c1.get_data_file()