summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-05-07 13:39:51 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-05-07 13:39:51 +0200
commita77c3a2301cdc6ea220c3bac18b771fd42800687 (patch)
tree54693f4e8593d6d145d9366a996185c7b4a00f28 /c++
parentd6e2d808c4c2387f65f9d0de3431cb574d72da70 (diff)
Stack smashing probably due to UB fixed
Diffstat (limited to 'c++')
-rw-r--r--c++/write_vtk.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/c++/write_vtk.hpp b/c++/write_vtk.hpp
index fec4ea5..294ec6d 100644
--- a/c++/write_vtk.hpp
+++ b/c++/write_vtk.hpp
@@ -31,6 +31,14 @@ struct lbm_vtk_writer<sch::FixedArray<T,D>> {
}
};
+template<typename Sch, typename Desc, uint64_t SC_V, uint64_t DC_V, uint64_t QC_V>
+struct lbm_vtk_writer<sch::Cell<Sch,Desc,SC_V, DC_V, QC_V>> {
+ static saw::error_or<void> apply(std::ostream& vtk_file, std::string_view name){
+ vtk_file<<"VECTORS "<<name<<" float\n";
+ return saw::make_void();
+ }
+};
+
template<typename Desc, typename... StructT, saw::string_literal... StructN>
struct lbm_vtk_writer<sch::CellField<Desc,sch::Struct<sch::Member<StructT,StructN>...>>> {
template<uint64_t i, uint64_t Dep>
@@ -38,6 +46,7 @@ struct lbm_vtk_writer<sch::CellField<Desc,sch::Struct<sch::Member<StructT,Struct
if constexpr (Dep == Desc::D){
}
+ return saw::make_void();
}
template<uint64_t i>
@@ -87,6 +96,7 @@ struct lbm_vtk_writer<sch::CellField<Desc,sch::Struct<sch::Member<StructT,Struct
auto meta = field.meta();
saw::data<sch::UInt64> pd_size{1u};
// DIMENSIONS
+
{
vtk_file << "DIMENSIONS ";
for(saw::data<sch::UInt64> i{0u}; i.get() < Desc::D; ++i){