From 725e7644d737fe812c0c03cb5c781c9752ef20f2 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 15 Aug 2025 18:59:46 +0200 Subject: Cleaned up some minor things --- c++/write_vtk.hpp | 11 ----------- examples/poiseulle_2d.cpp | 10 ++++++++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/c++/write_vtk.hpp b/c++/write_vtk.hpp index 55d4401..eb2545a 100644 --- a/c++/write_vtk.hpp +++ b/c++/write_vtk.hpp @@ -174,17 +174,6 @@ saw::error_or write_vtk_file(const std::filesystem::path& file_name, const auto eov = impl::lbm_vtk_writer::apply(vtk_file, field); return eov; - /* - vtk_file <<"# vtk DataFile Version 3.0\n"; - vtk_file <<"Velocity Cavity2D example\n"; - vtk_file <<"ASCII\n"; - vtk_file <<"DATASET STRUCTURED_POINTS\n"; - vtk_file <<"DIMENSIONS "<< dim_x <<" "<; + auto eo_lbm_dir = output_directory(); + if(eo_lbm_dir.is_error()){ + return -1; + } + auto& lbm_dir = eo_lbm_dir.get_value(); + auto out_dir = lbm_dir / "poiseulle_particles_channel_2d"; std::string_view cfg_file_name = "config.json"; if(argc > 1){ @@ -377,9 +383,9 @@ int main(int argc, char** argv){ rho = rho * saw::data{dfi::cs2}; }, {{0u,0u}}, meta); - std::string vtk_f_name{"tmp/poiseulle_2d_"}; + std::string vtk_f_name{"poiseulle_2d_"}; vtk_f_name += std::to_string(i) + ".vtk"; - write_vtk_file(vtk_f_name, macros); + write_vtk_file(out_dir / vtk_f_name, macros); } lbm_step(lattice, i); -- cgit v1.2.3