Skip to content
Snippets Groups Projects
Commit a7e38b8a authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

clip_zero_padding is called by interpolator

parent 216846dc
No related branches found
No related tags found
No related merge requests found
...@@ -255,7 +255,6 @@ class NavierStokes(bfps.fluid_base.fluid_particle_base): ...@@ -255,7 +255,6 @@ class NavierStokes(bfps.fluid_base.fluid_particle_base):
if not type(kcut) == type(None): if not type(kcut) == type(None):
update_fields += 'fs->low_pass_Fourier(fs->cvelocity, 3, {0});\n'.format(kcut) update_fields += 'fs->low_pass_Fourier(fs->cvelocity, 3, {0});\n'.format(kcut)
update_fields += ('fs->ift_velocity();\n' + update_fields += ('fs->ift_velocity();\n' +
'clip_zero_padding(fs->rd, fs->rvelocity, 3);\n' +
'vel_{0}->read_rFFTW(fs->rvelocity);\n' + 'vel_{0}->read_rFFTW(fs->rvelocity);\n' +
'fs->compute_Lagrangian_acceleration(acc_{0}->f+acc_{0}->buffer_size);\n' + 'fs->compute_Lagrangian_acceleration(acc_{0}->f+acc_{0}->buffer_size);\n' +
'acc_{0}->read_rFFTW(acc_{0}->f+acc_{0}->buffer_size);\n').format(name) 'acc_{0}->read_rFFTW(acc_{0}->f+acc_{0}->buffer_size);\n').format(name)
......
...@@ -477,10 +477,9 @@ void fluid_solver<R>::compute_Eulerian_acceleration(R *acceleration) \ ...@@ -477,10 +477,9 @@ void fluid_solver<R>::compute_Eulerian_acceleration(R *acceleration) \
if (this->cd->myrank == this->cd->rank[0]) \ if (this->cd->myrank == this->cd->rank[0]) \
std::fill_n((R*)(this->cv[2]), 6, 0.0); \ std::fill_n((R*)(this->cv[2]), 6, 0.0); \
FFTW(execute)(*((FFTW(plan)*)this->vc2r[2])); \ FFTW(execute)(*((FFTW(plan)*)this->vc2r[2])); \
clip_zero_padding<R>(this->rd, this->rv[2], 3); \
std::copy( \ std::copy( \
this->rv[2], \ this->rv[2], \
this->rv[2] + this->rd->local_size, \ this->rv[2] + 2*this->cd->local_size, \
acceleration); \ acceleration); \
} \ } \
\ \
...@@ -665,10 +664,9 @@ void fluid_solver<R>::compute_Lagrangian_acceleration(R *acceleration) \ ...@@ -665,10 +664,9 @@ void fluid_solver<R>::compute_Lagrangian_acceleration(R *acceleration) \
} \ } \
); \ ); \
FFTW(execute)(*((FFTW(plan)*)this->vc2r[1])); \ FFTW(execute)(*((FFTW(plan)*)this->vc2r[1])); \
clip_zero_padding<R>(this->rd, this->rv[1], 3); \
std::copy( \ std::copy( \
this->rv[1], \ this->rv[1], \
this->rv[1] + this->rd->local_size, \ this->rv[1] + 2*this->cd->local_size, \
acceleration); \ acceleration); \
/* ********* */ \ /* ********* */ \
/* debugging */ \ /* debugging */ \
......
...@@ -63,6 +63,7 @@ int interpolator<rnumber, interp_neighbours>::read_rFFTW(void *void_src) ...@@ -63,6 +63,7 @@ int interpolator<rnumber, interp_neighbours>::read_rFFTW(void *void_src)
rnumber *src = (rnumber*)void_src; rnumber *src = (rnumber*)void_src;
rnumber *dst = this->f; rnumber *dst = this->f;
/* do big copy of middle stuff */ /* do big copy of middle stuff */
clip_zero_padding<rnumber>(this->unbuffered_descriptor, src, 3);
std::copy(src, std::copy(src,
src + this->unbuffered_descriptor->local_size, src + this->unbuffered_descriptor->local_size,
dst + this->buffer_size); dst + this->buffer_size);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "field_descriptor.hpp" #include "field_descriptor.hpp"
#include "fftw_tools.hpp"
#include "fluid_solver_base.hpp" #include "fluid_solver_base.hpp"
#include "spline_n1.hpp" #include "spline_n1.hpp"
#include "spline_n2.hpp" #include "spline_n2.hpp"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment