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_1ID_,
float order_0,
59 float order_1,
float rate_coefficient,
60 float stoech_0,
float stoech_1)
61 : rho_0ID(rho_0ID_), rho_1ID(rho_1ID_), order_0_(order_0),
62 order_1_(order_1), rate_coefficient_(rate_coefficient),
63 stoech_0_(stoech_0), stoech_1_(stoech_1) {}
68 const CellInterval &globalCellInterval,
69 cell_idx_t ghostLayers, IBlock *
block);
73 static std::function<void(IBlock *)>
74 getSweep(
const shared_ptr<ReactionKernelBulk_2_single_precision> &kernel) {
75 return [kernel](IBlock *b) { kernel->run(b); };
79 const shared_ptr<ReactionKernelBulk_2_single_precision> &kernel,
80 const shared_ptr<StructuredBlockStorage> &blocks,
81 const CellInterval &globalCellInterval, cell_idx_t ghostLayers = 1) {
82 return [kernel, blocks, globalCellInterval, ghostLayers](IBlock *b) {
83 kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b);
88 return [
this](IBlock *b) { this->
run(b); };
91 std::function<void(IBlock *)>
93 const CellInterval &globalCellInterval,
94 cell_idx_t ghostLayers = 1) {
95 return [
this, blocks, globalCellInterval, ghostLayers](IBlock *b) {
100 void configure(
const shared_ptr<StructuredBlockStorage> & ,
108 inline void setOrder_0(
const float value) { order_0_ = value; }
109 inline void setOrder_1(
const float value) { order_1_ = value; }
111 rate_coefficient_ = value;
121 float rate_coefficient_;
129#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
130 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
131#pragma GCC diagnostic pop
static std::function< void(IBlock *)> getSweep(const shared_ptr< ReactionKernelBulk_2_single_precision > &kernel)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
void setOrder_1(const float value)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
float getStoech_0() const
void setOrder_0(const float value)
std::function< void(IBlock *)> getSweep()
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< ReactionKernelBulk_2_single_precision > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void setStoech_1(const float value)
float getStoech_1() const
float getRate_coefficient() const
ReactionKernelBulk_2_single_precision(BlockDataID rho_0ID_, BlockDataID rho_1ID_, float order_0, float order_1, float rate_coefficient, float stoech_0, float stoech_1)
void setRate_coefficient(const float value)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
void setStoech_0(const float value)
void operator()(IBlock *block)
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils