11 #include "VTKWriter/VTKWriter.hpp" 14 void load_sizes(T * sizes,
int d,
int sza)
21 template<
typename T,
typename szAType,
typename ... szType>
22 void load_sizes(T * sizes,
int d , szAType sza, szType ... sz)
26 load_sizes(sizes,d+1,sz ...);
29 template<
typename T,
typename ... szType>
30 void 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);
80 void 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);
__device__ __host__ boost::mpl::at< type, boost::mpl::int_< i > >::type & get()
get the properties i
This class implement the point shape in an N-dimensional space.
__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 represent an N-dimensional box.