From 869974982752cd37e808283af629ea0bbb680393 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 11 Jul 2025 14:14:36 +0200 Subject: Writing was flipped on non square, cubic domains --- c++/write_vtk.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c++/write_vtk.hpp') diff --git a/c++/write_vtk.hpp b/c++/write_vtk.hpp index 5cbc6c0..40597fd 100644 --- a/c++/write_vtk.hpp +++ b/c++/write_vtk.hpp @@ -62,13 +62,13 @@ struct lbm_vtk_writer...> , constexpr auto Lit = saw::parameter_key_pack_type::literal; using Type = typename saw::parameter_pack_type::type; - if constexpr (Dep == Dim){ + if constexpr (Dep == 0u){ return lbm_vtk_writer::apply(vtk_file, field.at(index).template get()); } else { // Dep < Dim // I hope - static_assert(Dep < Dim, "Don't fall into this case"); - for(index.at({Dep}) = 0; index.at({Dep}) < field.get_dims().at({Dep}); ++index.at({Dep})){ - auto eov = write_i_iterate_d(vtk_file, field, index); + static_assert(Dep > 0u, "Don't fall into this case"); + for(index.at({Dep-1u}) = 0; index.at({Dep-1u}) < field.get_dims().at({Dep-1u}); ++index.at({Dep-1u})){ + auto eov = write_i_iterate_d(vtk_file, field, index); if(eov.is_error()){ return eov; } @@ -95,7 +95,7 @@ struct lbm_vtk_writer...> , } } - return write_i_iterate_d(vtk_file, field, index); + return write_i_iterate_d(vtk_file, field, index); } template -- cgit v1.2.3