diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/particles.cpp | 8 | ||||
-rw-r--r-- | tests/vtk_write.cpp | 16 |
2 files changed, 22 insertions, 2 deletions
diff --git a/tests/particles.cpp b/tests/particles.cpp index 6332195..873b8ad 100644 --- a/tests/particles.cpp +++ b/tests/particles.cpp @@ -31,4 +31,12 @@ SAW_TEST("Minor Test for mask"){ //saw::data<sch::Array<sch::T,2>> reference_mask{{{4+2,4+2}}}; //reference_mask.at({{0,0}}); } + +SAW_TEST("Verlet integration test"){ + using namespace kel; + lbm::particle_system<sch::T,2,sch::Particle<sch::T,2>> system; + + // system.step(); + +} } diff --git a/tests/vtk_write.cpp b/tests/vtk_write.cpp index 0fcc169..49c9c52 100644 --- a/tests/vtk_write.cpp +++ b/tests/vtk_write.cpp @@ -29,6 +29,12 @@ using CellStruct = Struct< Member<CellInfo<Desc>, "info"> >; +template<typename T, uint64_t D> +using MacroStruct = Struct< + Member<FixedArray<T,D>, "velocity">, + Member<T, "pressure"> +>; + } SAW_TEST("VTK Write test example"){ @@ -38,11 +44,17 @@ SAW_TEST("VTK Write test example"){ std::stringstream sstream; - saw::data<sch::CellField<sch::D2Q5,sch::CellStruct<sch::D2Q5>>> cells; + saw::data<sch::Array<sch::MacroStruct<sch::T,2>, 2>> cells{{{2u,2u}}}; - auto eov = lbm::impl::lbm_vtk_writer<sch::CellField<sch::D2Q5,sch::CellStruct<sch::D2Q5>>>::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<sch::Array<sch::MacroStruct<sch::T,2>, 2>>::apply(sstream, cells); SAW_EXPECT(eov.is_value(), "vtk writer failed to write"); + std::cout<<sstream.str()<<std::endl; + // using Type = typename parameter_pack_type<i,T...>::type; } } |