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"
58 float omega_shear,
float v_s)
59 : forceID(forceID_), pdfsID(pdfsID_), grid_size_(grid_size),
60 omega_shear_(omega_shear), v_s_(v_s) {}
63 for (
auto p : cache_pdfs_) {
71 const CellInterval &globalCellInterval,
72 cell_idx_t ghostLayers, IBlock *
block);
76 static std::function<void(IBlock *)>
77 getSweep(
const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecisionAVX>
79 return [kernel](IBlock *b) { kernel->run(b); };
83 const shared_ptr<StreamCollideSweepLeesEdwardsSinglePrecisionAVX> &kernel,
84 const shared_ptr<StructuredBlockStorage> &blocks,
85 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
86 return [kernel, blocks, globalCellInterval, ghostLayers](IBlock *b) {
87 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b);
92 return [
this](IBlock *b) { this->
run(b); };
95 std::function<void(IBlock *)>
97 const CellInterval &globalCellInterval,
98 cell_idx_t ghostLayers = 1) {
99 return [
this, blocks, globalCellInterval, ghostLayers](IBlock *b) {
104 void configure(
const shared_ptr<StructuredBlockStorage> & ,
109 inline float getV_s()
const {
return v_s_; }
112 inline void setV_s(
const float value) { v_s_ = value; }
120 std::unordered_map<IBlock *, field::GhostLayerField<float, 19> *> cache_pdfs_;
126#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
127 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
128#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