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"
58 BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_,
59 BlockDataID rho_3ID_,
float order_0,
float order_1,
float order_2,
60 float order_3,
float rate_coefficient,
float stoech_0,
float stoech_1,
61 float stoech_2,
float stoech_3)
62 : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), rho_2ID(rho_2ID_),
63 rho_3ID(rho_3ID_), order_0_(order_0), order_1_(order_1),
64 order_2_(order_2), order_3_(order_3),
65 rate_coefficient_(rate_coefficient), stoech_0_(stoech_0),
66 stoech_1_(stoech_1), stoech_2_(stoech_2), stoech_3_(stoech_3) {}
71 const CellInterval &globalCellInterval,
72 cell_idx_t ghostLayers, IBlock *
block);
76 static std::function<void(IBlock *)>
77 getSweep(
const shared_ptr<ReactionKernelBulk_4_single_precision> &kernel) {
78 return [kernel](IBlock *b) { kernel->run(b); };
82 const shared_ptr<ReactionKernelBulk_4_single_precision> &kernel,
83 const shared_ptr<StructuredBlockStorage> &blocks,
84 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
85 return [kernel, blocks, globalCellInterval, ghostLayers](IBlock *b) {
86 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b);
91 return [
this](IBlock *b) { this->
run(b); };
94 std::function<void(IBlock *)>
96 const CellInterval &globalCellInterval,
97 cell_idx_t ghostLayers = 1) {
98 return [
this, blocks, globalCellInterval, ghostLayers](IBlock *b) {
103 void configure(
const shared_ptr<StructuredBlockStorage> & ,
115 inline void setOrder_0(
const float value) { order_0_ = value; }
116 inline void setOrder_1(
const float value) { order_1_ = value; }
117 inline void setOrder_2(
const float value) { order_2_ = value; }
118 inline void setOrder_3(
const float value) { order_3_ = value; }
120 rate_coefficient_ = value;
136 float rate_coefficient_;
146#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
147 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
148#pragma GCC diagnostic pop
float getStoech_0() const
void operator()(IBlock *block)
float getStoech_3() const
void setRate_coefficient(const float value)
void setOrder_1(const float value)
void setStoech_1(const float value)
float getStoech_1() const
ReactionKernelBulk_4_single_precision(BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_, BlockDataID rho_3ID_, float order_0, float order_1, float order_2, float order_3, float rate_coefficient, float stoech_0, float stoech_1, float stoech_2, float stoech_3)
void setOrder_2(const float value)
float getRate_coefficient() const
static std::function< void(IBlock *)> getSweep(const shared_ptr< ReactionKernelBulk_4_single_precision > &kernel)
void setStoech_2(const float value)
std::function< void(IBlock *)> getSweep()
void setStoech_3(const float value)
void setOrder_3(const float value)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< ReactionKernelBulk_4_single_precision > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void setOrder_0(const float value)
float getStoech_2() const
void setStoech_0(const float value)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils