25#include "core/DataTypes.h"
26#include "core/logging/Logging.h"
28#include "domain_decomposition/BlockDataID.h"
29#include "domain_decomposition/IBlock.h"
30#include "domain_decomposition/StructuredBlockStorage.h"
31#include "field/GhostLayerField.h"
32#include "field/SwapableCompare.h"
35#include <unordered_map>
38#define RESTRICT __restrict__
43#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
44 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
45#pragma GCC diagnostic push
46#pragma GCC diagnostic ignored "-Wunused-parameter"
47#pragma GCC diagnostic ignored "-Wreorder"
56 BlockDataID forceID_, BlockDataID pdfsID_, int64_t lebc_bot_index,
57 int64_t lebc_top_index,
float omega_bulk,
float omega_even,
58 float omega_odd,
float omega_shear,
float v_s)
59 : forceID(forceID_), pdfsID(pdfsID_), lebc_bot_index_(lebc_bot_index),
60 lebc_top_index_(lebc_top_index), omega_bulk_(omega_bulk),
61 omega_even_(omega_even), omega_odd_(omega_odd),
62 omega_shear_(omega_shear), v_s_(v_s) {}
65 for (
auto p : cache_pdfs_) {
73 const CellInterval &globalCellInterval,
74 cell_idx_t ghostLayers, IBlock *
block);
79 const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecision> &kernel) {
80 return [kernel](IBlock *b) { kernel->run(b); };
84 const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecision> &kernel,
85 const shared_ptr<StructuredBlockStorage> &blocks,
86 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
87 return [kernel, blocks, globalCellInterval, ghostLayers](IBlock *b) {
88 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b);
93 return [
this](IBlock *b) { this->
run(b); };
96 std::function<void(IBlock *)>
98 const CellInterval &globalCellInterval,
99 cell_idx_t ghostLayers = 1) {
100 return [
this, blocks, globalCellInterval, ghostLayers](IBlock *b) {
105 void configure(
const shared_ptr<StructuredBlockStorage> & ,
114 inline float getV_s()
const {
return v_s_; }
116 lebc_bot_index_ = value;
119 lebc_top_index_ = value;
125 inline void setV_s(
const float value) { v_s_ = value; }
130 int64_t lebc_bot_index_;
131 int64_t lebc_top_index_;
137 std::unordered_map<IBlock *, field::GhostLayerField<float, 19> *> cache_pdfs_;
143#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
144 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
145#pragma GCC diagnostic pop
void setOmega_shear(const float value)
void setV_s(const float value)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
void setOmega_even(const float value)
StreamCollideSweepLeesEdwardsSinglePrecision(BlockDataID forceID_, BlockDataID pdfsID_, int64_t lebc_bot_index, int64_t lebc_top_index, float omega_bulk, float omega_even, float omega_odd, float omega_shear, float v_s)
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StreamCollideSweepLeesEdwardsSinglePrecision > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
static std::function< void(IBlock *)> getSweep(const shared_ptr< StreamCollideSweepLeesEdwardsSinglePrecision > &kernel)
int64_t getLebc_top_index() const
float getOmega_shear() const
void setLebc_top_index(const int64_t value)
void setOmega_bulk(const float value)
void setOmega_odd(const float value)
~StreamCollideSweepLeesEdwardsSinglePrecision()
float getOmega_even() const
void setLebc_bot_index(const int64_t value)
float getOmega_bulk() const
int64_t getLebc_bot_index() const
void operator()(IBlock *block)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
float getOmega_odd() const
std::function< void(IBlock *)> getSweep()
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils