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

preliminary version of read

parent 8453d12b
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,11 @@ void distributed_particles<particle_type, rnumber, interp_neighbours>::read(
MPI_DOUBLE,
0,
this->comm);
for (int p=0; p<this->nparticles; p++)
{
if (this->vel->z_is_here(temp[this->ncomponents*p+2]))
this->state[p] = temp + this->ncomponents*p;
}
//if (this->myrank == 0)
//{
// if (this->iteration > 0)
......
......@@ -24,6 +24,7 @@
#include <cmath>
#include "field_descriptor.hpp"
#include "fftw_tools.hpp"
#include "fluid_solver_base.hpp"
......@@ -53,6 +54,12 @@ class interpolator:public interpolator_base<rnumber, interp_neighbours>
int read_rFFTW(const void *src);
inline bool z_is_here(double z)
{
return (this->descriptor->rank[MOD(int(floor(z/this->dz)), this->descriptor->sizes[0])] ==
this->descriptor->myrank);
}
/* interpolate field at an array of locations */
void sample(
const int nparticles,
......
......@@ -91,15 +91,15 @@ print('This is bfps version ' + VERSION)
### lists of files and MANIFEST.in
src_file_list = ['field_descriptor',
'fluid_solver_base',
'fluid_solver',
'distributed_particles',
'interpolator_base',
'particles_base',
'rFFTW_interpolator',
'rFFTW_particles',
'interpolator',
'particles',
'distributed_particles',
'rFFTW_interpolator',
'rFFTW_particles',
'fluid_solver_base',
'fluid_solver',
'fftw_tools',
'spline_n1',
'spline_n2',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment