From be2164a504bf8f825d7a76af9504633adcf2596f Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 31 Jan 2026 17:23:03 +0100 Subject: Adding vtk writing --- lib/core/c++/write_vtk.hpp | 12 ++++++++---- lib/sycl/c++/data.hpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/core/c++/write_vtk.hpp b/lib/core/c++/write_vtk.hpp index 7d42bc9..204bb87 100644 --- a/lib/core/c++/write_vtk.hpp +++ b/lib/core/c++/write_vtk.hpp @@ -32,15 +32,13 @@ struct lbm_vtk_writer> { } }; -template +template struct lbm_vtk_writer> { static saw::error_or apply_header(std::ostream& vtk_file, std::string_view name){ vtk_file<<"VECTORS "< apply(std::ostream& vtk_file, const saw::data>& field){ - static_assert(D > 0, "Non-dimensionality is bad for velocity."); - static_assert(D <= 3, "4th dimension as well. Mostly due to vtk."); + static saw::error_or apply(std::ostream& vtk_file, const saw::data>& field){ // vtk_file<<"VECTORS "<> { } }; +template +struct lbm_vtk_writer> final { + template + lbm_vtk_writer struct lbm_vtk_writer...> , Dim>> { diff --git a/lib/sycl/c++/data.hpp b/lib/sycl/c++/data.hpp index 75112fb..5155a53 100644 --- a/lib/sycl/c++/data.hpp +++ b/lib/sycl/c++/data.hpp @@ -338,7 +338,7 @@ struct sycl_copy_helper, Encode> final { } - static saw::error_or copy_to_host(saw::data& sycl_data, saw::data>& host_data, sycl::queue& q){ + static saw::error_or copy_to_host(saw::data>& sycl_data, saw::data& host_data, sycl::queue& q){ return copy_to_host_member<0u>(sycl_data, host_data, q); } }; -- cgit v1.2.3