summaryrefslogtreecommitdiff
path: root/examples/throat_clog_2d
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-11-08 22:04:06 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-11-08 22:04:06 +0100
commitc59aeef2e0c86ec3f0f34ce77c205f3ef0b034cc (patch)
tree7e29aea25537b31040c5bb3649749706e54e5706 /examples/throat_clog_2d
parentfa6bc96b28f6654040992b282525b88d5d46aca9 (diff)
downloadlibs-lbm-c59aeef2e0c86ec3f0f34ce77c205f3ef0b034cc.tar.gz
Abstract move. Forstio independence
Diffstat (limited to 'examples/throat_clog_2d')
-rw-r--r--examples/throat_clog_2d/common.hpp1
-rw-r--r--examples/throat_clog_2d/init.hpp34
-rw-r--r--examples/throat_clog_2d/sim.cpp42
-rw-r--r--examples/throat_clog_2d/step.hpp94
4 files changed, 85 insertions, 86 deletions
diff --git a/examples/throat_clog_2d/common.hpp b/examples/throat_clog_2d/common.hpp
index 15fe08a..d74b2f9 100644
--- a/examples/throat_clog_2d/common.hpp
+++ b/examples/throat_clog_2d/common.hpp
@@ -28,7 +28,6 @@ constexpr uint64_t dim_x = dim_y * 4ul;
constexpr uint64_t particle_amount = 1ul;
namespace sch {
-using namespace saw::schema;
using InfoChunk = Chunk<UInt8, 0u, dim_x, dim_y>;
diff --git a/examples/throat_clog_2d/init.hpp b/examples/throat_clog_2d/init.hpp
index 68b2aaa..f76cd67 100644
--- a/examples/throat_clog_2d/init.hpp
+++ b/examples/throat_clog_2d/init.hpp
@@ -6,11 +6,11 @@ namespace kel {
namespace lbm {
template<typename T, typename Desc, typename Coll>
-saw::error_or<void> init(
+kel::lbm::error_or<void> init(
const converter<T>& conv,
- saw::data<sch::ChunkStruct<T,Desc>>& fields,
- saw::data<sch::MacroStruct<T,Desc>>& macros,
- saw::data<sch::ParticleSpheroidGroup<T,Desc>>& particles
+ kel::lbm::data<sch::ChunkStruct<T,Desc>>& fields,
+ kel::lbm::data<sch::MacroStruct<T,Desc>>& macros,
+ kel::lbm::data<sch::ParticleSpheroidGroup<T,Desc>>& particles
){
(void) conv;
@@ -44,11 +44,11 @@ saw::error_or<void> init(
auto w2 = w * 0.5;
auto h4 = h * 0.25;
- saw::data<T> e{0.1};
- saw::data<T> c = w * (saw::data<T>{1.0} - e) * 0.5;
+ kel::lbm::data<T> e{0.1};
+ kel::lbm::data<T> c = w * (kel::lbm::data<T>{1.0} - e) * 0.5;
- saw::data<T> d{0.2};
- auto b = h * (saw::data<T>{1.0} - d) * 0.5;
+ kel::lbm::data<T> d{0.2};
+ auto b = h * (kel::lbm::data<T>{1.0} - d) * 0.5;
auto p_r = (c*c + b*b) / (b*2);
auto p_r_2 = p_r * p_r;
@@ -56,14 +56,14 @@ saw::error_or<void> init(
auto p_i = p_r - b;
// Circle Top
- saw::data<sch::FixedArray<sch::Int64,Desc::D>> top_pos;
+ kel::lbm::data<sch::FixedArray<sch::Int64,Desc::D>> top_pos;
{
top_pos.at({0u}) = w2.get();
top_pos.at({1u}) = (h + p_i).get();
}
// Circle Bot
- saw::data<sch::FixedArray<sch::Int64,Desc::D>> bot_pos;
+ kel::lbm::data<sch::FixedArray<sch::Int64,Desc::D>> bot_pos;
{
bot_pos.at({0u}) = w2.get();
bot_pos.at({1u}) = -p_i.get();
@@ -80,11 +80,11 @@ saw::error_or<void> init(
bp_diff.at(i) = bot_pos.at(i) - index.at(i).template cast_to<sch::Int64>();
}
- auto tpd_v = saw::math::vectorize_data(tp_diff);
- auto tpd_dot = saw::math::dot(tpd_v,tpd_v);
+ auto tpd_v = kel::lbm::math::vectorize_data(tp_diff);
+ auto tpd_dot = kel::lbm::math::dot(tpd_v,tpd_v);
- auto bpd_v = saw::math::vectorize_data(bp_diff);
- auto bpd_dot = saw::math::dot(bpd_v,bpd_v);
+ auto bpd_v = kel::lbm::math::vectorize_data(bp_diff);
+ auto bpd_dot = kel::lbm::math::dot(bpd_v,bpd_v);
if(
(tpd_dot.at({}).template cast_to<T>() <= p_r_2 ) or
@@ -157,10 +157,10 @@ saw::error_or<void> init(
);
{
- saw::data<sch::Scalar<T>> radius_p;
+ kel::lbm::data<sch::Scalar<T>> radius_p;
radius_p.at({}).set(conv.meter_si_to_lbm({{0.05}}).handle().get());
std::cout<<"RADIUS: "<<radius_p.at({}).get()<<std::endl;
- saw::data<sch::Scalar<T>> dense_p;
+ kel::lbm::data<sch::Scalar<T>> dense_p;
dense_p.at({}).set(1);
particles = create_spheroid_particle_group<T,Desc::D,1u>(radius_p, dense_p, {{64u}});
auto& parts = particles.template get<"particles">();
@@ -177,7 +177,7 @@ saw::error_or<void> init(
}
}
- return saw::make_void();
+ return kel::lbm::make_void();
}
}
diff --git a/examples/throat_clog_2d/sim.cpp b/examples/throat_clog_2d/sim.cpp
index 4084353..118e1b1 100644
--- a/examples/throat_clog_2d/sim.cpp
+++ b/examples/throat_clog_2d/sim.cpp
@@ -8,7 +8,6 @@
* For deciding what parameters to use maybe?
*/
namespace args {
-using namespace saw::schema;
using LbmArgsStruct = Struct<
Member<String, "coupling">
@@ -22,7 +21,7 @@ using LbmArgs = Args<
}
template<typename T, typename Desc, typename Coll, uint64_t N>
-saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
+kel::lbm::error_or<void> lbm_main(const kel::lbm::data<args::LbmArgs>& args){
using namespace kel::lbm;
auto& an = args.template get<"args">();
@@ -41,7 +40,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
std::error_code ec;
std::filesystem::create_directories(out_dir,ec);
if(ec != std::errc{}){
- return saw::make_error<saw::err::critical>("Could not create output directory");
+ return kel::lbm::make_error<kel::lbm::err::critical>("Could not create output directory");
}
}
@@ -54,16 +53,17 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
print_lbm_meta<T,Desc>(conv,{1e-3},{1e-4},{0.2 * dim_y});
- // saw::data<sch::FixedArray<sch::UInt64,Desc::D>> meta{{dim_x,dim_y}};
- auto lbm_data_ptr = saw::heap<saw::data<sch::ChunkStruct<T,Desc>>>();
- auto lbm_macro_data_ptr = saw::heap<saw::data<sch::MacroStruct<T,Desc>>>();
- auto lbm_particle_data_ptr = saw::heap<saw::data<sch::ParticleSpheroidGroup<T,Desc>>>();
+ // kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> meta{{dim_x,dim_y}};
+ auto lbm_data_ptr = kel::lbm::heap<kel::lbm::data<sch::ChunkStruct<T,Desc>>>();
+ auto lbm_macro_data_ptr = kel::lbm::heap<kel::lbm::data<sch::MacroStruct<T,Desc>>>();
+ auto lbm_particle_data_ptr = kel::lbm::heap<kel::lbm::data<sch::ParticleSpheroidGroup<T,Desc>>>();
std::cout<<"Estimated Bytes: "<<memory_estimate<sch::ChunkStruct<T,Desc>,sch::MacroStruct<T,Desc>>().get()<<std::endl;
auto eo_aio = saw::setup_async_io();
if(eo_aio.is_error()){
- return std::move(eo_aio.get_error());
+ return kel::lbm::make_error<kel::lbm::err::critical>(
+ std::string{eo_aio.get_error().get_message()});
}
auto& aio = eo_aio.get_value();
saw::wait_scope wait{aio.event_loop};
@@ -101,9 +101,9 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
}
sycl_q.wait();
- saw::data<sch::ChunkStruct<T,Desc>, encode::Sycl<saw::encode::Native>> lbm_sycl_data{sycl_q};
- saw::data<sch::MacroStruct<T,Desc>, encode::Sycl<saw::encode::Native>> lbm_sycl_macro_data{sycl_q};
- saw::data<sch::ParticleSpheroidGroup<T,Desc>, encode::Sycl<saw::encode::Native>> lbm_sycl_particle_data{sycl_q};
+ kel::lbm::data<sch::ChunkStruct<T,Desc>, encode::Sycl<kel::lbm::enc::Native>> lbm_sycl_data{sycl_q};
+ kel::lbm::data<sch::MacroStruct<T,Desc>, encode::Sycl<kel::lbm::enc::Native>> lbm_sycl_macro_data{sycl_q};
+ kel::lbm::data<sch::ParticleSpheroidGroup<T,Desc>, encode::Sycl<kel::lbm::enc::Native>> lbm_sycl_particle_data{sycl_q};
sycl_q.wait();
{
@@ -129,11 +129,11 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
auto lsdm_view = make_view(lbm_sycl_macro_data);
auto lsdp_view = make_view(lbm_sycl_particle_data);
- saw::data<sch::UInt64> time_steps{256u*512ul};
+ kel::lbm::data<sch::UInt64> time_steps{256u*512ul};
auto& info_f = lsd_view.template get<"info">();
- for(saw::data<sch::UInt64> i{0u}; i < time_steps and krun; ++i){
+ for(kel::lbm::data<sch::UInt64> i{0u}; i < time_steps and krun; ++i){
// BC + Collision
{
auto eov = step<T,Desc,Coll>(conv,lsd_view,lsdm_view,lsdp_view,i,dev);
@@ -159,10 +159,10 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
}
// Stream
sycl_q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::Stream,encode::Sycl<saw::encode::Native>> stream;
+ component<T,Desc,cmpt::Stream,encode::Sycl<kel::lbm::enc::Native>> stream;
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -203,16 +203,16 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
}
}
sycl_q.wait();
- return saw::make_void();
+ return kel::lbm::make_void();
}
using FloatT = kel::lbm::sch::Float32;
using DescT = kel::lbm::sch::D2Q9;
-saw::error_or<void> k_main(int argc, char** argv){
+kel::lbm::error_or<void> k_main(int argc, char** argv){
using namespace kel::lbm;
- saw::data<args::LbmArgs> args;
+ kel::lbm::data<args::LbmArgs> args;
{
auto eov = saw::parse_args(args,argc,argv);
if(eov.is_error()){
@@ -222,11 +222,11 @@ saw::error_or<void> k_main(int argc, char** argv){
auto& an = args.template get<"args">();
auto& coupling = an.template get<"coupling">();
- auto resolution_resolve = [&]<typename Cpl>() -> saw::error_or<void>{
+ auto resolution_resolve = [&]<typename Cpl>() -> kel::lbm::error_or<void>{
return lbm_main<FloatT,DescT,Cpl,1u>(args);
};
- auto coupling_resolve = [&]() -> saw::error_or<void> {
+ auto coupling_resolve = [&]() -> kel::lbm::error_or<void> {
if(coupling.stl_view() == "hlbm"){
return resolution_resolve.template operator()<method::Hlbm>();
} else if(coupling.stl_view() == "fplbm"){
@@ -238,7 +238,7 @@ saw::error_or<void> k_main(int argc, char** argv){
return coupling_resolve();
- return saw::make_error<saw::err::critical>("Invalid coupling");
+ return kel::lbm::make_error<kel::lbm::err::critical>("Invalid coupling");
}
diff --git a/examples/throat_clog_2d/step.hpp b/examples/throat_clog_2d/step.hpp
index dab9178..840f8ba 100644
--- a/examples/throat_clog_2d/step.hpp
+++ b/examples/throat_clog_2d/step.hpp
@@ -6,15 +6,15 @@ namespace kel {
namespace lbm {
template<typename T, typename Desc, typename Coll>
-saw::error_or<void> step(
+kel::lbm::error_or<void> step(
const converter<T>& conv,
- saw::data<sch::Ptr<sch::ChunkStruct<T,Desc>>,encode::Sycl<saw::encode::Native>>& fields,
- saw::data<sch::Ptr<sch::MacroStruct<T,Desc>>,encode::Sycl<saw::encode::Native>>& macros,
- saw::data<sch::Ptr<sch::ParticleSpheroidGroup<T,Desc>>,encode::Sycl<saw::encode::Native>>& particles,
- saw::data<sch::UInt64> t_i,
+ kel::lbm::data<sch::Ptr<sch::ChunkStruct<T,Desc>>,encode::Sycl<kel::lbm::enc::Native>>& fields,
+ kel::lbm::data<sch::Ptr<sch::MacroStruct<T,Desc>>,encode::Sycl<kel::lbm::enc::Native>>& macros,
+ kel::lbm::data<sch::Ptr<sch::ParticleSpheroidGroup<T,Desc>>,encode::Sycl<kel::lbm::enc::Native>>& particles,
+ kel::lbm::data<sch::UInt64> t_i,
device& dev
){
- static constexpr saw::data<sch::UInt64> sub_steps{0u};
+ static constexpr kel::lbm::data<sch::UInt64> sub_steps{0u};
auto& q = dev.get_handle();
auto& info_f = fields.template get<"info">();
@@ -22,9 +22,9 @@ saw::error_or<void> step(
if constexpr ( std::is_same_v<Coll, method::Hlbm> ){
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::HlbmReset,encode::Sycl<saw::encode::Native>> hlbm_reset;
+ component<T,Desc,cmpt::HlbmReset,encode::Sycl<kel::lbm::enc::Native>> hlbm_reset;
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -33,10 +33,10 @@ saw::error_or<void> step(
});
}).wait();
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::HlbmOneParticle,encode::Sycl<saw::encode::Native>> hlbm_one_part;
+ component<T,Desc,cmpt::HlbmOneParticle,encode::Sycl<kel::lbm::enc::Native>> hlbm_one_part;
h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){
- saw::data<sch::FixedArray<sch::UInt64,1u>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,1u>> index;
for(uint64_t i = 0u; i < 1u; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -46,12 +46,12 @@ saw::error_or<void> step(
}).wait();
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::Hlbm,encode::Sycl<saw::encode::Native>> collision{0.8201};
- component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb;
- component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<saw::encode::Native>> flow_out{1.0};
+ component<T,Desc,cmpt::Hlbm,encode::Sycl<kel::lbm::enc::Native>> collision{0.8201};
+ component<T,Desc,cmpt::BounceBack,encode::Sycl<kel::lbm::enc::Native>> bb;
+ component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<kel::lbm::enc::Native>> flow_out{1.0};
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -69,10 +69,10 @@ saw::error_or<void> step(
break;
case 3u:
{
- component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<saw::encode::Native>> flow_in{
- [&]() -> saw::data<sch::Vector<T,Desc::D>> {
- saw::data<sch::Vector<T,Desc::D>> vel;
- saw::data<T> scale;
+ component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<kel::lbm::enc::Native>> flow_in{
+ [&]() -> kel::lbm::data<sch::Vector<T,Desc::D>> {
+ kel::lbm::data<sch::Vector<T,Desc::D>> vel;
+ kel::lbm::data<T> scale;
{
scale.set([&](){
if(t_i.get() > 1024u){
@@ -84,7 +84,7 @@ saw::error_or<void> step(
}
{
auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle();
- vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((0.1 / 0.64) * y_si.get() - (0.1 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle() * scale;
+ vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename kel::lbm::native_data_type<T>::type>((0.1 / 0.64) * y_si.get() - (0.1 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle() * scale;
vel.at({{1u}}) = 0.0f;
}
return vel;
@@ -105,9 +105,9 @@ saw::error_or<void> step(
}).wait();
}else if constexpr ( std::is_same_v<Coll, method::FpLbm> ){
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::FpLbmReset,encode::Sycl<saw::encode::Native>> fplbm_reset;
+ component<T,Desc,cmpt::FpLbmReset,encode::Sycl<kel::lbm::enc::Native>> fplbm_reset;
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -117,11 +117,11 @@ saw::error_or<void> step(
}).wait();
q.submit([&](acpp::sycl::handler& h){
- saw::data<sch::Vector<T,Desc::D>> grav;
- component<T,Desc,cmpt::FpLbmOneParticle,encode::Sycl<saw::encode::Native>> fplbm_one_part{grav};
+ kel::lbm::data<sch::Vector<T,Desc::D>> grav;
+ component<T,Desc,cmpt::FpLbmOneParticle,encode::Sycl<kel::lbm::enc::Native>> fplbm_one_part{grav};
h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){
- saw::data<sch::FixedArray<sch::UInt64,1u>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,1u>> index;
for(uint64_t i = 0u; i < 1u; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -132,13 +132,13 @@ saw::error_or<void> step(
// auto coll_ev =
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::BGK,encode::Sycl<saw::encode::Native>> bgk{0.8201};
- component<T,Desc,cmpt::FpLbm,encode::Sycl<saw::encode::Native>> collision{0.8201};
- component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb;
- component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<saw::encode::Native>> flow_out{1.0};
+ component<T,Desc,cmpt::BGK,encode::Sycl<kel::lbm::enc::Native>> bgk{0.8201};
+ component<T,Desc,cmpt::FpLbm,encode::Sycl<kel::lbm::enc::Native>> collision{0.8201};
+ component<T,Desc,cmpt::BounceBack,encode::Sycl<kel::lbm::enc::Native>> bb;
+ component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<kel::lbm::enc::Native>> flow_out{1.0};
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -156,12 +156,12 @@ saw::error_or<void> step(
break;
case 3u:
{
- component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<saw::encode::Native>> flow_in{
- [&]() -> saw::data<sch::Vector<T,Desc::D>> {
- saw::data<sch::Vector<T,Desc::D>> vel;
+ component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<kel::lbm::enc::Native>> flow_in{
+ [&]() -> kel::lbm::data<sch::Vector<T,Desc::D>> {
+ kel::lbm::data<sch::Vector<T,Desc::D>> vel;
{
auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle();
- vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((0.01 / 0.64) * y_si.get() - (0.01 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle();
+ vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename kel::lbm::native_data_type<T>::type>((0.01 / 0.64) * y_si.get() - (0.01 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle();
vel.at({{1u}}) = 0.0f;
}
return vel;
@@ -182,9 +182,9 @@ saw::error_or<void> step(
}).wait();
}else if constexpr ( std::is_same_v<Coll, method::Psm> ){
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::PsmReset,encode::Sycl<saw::encode::Native>> fplbm_reset;
+ component<T,Desc,cmpt::PsmReset,encode::Sycl<kel::lbm::enc::Native>> fplbm_reset;
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -194,10 +194,10 @@ saw::error_or<void> step(
}).wait();
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::PsmOneParticle,encode::Sycl<saw::encode::Native>> fplbm_one_part;
+ component<T,Desc,cmpt::PsmOneParticle,encode::Sycl<kel::lbm::enc::Native>> fplbm_one_part;
h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){
- saw::data<sch::FixedArray<sch::UInt64,1u>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,1u>> index;
for(uint64_t i = 0u; i < 1u; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -208,13 +208,13 @@ saw::error_or<void> step(
// auto coll_ev =
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::BGK,encode::Sycl<saw::encode::Native>> bgk{0.8201};
- component<T,Desc,cmpt::Psm,encode::Sycl<saw::encode::Native>> collision{0.8201};
- component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb;
- component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<saw::encode::Native>> flow_out{1.0};
+ component<T,Desc,cmpt::BGK,encode::Sycl<kel::lbm::enc::Native>> bgk{0.8201};
+ component<T,Desc,cmpt::Psm,encode::Sycl<kel::lbm::enc::Native>> collision{0.8201};
+ component<T,Desc,cmpt::BounceBack,encode::Sycl<kel::lbm::enc::Native>> bb;
+ component<T,Desc,cmpt::ZouHeHorizontal<false>,encode::Sycl<kel::lbm::enc::Native>> flow_out{1.0};
h.parallel_for(acpp::sycl::range<Desc::D>{dim_x,dim_y}, [=](acpp::sycl::id<Desc::D> idx){
- saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
+ kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> index;
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
@@ -232,12 +232,12 @@ saw::error_or<void> step(
break;
case 3u:
{
- component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<saw::encode::Native>> flow_in{
- [&]() -> saw::data<sch::Vector<T,Desc::D>> {
- saw::data<sch::Vector<T,Desc::D>> vel;
+ component<T,Desc,cmpt::ZouHeVelocityX<true>,encode::Sycl<kel::lbm::enc::Native>> flow_in{
+ [&]() -> kel::lbm::data<sch::Vector<T,Desc::D>> {
+ kel::lbm::data<sch::Vector<T,Desc::D>> vel;
{
auto y_si = conv.meter_lbm_to_si(index.at({{1u}}).template cast_to<T>()).handle();
- vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename saw::native_data_type<T>::type>((1.2 / 0.64) * y_si.get() - (1.2 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle();
+ vel.at({{0u}}) = conv.velocity_si_to_lbm({{static_cast<typename kel::lbm::native_data_type<T>::type>((1.2 / 0.64) * y_si.get() - (1.2 / (0.64*0.64)) * y_si.get() * y_si.get())}}).handle();
vel.at({{1u}}) = 0.0f;
}
return vel;
@@ -259,7 +259,7 @@ saw::error_or<void> step(
}
- return saw::make_void();
+ return kel::lbm::make_void();
}
}