65#include "Vector/vector_dist.hpp"
69int main(
int argc,
char* argv[])
104 openfpm_init(&argc,&argv);
110 size_t bc[2]={PERIODIC,PERIODIC};
160 const int scalar = 0;
163 const int vector = 1;
194 auto it = vd.getDomainIterator();
201 vd.getPos(key)[0] = (float)rand() / RAND_MAX;
204 vd.getPos(key)[1] = (float)rand() / RAND_MAX;
273 it = vd.getDomainIterator();
284 vd.template getProp<scalar>(p) = 1.0;
286 vd.template getProp<vector>(p)[0] = 1.0;
287 vd.template getProp<vector>(p)[1] = 1.0;
288 vd.template getProp<vector>(p)[2] = 1.0;
290 vd.template getProp<tensor>(p)[0][0] = 1.0;
291 vd.template getProp<tensor>(p)[0][1] = 1.0;
292 vd.template getProp<tensor>(p)[0][2] = 1.0;
293 vd.template getProp<tensor>(p)[1][0] = 1.0;
294 vd.template getProp<tensor>(p)[1][1] = 1.0;
295 vd.template getProp<tensor>(p)[1][2] = 1.0;
296 vd.template getProp<tensor>(p)[2][0] = 1.0;
297 vd.template getProp<tensor>(p)[2][1] = 1.0;
298 vd.template getProp<tensor>(p)[2][2] = 1.0;
325 auto & v_cl = create_vcluster();
361 vd.setPropNames(names);
364 vd.write(
"particles");
367 vd.write(
"particles_bin",VTK_WRITER | FORMAT_BINARY);
370 vd.write(
"particles_with_time",
"time=1.234");
373 vd.write(
"particles_with_time_bin",
"time=1.234",VTK_WRITER | FORMAT_BINARY);
This class represent an N-dimensional box.
Implementation of 1-D std::vector like structure.