diff options
| -rw-r--r-- | examples/one_particle_sedimentation_2d/.nix/derivation.nix (renamed from examples/one_particle_sedimentation/.nix/derivation.nix) | 3 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/SConscript (renamed from examples/one_particle_sedimentation/SConscript) | 0 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/SConstruct (renamed from examples/one_particle_sedimentation/SConstruct) | 0 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/common.hpp (renamed from examples/one_particle_sedimentation/common.hpp) | 2 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/init.hpp (renamed from examples/one_particle_sedimentation/init.hpp) | 24 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/sim.cpp (renamed from examples/one_particle_sedimentation/sim.cpp) | 8 | ||||
| -rw-r--r-- | examples/one_particle_sedimentation_2d/step.hpp (renamed from examples/one_particle_sedimentation/step.hpp) | 0 | ||||
| -rw-r--r-- | examples/schaefer_turek_durst_krause_rannbacher/.nix/derivation.nix | 3 | ||||
| -rw-r--r-- | modules/core/c++/abstract/stringify_schema.hpp | 1 | ||||
| -rw-r--r-- | modules/core/tests/schema.cpp | 16 |
10 files changed, 22 insertions, 35 deletions
diff --git a/examples/one_particle_sedimentation/.nix/derivation.nix b/examples/one_particle_sedimentation_2d/.nix/derivation.nix index a062133..49fa939 100644 --- a/examples/one_particle_sedimentation/.nix/derivation.nix +++ b/examples/one_particle_sedimentation_2d/.nix/derivation.nix @@ -8,12 +8,11 @@ , version , adaptive-cpp , kel -, particle_coupling ? "fplbm" }: let in stdenv.mkDerivation { - pname = "${pname}-examples-ops_2d_gpu_${particle_coupling}"; + pname = "${pname}-examples-ops_2d_gpu"; inherit version; src = ./..; diff --git a/examples/one_particle_sedimentation/SConscript b/examples/one_particle_sedimentation_2d/SConscript index 40f4052..40f4052 100644 --- a/examples/one_particle_sedimentation/SConscript +++ b/examples/one_particle_sedimentation_2d/SConscript diff --git a/examples/one_particle_sedimentation/SConstruct b/examples/one_particle_sedimentation_2d/SConstruct index 0611b67..0611b67 100644 --- a/examples/one_particle_sedimentation/SConstruct +++ b/examples/one_particle_sedimentation_2d/SConstruct diff --git a/examples/one_particle_sedimentation/common.hpp b/examples/one_particle_sedimentation_2d/common.hpp index be9a538..37e0402 100644 --- a/examples/one_particle_sedimentation/common.hpp +++ b/examples/one_particle_sedimentation_2d/common.hpp @@ -22,7 +22,7 @@ namespace lbm { */ constexpr uint64_t dim_y = 512ul; -constexpr uint64_t dim_x = static_cast<uint64_t>(dim_y * (220.0 / 41.0)); +constexpr uint64_t dim_x = 256ul; constexpr uint64_t particle_amount = 1ul; diff --git a/examples/one_particle_sedimentation/init.hpp b/examples/one_particle_sedimentation_2d/init.hpp index af7eb89..a35c6e8 100644 --- a/examples/one_particle_sedimentation/init.hpp +++ b/examples/one_particle_sedimentation_2d/init.hpp @@ -12,10 +12,9 @@ saw::error_or<void> init( saw::data<sch::MacroStruct<T,Desc>>& macros, saw::data<sch::ParticleSpheroidGroup<T,Desc>>& particles ){ - (void) conv; - auto& info_f = fields.template get<"info">(); auto& porous_f = macros.template get<"porosity">(); + // Set everything as walls iterator<Desc::D>::apply( [&](auto& index){ @@ -25,6 +24,7 @@ saw::error_or<void> init( info_f.get_dims(), {} ); + // Fluid iterator<Desc::D>::apply( [&](auto& index){ @@ -35,26 +35,6 @@ saw::error_or<void> init( {{1u,1u}} ); - // Inflow - iterator<Desc::D>::apply( - [&](auto& index){ - info_f.at(index).set(3u); - }, - {{0u,0u}}, - {{1u,dim_y}}, - {{0u,1u}} - ); - - // Outflow - iterator<Desc::D>::apply( - [&](auto& index){ - info_f.at(index).set(4u); - }, - {{dim_x-1u,0u}}, - {{dim_x, dim_y}}, - {{0u,1u}} - ); - // auto& df_f = fields.template get<"dfs_old">(); auto& rho_f = macros.template get<"density">(); auto& vel_f = macros.template get<"momentum">(); diff --git a/examples/one_particle_sedimentation/sim.cpp b/examples/one_particle_sedimentation_2d/sim.cpp index b3422a5..7c9a56c 100644 --- a/examples/one_particle_sedimentation/sim.cpp +++ b/examples/one_particle_sedimentation_2d/sim.cpp @@ -34,7 +34,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ } auto& lbm_dir = eo_lbm_dir.get_value(); - auto out_dir = lbm_dir / "stdkr_2d_gpu" / an.template get<"coupling">().stl_view(); + auto out_dir = lbm_dir / "ops_2d" / an.template get<"coupling">().stl_view(); { std::error_code ec; @@ -144,7 +144,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ } } { - auto eov = write_csv_file(out_dir,"stdkr_2d",i.get(), *lbm_macro_data_ptr); + auto eov = write_csv_file(out_dir,"ops_2d",i.get(), *lbm_macro_data_ptr); if(eov.is_error()){ return eov; } @@ -173,7 +173,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ std::cout<<"Status: "<<i.get()<<" of "<<time_steps.get()<<" - "<<(i.template cast_to<sch::Float64>().get() * 100 / time_steps.get())<<"%"<<std::endl; print_status = false; } - print_progress_bar(i.get(), time_steps.get()-1u); + print_progress_bar(i.get()+1u, time_steps.get()); } // After Loop sycl_q.wait(); @@ -184,7 +184,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){ } } { - auto eov = write_vtk_file(out_dir,std::string{"stdkr_2d_"}+an.template get<"coupling">().stl_string(),time_steps.get(), *lbm_macro_data_ptr); + auto eov = write_vtk_file(out_dir,std::string{"ops_2d_"}+an.template get<"coupling">().stl_string(),time_steps.get(), *lbm_macro_data_ptr); if(eov.is_error()){ return eov; } diff --git a/examples/one_particle_sedimentation/step.hpp b/examples/one_particle_sedimentation_2d/step.hpp index 07f51d1..07f51d1 100644 --- a/examples/one_particle_sedimentation/step.hpp +++ b/examples/one_particle_sedimentation_2d/step.hpp diff --git a/examples/schaefer_turek_durst_krause_rannbacher/.nix/derivation.nix b/examples/schaefer_turek_durst_krause_rannbacher/.nix/derivation.nix index 958955f..af24ac5 100644 --- a/examples/schaefer_turek_durst_krause_rannbacher/.nix/derivation.nix +++ b/examples/schaefer_turek_durst_krause_rannbacher/.nix/derivation.nix @@ -8,12 +8,11 @@ , version , adaptive-cpp , kel -, particle_coupling ? "fplbm" }: let in stdenv.mkDerivation { - pname = "${pname}-examples-stdkr_2d_gpu_${particle_coupling}"; + pname = "${pname}-examples-stdkr_2d_gpu"; inherit version; src = ./..; diff --git a/modules/core/c++/abstract/stringify_schema.hpp b/modules/core/c++/abstract/stringify_schema.hpp index 866bc7e..3d6b1d1 100644 --- a/modules/core/c++/abstract/stringify_schema.hpp +++ b/modules/core/c++/abstract/stringify_schema.hpp @@ -1,6 +1,7 @@ #pragma once #include "schema.hpp" +#include "string_literal.hpp" namespace kel { namespace lbm { diff --git a/modules/core/tests/schema.cpp b/modules/core/tests/schema.cpp index 5c884b4..db82b97 100644 --- a/modules/core/tests/schema.cpp +++ b/modules/core/tests/schema.cpp @@ -1,20 +1,28 @@ #include <forstio/test/suite.hpp> -/* #include "../c++/abstract/schema.hpp" +#include "../c++/abstract/stringify_schema.hpp" namespace { namespace ts { using namespace kel::lbm::sch; -using TPtr = Ptr<UInt16>; +// using TPtr = Ptr<UInt16>; using TVal = UInt16; } - +/* SAW_TEST("Abstract/Schema/Ptr"){ using namespace kel::lbm; // static_assert(std::is_same_v<typename schema_decay<ts::TPtr>::Schema, ts::TVal>, "schema decay failed"); } -} */ + +SAW_TEST("Abstract/SchemaStringify/PrimitiveKind"){ + using namespace kel::lbm; + + using TSch = ts::UnsignedInteger; + + static constexpr auto str = schema_to_string<TSch>::value; +} +} |
