From 4a291705f46086d5adcf68de6d6d1441c4b9e4f9 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 8 May 2025 14:37:06 +0200 Subject: Built a working vtk file writer. Would prefer a lambda writer tbh --- tests/vtk_write.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/vtk_write.cpp b/tests/vtk_write.cpp index 5d61580..49c9c52 100644 --- a/tests/vtk_write.cpp +++ b/tests/vtk_write.cpp @@ -29,6 +29,12 @@ using CellStruct = Struct< Member, "info"> >; +template +using MacroStruct = Struct< + Member, "velocity">, + Member +>; + } SAW_TEST("VTK Write test example"){ @@ -38,11 +44,17 @@ SAW_TEST("VTK Write test example"){ std::stringstream sstream; - saw::data>> cells{{{2u,2u}}}; + saw::data, 2>> cells{{{2u,2u}}}; - auto eov = lbm::impl::lbm_vtk_writer>>::apply(sstream, cells); + auto& cell_0 = cells.at({{{0,0}}}); + cell_0.template get<"velocity">()= {{0.5,-0.1}}; + cell_0.template get<"pressure">().set({1.1}); + + auto eov = lbm::impl::lbm_vtk_writer, 2>>::apply(sstream, cells); SAW_EXPECT(eov.is_value(), "vtk writer failed to write"); + std::cout<::type; } } -- cgit v1.2.3