23#include "core/DataTypes.h"
24#include "core/Macros.h"
34#pragma GCC diagnostic push
35#pragma GCC diagnostic ignored "-Wstrict-aliasing"
36#pragma GCC diagnostic ignored "-Wunused-variable"
37#pragma GCC diagnostic ignored "-Wconversion"
42#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
43#pragma nv_diag_suppress 177
45#pragma diag_suppress 177
49namespace internal_7ded543b40ca402e5e3102728843f000 {
50static FUNC_PREFIX void reactionkernelindexed_4_double_precision_boundary_ReactionKernelIndexed_4_double_precision(uint8_t *
RESTRICT const _data_indexVector,
double *
RESTRICT _data_rho_0,
double *
RESTRICT _data_rho_1,
double *
RESTRICT _data_rho_2,
double *
RESTRICT _data_rho_3, int64_t
const _stride_rho_0_0, int64_t
const _stride_rho_0_1, int64_t
const _stride_rho_0_2, int64_t
const _stride_rho_1_0, int64_t
const _stride_rho_1_1, int64_t
const _stride_rho_1_2, int64_t
const _stride_rho_2_0, int64_t
const _stride_rho_2_1, int64_t
const _stride_rho_2_2, int64_t
const _stride_rho_3_0, int64_t
const _stride_rho_3_1, int64_t
const _stride_rho_3_2, int32_t indexVectorSize,
double order_0,
double order_1,
double order_2,
double order_3,
double rate_coefficient,
double stoech_0,
double stoech_1,
double stoech_2,
double stoech_3) {
51 for (int64_t ctr_0 = 0; ctr_0 < indexVectorSize; ctr_0 += 1) {
52 const int32_t x = *((int32_t *)(&_data_indexVector[12 * ctr_0]));
53 const int32_t y = *((int32_t *)(&_data_indexVector[12 * ctr_0 + 4]));
54 const int32_t z = *((int32_t *)(&_data_indexVector[12 * ctr_0 + 8]));
56 const double local_rho_0 = _data_rho_0[_stride_rho_0_0 * x + _stride_rho_0_1 * y + _stride_rho_0_2 * z];
57 const double local_rho_1 = _data_rho_1[_stride_rho_1_0 * x + _stride_rho_1_1 * y + _stride_rho_1_2 * z];
58 const double local_rho_2 = _data_rho_2[_stride_rho_2_0 * x + _stride_rho_2_1 * y + _stride_rho_2_2 * z];
59 const double local_rho_3 = _data_rho_3[_stride_rho_3_0 * x + _stride_rho_3_1 * y + _stride_rho_3_2 * z];
60 const double rate_factor = pow(local_rho_0, order_0) * pow(local_rho_1, order_1) * pow(local_rho_2, order_2) * pow(local_rho_3, order_3) * rate_coefficient;
61 _data_rho_0[_stride_rho_0_0 * x + _stride_rho_0_1 * y + _stride_rho_0_2 * z] = local_rho_0 + rate_factor * stoech_0;
62 _data_rho_1[_stride_rho_1_0 * x + _stride_rho_1_1 * y + _stride_rho_1_2 * z] = local_rho_1 + rate_factor * stoech_1;
63 _data_rho_2[_stride_rho_2_0 * x + _stride_rho_2_1 * y + _stride_rho_2_2 * z] = local_rho_2 + rate_factor * stoech_2;
64 _data_rho_3[_stride_rho_3_0 * x + _stride_rho_3_1 * y + _stride_rho_3_2 * z] = local_rho_3 + rate_factor * stoech_3;
71#pragma GCC diagnostic pop
78void ReactionKernelIndexed_4_double_precision::run_impl(IBlock *
block, IndexVectors::Type type) {
79 auto *indexVectors =
block->uncheckedFastGetData<IndexVectors>(indexVectorID);
80 int32_t indexVectorSize = int32_c(indexVectors->indexVector(type).size());
81 if (indexVectorSize == 0)
84 auto pointer = indexVectors->pointerCpu(type);
86 uint8_t *_data_indexVector =
reinterpret_cast<uint8_t *
>(pointer);
88 auto rho_0 =
block->getData<field::GhostLayerField<double, 1>>(
rho_0ID);
89 auto rho_3 =
block->getData<field::GhostLayerField<double, 1>>(
rho_3ID);
90 auto rho_1 =
block->getData<field::GhostLayerField<double, 1>>(
rho_1ID);
91 auto rho_2 =
block->getData<field::GhostLayerField<double, 1>>(
rho_2ID);
102 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_0->nrOfGhostLayers()))
103 double *
RESTRICT _data_rho_0 = rho_0->dataAt(0, 0, 0, 0);
104 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_1->nrOfGhostLayers()))
105 double *
RESTRICT _data_rho_1 = rho_1->dataAt(0, 0, 0, 0);
106 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_2->nrOfGhostLayers()))
107 double *
RESTRICT _data_rho_2 = rho_2->dataAt(0, 0, 0, 0);
108 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(rho_3->nrOfGhostLayers()))
109 double *
RESTRICT _data_rho_3 = rho_3->dataAt(0, 0, 0, 0);
110 const int64_t _stride_rho_0_0 = int64_t(rho_0->xStride());
111 const int64_t _stride_rho_0_1 = int64_t(rho_0->yStride());
112 const int64_t _stride_rho_0_2 = int64_t(rho_0->zStride());
113 const int64_t _stride_rho_1_0 = int64_t(rho_1->xStride());
114 const int64_t _stride_rho_1_1 = int64_t(rho_1->yStride());
115 const int64_t _stride_rho_1_2 = int64_t(rho_1->zStride());
116 const int64_t _stride_rho_2_0 = int64_t(rho_2->xStride());
117 const int64_t _stride_rho_2_1 = int64_t(rho_2->yStride());
118 const int64_t _stride_rho_2_2 = int64_t(rho_2->zStride());
119 const int64_t _stride_rho_3_0 = int64_t(rho_3->xStride());
120 const int64_t _stride_rho_3_1 = int64_t(rho_3->yStride());
121 const int64_t _stride_rho_3_2 = int64_t(rho_3->zStride());
122 internal_7ded543b40ca402e5e3102728843f000::reactionkernelindexed_4_double_precision_boundary_ReactionKernelIndexed_4_double_precision(_data_indexVector, _data_rho_0, _data_rho_1, _data_rho_2, _data_rho_3, _stride_rho_0_0, _stride_rho_0_1, _stride_rho_0_2, _stride_rho_1_0, _stride_rho_1_1, _stride_rho_1_2, _stride_rho_2_0, _stride_rho_2_1, _stride_rho_2_2, _stride_rho_3_0, _stride_rho_3_1, _stride_rho_3_2, indexVectorSize, order_0, order_1, order_2, order_3, rate_coefficient, stoech_0, stoech_1, stoech_2, stoech_3);
#define FUNC_PREFIX
\file AdvectiveFluxKernel_double_precision.cpp \author pystencils
#define RESTRICT
\file AdvectiveFluxKernel_double_precision.h \author pystencils
void outer(IBlock *block)
void inner(IBlock *block)
static double * block(double *p, std::size_t index, std::size_t size)
static FUNC_PREFIX void reactionkernelindexed_4_double_precision_boundary_ReactionKernelIndexed_4_double_precision(uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_rho_0, double *RESTRICT _data_rho_1, double *RESTRICT _data_rho_2, double *RESTRICT _data_rho_3, int64_t const _stride_rho_0_0, int64_t const _stride_rho_0_1, int64_t const _stride_rho_0_2, int64_t const _stride_rho_1_0, int64_t const _stride_rho_1_1, int64_t const _stride_rho_1_2, int64_t const _stride_rho_2_0, int64_t const _stride_rho_2_1, int64_t const _stride_rho_2_2, int64_t const _stride_rho_3_0, int64_t const _stride_rho_3_1, int64_t const _stride_rho_3_2, int32_t indexVectorSize, double order_0, double order_1, double order_2, double order_3, double rate_coefficient, double stoech_0, double stoech_1, double stoech_2, double stoech_3)
\file PackInfoPdfDoublePrecision.cpp \author pystencils