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