diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-20 18:59:15 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-20 18:59:15 +0200 |
| commit | e16b136502bc8252bcffe2f5650825d580cb258a (patch) | |
| tree | a3eaf3b0419a1c5897c344a949cf5775b1637afc /examples/stdkr_2d_bgk/common.hpp | |
| parent | 2124d0d49e122987ad080af8df53b1bb1faddf07 (diff) | |
| parent | 5cd236287542b47016fe3c49aa56bb66d74c4ad7 (diff) | |
| download | libs-lbm-e16b136502bc8252bcffe2f5650825d580cb258a.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'examples/stdkr_2d_bgk/common.hpp')
| -rw-r--r-- | examples/stdkr_2d_bgk/common.hpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/examples/stdkr_2d_bgk/common.hpp b/examples/stdkr_2d_bgk/common.hpp new file mode 100644 index 0000000..eff9d84 --- /dev/null +++ b/examples/stdkr_2d_bgk/common.hpp @@ -0,0 +1,70 @@ +#pragma once + +#include <kel/lbm/sycl/lbm.hpp> +#include <kel/lbm/lbm.hpp> +#include <kel/lbm/particle.hpp> +#include <kel/lbm/particle/particle.hpp> + +#include <forstio/io/io.hpp> +#include <forstio/remote/filesystem/easy.hpp> +#include <forstio/codec/json/json.hpp> +#include <forstio/codec/simple.hpp> + +namespace kel { +namespace lbm { +namespace method { +struct Bgk {}; +} + +/** + * length 2.2m + * height 0.41m + * viscosity 10^-3 + * particle diameter 0.1m + * position at (0.16m,0.2m) + */ + +constexpr uint64_t dim_y = 512ul; +constexpr uint64_t dim_x = static_cast<uint64_t>(dim_y * (220.0 / 41.0)); + +constexpr uint64_t particle_amount = 1ul; + +namespace sch { +using namespace saw::schema; + +using InfoChunk = Chunk<UInt8, 0u, dim_x, dim_y>; + +template<typename T, typename Desc> +using DfChunk = Chunk<FixedArray<T,Desc::Q>, 1u, dim_x, dim_y>; + +template<typename T, typename Desc> +using ScalarChunk = Chunk<Scalar<T>, 0u, dim_x, dim_y>; + +template<typename T, typename Desc> +using VectorChunk = Chunk<Vector<T,Desc::D>, 0u, dim_x, dim_y>; + +template<typename T, typename Desc> +using ChunkStruct = Struct< + Member<InfoChunk, "info">, + Member<DfChunk<T,Desc>, "dfs">, + Member<DfChunk<T,Desc>, "dfs_old"> +>; + +template<typename T, typename Desc> +using VelChunk = Chunk<Vector<T,Desc::D>, 0u, dim_x, dim_y>; + +template<typename T> +using RhoChunk = Chunk<Scalar<T>, 0u, dim_x, dim_y>; + +template<typename T, typename Desc> +using MacroStruct = Struct< + Member<VelChunk<T,Desc>, "momentum">, + Member<RhoChunk<T>, "density"> +>; + +template<typename T, typename Desc> +using ParticleSpheroidGroup = ParticleGroup<T,Desc::D,1u,coll::Spheroid<T>>; +} + +} +} |
