33#include <core/DataTypes.h>
35#include <blockforest/StructuredBlockForest.h>
36#include <core/debug/Debug.h>
37#include <domain_decomposition/BlockDataID.h>
38#include <domain_decomposition/IBlock.h>
39#include <field/FlagField.h>
40#include <field/GhostLayerField.h>
49#pragma clang diagnostic push
50#pragma clang diagnostic ignored "-Wunused-variable"
51#pragma clang diagnostic ignored "-Wunused-parameter"
52#elif defined(__GNUC__) or defined(__GNUG__)
53#pragma GCC diagnostic push
54#pragma GCC diagnostic ignored "-Wunused-variable"
55#pragma GCC diagnostic ignored "-Wunused-parameter"
59#define RESTRICT __restrict__
61#define RESTRICT __restrict
66#ifdef WALBERLA_BUILD_WITH_HALF_PRECISION_SUPPORT
81 return x ==
o.x &&
y ==
o.y &&
z ==
o.z;
93 return other.cpuVectors_ == cpuVectors_;
99 return cpuVectors_[t].empty() ?
nullptr : cpuVectors_[t].data();
105 std::vector<CpuIndexVector> cpuVectors_{
NUM_TYPES};
109 const std::shared_ptr<StructuredBlockForest> &
blocks,
111 float rate_coefficient,
float stoech_0,
float stoech_1)
115 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
119 createIdxVector,
"IndexField_ReactionKernelIndexed_2_single_precision");
126 float rate_coefficient,
127 float stoech_0,
float stoech_1)
144 "Boundary condition was not generated including force calculation.")
149 return [
this](IBlock *b) { this->
run(b); };
153 return [
this](IBlock *b) { this->
inner(b); };
157 return [
this](IBlock *b) { this->
outer(b); };
160 template <
typename FlagField_T>
169 template <
typename FlagField_T>
232#if defined(__clang__)
233#pragma clang diagnostic pop
234#elif defined(__GNUC__) or defined(__GNUG__)
235#pragma GCC diagnostic pop
IndexInfo * pointerCpu(Type t)
bool operator==(IndexVectors const &other) const
auto const & indexVector(Type t) const
std::vector< IndexInfo > CpuIndexVector
auto & indexVector(Type t)
ReactionKernelIndexed_2_single_precision(const std::shared_ptr< StructuredBlockForest > &blocks, BlockDataID rho_0ID_, BlockDataID rho_1ID_, float order_0, float order_1, float rate_coefficient, float stoech_0, float stoech_1)
void fillFromFlagField(const std::shared_ptr< StructuredBlockForest > &blocks, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
ReactionKernelIndexed_2_single_precision(BlockDataID indexVectorID_, BlockDataID rho_0ID_, BlockDataID rho_1ID_, float order_0, float order_1, float rate_coefficient, float stoech_0, float stoech_1)
std::function< void(IBlock *)> getSweep()
Vector3< double > getForce(IBlock *)
std::function< void(IBlock *)> getOuterSweep()
std::function< void(IBlock *)> getInnerSweep()
void outer(IBlock *block)
void operator()(IBlock *block)
void fillFromFlagField(IBlock *block, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
void inner(IBlock *block)
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils
bool operator==(const IndexInfo &o) const
IndexInfo(int32_t x_, int32_t y_, int32_t z_)