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_, BlockDataID rho_4ID_,
float order_0,
float order_1,
60 float order_2,
float order_3,
float order_4,
float rate_coefficient,
61 float stoech_0,
float stoech_1,
float stoech_2,
float stoech_3,
63 : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), rho_2ID(rho_2ID_),
64 rho_3ID(rho_3ID_), rho_4ID(rho_4ID_), order_0_(order_0),
65 order_1_(order_1), order_2_(order_2), order_3_(order_3),
66 order_4_(order_4), rate_coefficient_(rate_coefficient),
67 stoech_0_(stoech_0), stoech_1_(stoech_1), stoech_2_(stoech_2),
68 stoech_3_(stoech_3), stoech_4_(stoech_4) {}
73 const CellInterval &globalCellInterval,
74 cell_idx_t ghostLayers, IBlock *
block);
78 static std::function<void(IBlock *)>
79 getSweep(
const shared_ptr<ReactionKernelBulk_5_single_precision> &kernel) {
80 return [kernel](IBlock *b) { kernel->run(b); };
84 const shared_ptr<ReactionKernelBulk_5_single_precision> &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> & ,
119 inline void setOrder_0(
const float value) { order_0_ = value; }
120 inline void setOrder_1(
const float value) { order_1_ = value; }
121 inline void setOrder_2(
const float value) { order_2_ = value; }
122 inline void setOrder_3(
const float value) { order_3_ = value; }
123 inline void setOrder_4(
const float value) { order_4_ = value; }
125 rate_coefficient_ = value;
144 float rate_coefficient_;
155#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
156 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
157#pragma GCC diagnostic pop
std::function< void(IBlock *)> getSweep()
void setRate_coefficient(const float value)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void setOrder_4(const float value)
void setStoech_3(const float value)
ReactionKernelBulk_5_single_precision(BlockDataID rho_0ID_, BlockDataID rho_1ID_, BlockDataID rho_2ID_, BlockDataID rho_3ID_, BlockDataID rho_4ID_, float order_0, float order_1, float order_2, float order_3, float order_4, float rate_coefficient, float stoech_0, float stoech_1, float stoech_2, float stoech_3, float stoech_4)
float getStoech_4() const
void setStoech_1(const float value)
void setStoech_2(const float value)
float getRate_coefficient() const
void setOrder_3(const float value)
void setStoech_0(const float value)
void operator()(IBlock *block)
void setStoech_4(const float value)
static std::function< void(IBlock *)> getSweep(const shared_ptr< ReactionKernelBulk_5_single_precision > &kernel)
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< ReactionKernelBulk_5_single_precision > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
float getStoech_1() const
float getStoech_0() const
void setOrder_2(const float value)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
float getStoech_3() const
void setOrder_1(const float value)
void setOrder_0(const float value)
float getStoech_2() const
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils