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__
40#define RESTRICT __restrict
45#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
46 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
47#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wunused-parameter"
49#pragma GCC diagnostic ignored "-Wreorder"
60 float omega_shear,
float v_s)
61 : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size),
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);
78 static std::function<void(IBlock *)>
79 getSweep(
const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecisionAVX>
81 return [kernel](IBlock *b) { kernel->run(b); };
85 const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecisionAVX> &kernel,
86 const shared_ptr<StructuredBlockStorage> &blocks,
87 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
88 return [kernel, blocks, globalCellInterval, ghostLayers](IBlock *b) {
89 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b);
94 return [
this](IBlock *b) { this->
run(b); };
97 std::function<void(IBlock *)>
99 const CellInterval &globalCellInterval,
100 cell_idx_t ghostLayers = 1) {
101 return [
this, blocks, globalCellInterval, ghostLayers](IBlock *b) {
106 void configure(
const shared_ptr<StructuredBlockStorage> & ,
111 inline float getV_s()
const {
return v_s_; }
114 inline void setV_s(
const float value) { v_s_ = value; }
122 std::unordered_map<IBlock *, field::GhostLayerField<float, 19> *> cache_pdfs_;
128#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
129 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
130#pragma GCC diagnostic pop
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
void setOmega_shear(const float value)
static std::function< void(IBlock *)> getSweep(const shared_ptr< StreamCollideSweepLeesEdwardsSinglePrecisionAVX > &kernel)
float getOmega_shear() const
std::function< void(IBlock *)> getSweep()
float getGrid_size() const
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StreamCollideSweepLeesEdwardsSinglePrecisionAVX > &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)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void setV_s(const float value)
void operator()(IBlock *block)
StreamCollideSweepLeesEdwardsSinglePrecisionAVX(BlockDataID forceID_, BlockDataID pdfsID_, float grid_size, float omega_shear, float v_s)
~StreamCollideSweepLeesEdwardsSinglePrecisionAVX()
void setGrid_size(const float value)
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils