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 jID_, BlockDataID phiID_, BlockDataID rhoID_,
float D,
59 float f_ext_0,
float f_ext_1,
float f_ext_2,
float kT,
float z)
60 : jID(jID_), phiID(phiID_), rhoID(rhoID_), D_(D), f_ext_0_(f_ext_0),
61 f_ext_1_(f_ext_1), f_ext_2_(f_ext_2), kT_(kT), z_(z) {}
66 const CellInterval &globalCellInterval,
67 cell_idx_t ghostLayers, IBlock *
block);
72 const shared_ptr<DiffusiveFluxKernelWithElectrostatic_single_precision>
74 return [kernel](IBlock *b) { kernel->run(b); };
78 const shared_ptr<DiffusiveFluxKernelWithElectrostatic_single_precision>
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> & ,
103 inline float getD()
const {
return D_; }
107 inline float getKt()
const {
return kT_; }
108 inline float getZ()
const {
return z_; }
109 inline void setD(
const float value) { D_ = value; }
110 inline void setF_ext_0(
const float value) { f_ext_0_ = value; }
111 inline void setF_ext_1(
const float value) { f_ext_1_ = value; }
112 inline void setF_ext_2(
const float value) { f_ext_2_ = value; }
113 inline void setKt(
const float value) { kT_ = value; }
114 inline void setZ(
const float value) { z_ = value; }
121 inline void setPhiID(BlockDataID phiID_) { phiID = phiID_; }
136#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || \
137 (defined WALBERLA_CXX_COMPILER_IS_CLANG)
138#pragma GCC diagnostic pop
void setZ(const float value)
static std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< DiffusiveFluxKernelWithElectrostatic_single_precision > &kernel, const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
void setPhiID(BlockDataID phiID_)
void setKt(const float value)
void setD(const float value)
void configure(const shared_ptr< StructuredBlockStorage > &, IBlock *)
std::function< void(IBlock *)> getSweep()
DiffusiveFluxKernelWithElectrostatic_single_precision(BlockDataID jID_, BlockDataID phiID_, BlockDataID rhoID_, float D, float f_ext_0, float f_ext_1, float f_ext_2, float kT, float z)
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
void setF_ext_1(const float value)
void operator()(IBlock *block)
void setF_ext_0(const float value)
std::function< void(IBlock *)> getSweepOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers=1)
static std::function< void(IBlock *)> getSweep(const shared_ptr< DiffusiveFluxKernelWithElectrostatic_single_precision > &kernel)
void setF_ext_2(const float value)
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils