diff options
Diffstat (limited to 'modules/core/tests')
| -rw-r--r-- | modules/core/tests/equilibrium.cpp | 2 | ||||
| -rw-r--r-- | modules/core/tests/vtk_write.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/core/tests/equilibrium.cpp b/modules/core/tests/equilibrium.cpp index 20a1f08..7d36600 100644 --- a/modules/core/tests/equilibrium.cpp +++ b/modules/core/tests/equilibrium.cpp @@ -20,7 +20,7 @@ void check_equilibrium(){ auto eq = lbm::equilibrium<lbm::sch::Float64,Descriptor>(rho,vel); for(saw::data<lbm::sch::UInt64> i{0u}; i.get() < Descriptor::Q; ++i){ - SAW_EXPECT(eq.at(i).get() == dfi::weights[i.get()], std::string{"No velocity and normalized rho should be exactly the weights: "} + std::to_string(eq.at(i).get()) + std::string{" "} + std::to_string(dfi::weights[i.get()])); + SAW_EXPECT(eq.at(i).get() == dfi::weights[i.get()], std::string{"No momentum and normalized rho should be exactly the weights: "} + std::to_string(eq.at(i).get()) + std::string{" "} + std::to_string(dfi::weights[i.get()])); } } diff --git a/modules/core/tests/vtk_write.cpp b/modules/core/tests/vtk_write.cpp index c99d752..1de25bf 100644 --- a/modules/core/tests/vtk_write.cpp +++ b/modules/core/tests/vtk_write.cpp @@ -31,7 +31,7 @@ using CellStruct = Struct< template<typename T, uint64_t D> using MacroStruct = Struct< - Member<FixedArray<T,D>, "velocity">, + Member<FixedArray<T,D>, "momentum">, Member<T, "pressure"> >; @@ -47,7 +47,7 @@ SAW_TEST("VTK Write test example"){ saw::data<sch::Array<sch::MacroStruct<sch::T,2>, 2>> cells{{{2u,2u}}}; auto& cell_0 = cells.at({{{0,0}}}); - cell_0.template get<"velocity">()= {{0.5,-0.1}}; + cell_0.template get<"momentum">()= {{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); @@ -56,7 +56,7 @@ SAW_TEST("VTK Write test example"){ // I want to print it to see it for myself. For now I have no tooling to more easily view associated and potentially generated files std::cout<<sstream.str()<<std::endl; - static std::string_view comparison_str = "# vtk DataFile Version 3.0\nLBM File\nASCII\nDATASET STRUCTURED_POINTS\nSPACING 1.0 1.0 1.0\nORIGIN 0.0 0.0 0.0\nDIMENSIONS 2 2 1\nPOINT_DATA 4\n\nVECTORS velocity float\n0.5 -0.1 0\n0 0 0\n0 0 0\n0 0 0\nSCALARS pressure float\nLOOKUP_TABLE default\n1.1\n0\n0\n0\n"; + static std::string_view comparison_str = "# vtk DataFile Version 3.0\nLBM File\nASCII\nDATASET STRUCTURED_POINTS\nSPACING 1.0 1.0 1.0\nORIGIN 0.0 0.0 0.0\nDIMENSIONS 2 2 1\nPOINT_DATA 4\n\nVECTORS momentum float\n0.5 -0.1 0\n0 0 0\n0 0 0\n0 0 0\nSCALARS pressure float\nLOOKUP_TABLE default\n1.1\n0\n0\n0\n"; SAW_EXPECT(sstream.str() == comparison_str, "Expected different encoding"); // using Type = typename parameter_pack_type<i,T...>::type; @@ -74,7 +74,7 @@ SAW_TEST("VTK Write raw test example"){ auto meta = cells.dims(); auto& cell_0 = cells.at({{{0,0}}}); - cell_0.template get<"velocity">()= {{0.5,-0.1}}; + cell_0.template get<"momentum">()= {{0.5,-0.1}}; cell_0.template get<"pressure">().set(1.1); auto eov = lbm::impl::lbm_vtk_writer_raw<sch::MacroStruct<sch::T,2u>,2u>::apply(sstream, &cell_0, meta); @@ -83,7 +83,7 @@ SAW_TEST("VTK Write raw test example"){ // I want to print it to see it for myself. For now I have no tooling to more easily view associated and potentially generated files std::cout<<sstream.str()<<std::endl; - static std::string_view comparison_str = "# vtk DataFile Version 3.0\nLBM File\nASCII\nDATASET STRUCTURED_POINTS\nSPACING 1.0 1.0 1.0\nORIGIN 0.0 0.0 0.0\nDIMENSIONS 2 2 1\nPOINT_DATA 4\n\nVECTORS velocity float\n0.5 -0.1 0\n0 0 0\n0 0 0\n0 0 0\nSCALARS pressure float\nLOOKUP_TABLE default\n1.1\n0\n0\n0\n"; + static std::string_view comparison_str = "# vtk DataFile Version 3.0\nLBM File\nASCII\nDATASET STRUCTURED_POINTS\nSPACING 1.0 1.0 1.0\nORIGIN 0.0 0.0 0.0\nDIMENSIONS 2 2 1\nPOINT_DATA 4\n\nVECTORS momentum float\n0.5 -0.1 0\n0 0 0\n0 0 0\n0 0 0\nSCALARS pressure float\nLOOKUP_TABLE default\n1.1\n0\n0\n0\n"; SAW_EXPECT(sstream.str() == comparison_str, "Expected different encoding"); // using Type = typename parameter_pack_type<i,T...>::type; |
