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);
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> & ,
110 inline float getV_s()
const {
return v_s_; }
113 inline void setV_s(
const float value) { v_s_ = value; }
121 std::unordered_map<IBlock *, field::GhostLayerField<float, 19> *> cache_pdfs_;
127#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
128 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
129#pragma GCC diagnostic pop
void setOmega_shear(const float value)
void setV_s(const float value)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
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)
float getOmega_shear() const
~StreamCollideSweepLeesEdwardsSinglePrecision()
float getGrid_size() const
void operator()(IBlock *block)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
StreamCollideSweepLeesEdwardsSinglePrecision(BlockDataID forceID_, BlockDataID pdfsID_, float grid_size, float omega_shear, float v_s)
void setGrid_size(const float value)
std::function< void(IBlock *)> getSweep()
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils