diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-08-15 18:59:46 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-08-15 18:59:46 +0200 |
commit | 725e7644d737fe812c0c03cb5c781c9752ef20f2 (patch) | |
tree | fd206325d9bfdac9b3727e54b13be162a82b8f17 | |
parent | 0e0da21fdadb2b924d42bf21ac6c881cf1abcf63 (diff) |
Cleaned up some minor things
-rw-r--r-- | c++/write_vtk.hpp | 11 | ||||
-rw-r--r-- | 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<void> write_vtk_file(const std::filesystem::path& file_name, const auto eov = impl::lbm_vtk_writer<Struct>::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 <<" "<<dim_y<<" 1\n"; - vtk_file <<"SPACING 1.0 1.0 1.0\n"; - vtk_file <<"ORIGIN 0.0 0.0 0.0\n"; - vtk_file <<"POINT_DATA "<<(dim_x*dim_y)<<"\n"; - vtk_file <<"VECTORS Velocity float\n"; - */ } } } diff --git a/examples/poiseulle_2d.cpp b/examples/poiseulle_2d.cpp index 3e636f9..8e1ba94 100644 --- a/examples/poiseulle_2d.cpp +++ b/examples/poiseulle_2d.cpp @@ -303,6 +303,12 @@ void lbm_step( int main(int argc, char** argv){ using namespace kel::lbm; using dfi = df_info<sch::T,sch::D2Q9>; + 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<sch::T>{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); |