11#include "VTKWriter/VTKWriter.hpp"
14void load_sizes(T * sizes,
int d,
int sza)
21template<
typename T,
typename szAType,
typename ... szType>
22void load_sizes(T * sizes,
int d , szAType sza, szType ... sz)
26 load_sizes(sizes,d+1,sz ...);
29template<
typename T,
typename ... szType>
30void print_array(std::string file,T * arr, szType ... sz)
32 size_t sizes[
sizeof...(sz)];
36 load_sizes(sizes,d,sz ...);
43 auto it = grd.getIterator();
44 auto & lin = grd.getGrid();
50 grd.template get<0>(p) = arr[lin.LinId(p)];
58 Point<
sizeof...(sz),
double> offset;
59 Box<
sizeof...(sz),
size_t> dom;
60 Point<
sizeof...(sz),
double> spacing;
62 for (
int i = 0 ; i <
sizeof...(sz) ; i++)
67 dom.setHigh(i,sizes[i]);
70 vtk_g.add(grd,offset,spacing,dom);
73 prp_names.add(
"scalar");
75 vtk_g.write(file.c_str(), prp_names,
"grids", file_type::ASCII);
80void print_grid(std::string file,T &
grid)
89 for (
int i = 0 ; i < T::dims ; i++)
97 vtk_g.add(
grid,offset,spacing,dom);
101 vtk_g.write(file.c_str(), prp_names,
"grids", file_type::ASCII);
This class represent an N-dimensional box.
__device__ __host__ void setHigh(int i, T val)
set the high interval of the box
__device__ __host__ void setLow(int i, T val)
set the low interval of the box
This class implement the point shape in an N-dimensional space.
Implementation of 1-D std::vector like structure.
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...
__device__ __host__ boost::mpl::at< type, boost::mpl::int_< i > >::type & get()
get the properties i