1717// ! \\author pystencils
1818// ======================================================================================================================
1919
20- // kernel generated with pystencils v1.3.7, lbmpy v1.3.7+4.gc7d65a7, sympy v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit 0aab9c0af2335b1f6fec75deae06e514ccb233ab
20+ // kernel generated with pystencils v1.3.7, lbmpy v1.3.7+8.g11f0c22, sympy
21+ // v1.12.1, lbmpy_walberla/pystencils_walberla from waLBerla commit
22+ // c69cb11d6a95d32b2280544d3d9abde1fe5fdbb5
2123
2224#include " DynamicUBBDoublePrecision.h"
2325#include " core/DataTypes.h"
@@ -47,18 +49,40 @@ namespace lbm {
4749#endif
4850// NOLINTBEGIN(readability-non-const-parameter*)
4951namespace internal_3cfabb7f34e389af9363b890d8729bed {
50- static FUNC_PREFIX void dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision (uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, int32_t indexVectorSize) {
51-
52- const int32_t f_in_inv_dir_idx[] = {0 , 2 , 1 , 4 , 3 , 6 , 5 , 10 , 9 , 8 , 7 , 16 , 15 , 18 , 17 , 12 , 11 , 14 , 13 };
53- const int32_t f_in_inv_offsets_x[] = {0 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 , -1 , 1 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 };
54- const int32_t f_in_inv_offsets_y[] = {0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , -1 , -1 , 1 , -1 , 0 , 0 , 1 , -1 , 0 , 0 };
55- const int32_t f_in_inv_offsets_z[] = {0 , 0 , 0 , 0 , 0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , -1 , -1 , -1 , -1 };
56-
57- const double weights[] = {((double )(0.33333333333333333 )), ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 ))};
58-
59- const int32_t neighbour_offset_x[] = {0 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 , -1 , 1 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 };
60- const int32_t neighbour_offset_y[] = {0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , -1 , -1 , 1 , -1 , 0 , 0 , 1 , -1 , 0 , 0 };
61- const int32_t neighbour_offset_z[] = {0 , 0 , 0 , 0 , 0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , -1 , -1 , -1 , -1 };
52+ static FUNC_PREFIX void
53+ dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision (
54+ uint8_t *RESTRICT const _data_indexVector, double *RESTRICT _data_pdfs,
55+ int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1,
56+ int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3,
57+ int32_t indexVectorSize) {
58+
59+ const int32_t f_in_inv_dir_idx[] = {0 , 2 , 1 , 4 , 3 , 6 , 5 , 10 , 9 , 8 ,
60+ 7 , 16 , 15 , 18 , 17 , 12 , 11 , 14 , 13 };
61+ const int32_t f_in_inv_offsets_x[] = {0 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 , -1 ,
62+ 1 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 };
63+ const int32_t f_in_inv_offsets_y[] = {0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , -1 ,
64+ -1 , 1 , -1 , 0 , 0 , 1 , -1 , 0 , 0 };
65+ const int32_t f_in_inv_offsets_z[] = {0 , 0 , 0 , 0 , 0 , 1 , -1 , 0 , 0 , 0 ,
66+ 0 , 1 , 1 , 1 , 1 , -1 , -1 , -1 , -1 };
67+
68+ const double weights[] = {
69+ ((double )(0.33333333333333333 )), ((double )(0.055555555555555556 )),
70+ ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )),
71+ ((double )(0.055555555555555556 )), ((double )(0.055555555555555556 )),
72+ ((double )(0.055555555555555556 )), ((double )(0.027777777777777778 )),
73+ ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )),
74+ ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )),
75+ ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )),
76+ ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )),
77+ ((double )(0.027777777777777778 )), ((double )(0.027777777777777778 )),
78+ ((double )(0.027777777777777778 ))};
79+
80+ const int32_t neighbour_offset_x[] = {0 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 , -1 ,
81+ 1 , 0 , 0 , -1 , 1 , 0 , 0 , -1 , 1 };
82+ const int32_t neighbour_offset_y[] = {0 , 1 , -1 , 0 , 0 , 0 , 0 , 1 , 1 , -1 ,
83+ -1 , 1 , -1 , 0 , 0 , 1 , -1 , 0 , 0 };
84+ const int32_t neighbour_offset_z[] = {0 , 0 , 0 , 0 , 0 , 1 , -1 , 0 , 0 , 0 ,
85+ 0 , 1 , 1 , 1 , 1 , -1 , -1 , -1 , -1 };
6286
6387#ifdef _OPENMP
6488#pragma omp parallel
@@ -72,12 +96,64 @@ static FUNC_PREFIX void dynamicubbdoubleprecision_boundary_DynamicUBBDoublePreci
7296 const int32_t y = *((int32_t *)(&_data_indexVector[40 * ctr_0 + 4 ]));
7397 const int32_t z = *((int32_t *)(&_data_indexVector[40 * ctr_0 + 8 ]));
7498 const int32_t dir = *((int32_t *)(&_data_indexVector[40 * ctr_0 + 12 ]));
75- const double vel0Term = _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 10 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 14 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 18 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 4 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 8 * _stride_pdfs_3];
76- const double vel1Term = _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 11 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 15 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 7 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3];
77- const double vel2Term = _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 12 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 13 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 5 * _stride_pdfs_3];
78- const double delta_rho = vel0Term + vel1Term + vel2Term + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 16 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 17 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 2 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 3 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 6 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + 9 * _stride_pdfs_3] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z];
99+ const double vel0Term =
100+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
101+ _stride_pdfs_2 * z + 10 * _stride_pdfs_3] +
102+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
103+ _stride_pdfs_2 * z + 14 * _stride_pdfs_3] +
104+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
105+ _stride_pdfs_2 * z + 18 * _stride_pdfs_3] +
106+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
107+ _stride_pdfs_2 * z + 4 * _stride_pdfs_3] +
108+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
109+ _stride_pdfs_2 * z + 8 * _stride_pdfs_3];
110+ const double vel1Term =
111+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
112+ _stride_pdfs_2 * z + 11 * _stride_pdfs_3] +
113+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
114+ _stride_pdfs_2 * z + 15 * _stride_pdfs_3] +
115+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
116+ _stride_pdfs_2 * z + 7 * _stride_pdfs_3] +
117+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
118+ _stride_pdfs_2 * z + _stride_pdfs_3];
119+ const double vel2Term =
120+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
121+ _stride_pdfs_2 * z + 12 * _stride_pdfs_3] +
122+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
123+ _stride_pdfs_2 * z + 13 * _stride_pdfs_3] +
124+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
125+ _stride_pdfs_2 * z + 5 * _stride_pdfs_3];
126+ const double delta_rho =
127+ vel0Term + vel1Term + vel2Term +
128+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
129+ _stride_pdfs_2 * z + 16 * _stride_pdfs_3] +
130+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
131+ _stride_pdfs_2 * z + 17 * _stride_pdfs_3] +
132+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
133+ _stride_pdfs_2 * z + 2 * _stride_pdfs_3] +
134+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
135+ _stride_pdfs_2 * z + 3 * _stride_pdfs_3] +
136+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
137+ _stride_pdfs_2 * z + 6 * _stride_pdfs_3] +
138+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
139+ _stride_pdfs_2 * z + 9 * _stride_pdfs_3] +
140+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
141+ _stride_pdfs_2 * z];
79142 const double rho = delta_rho + 1.0 ;
80- _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_0 * f_in_inv_offsets_x[dir] + _stride_pdfs_1 * y + _stride_pdfs_1 * f_in_inv_offsets_y[dir] + _stride_pdfs_2 * z + _stride_pdfs_2 * f_in_inv_offsets_z[dir] + _stride_pdfs_3 * f_in_inv_dir_idx[dir]] = -rho * (6.0 * ((double )(neighbour_offset_x[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 16 ])) + 6.0 * ((double )(neighbour_offset_y[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 24 ])) + 6.0 * ((double )(neighbour_offset_z[dir])) * *((double *)(&_data_indexVector[40 * ctr_0 + 32 ]))) * weights[dir] + _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y + _stride_pdfs_2 * z + _stride_pdfs_3 * dir];
143+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_0 * f_in_inv_offsets_x[dir] +
144+ _stride_pdfs_1 * y + _stride_pdfs_1 * f_in_inv_offsets_y[dir] +
145+ _stride_pdfs_2 * z + _stride_pdfs_2 * f_in_inv_offsets_z[dir] +
146+ _stride_pdfs_3 * f_in_inv_dir_idx[dir]] =
147+ -rho *
148+ (6.0 * ((double )(neighbour_offset_x[dir])) *
149+ *((double *)(&_data_indexVector[40 * ctr_0 + 16 ])) +
150+ 6.0 * ((double )(neighbour_offset_y[dir])) *
151+ *((double *)(&_data_indexVector[40 * ctr_0 + 24 ])) +
152+ 6.0 * ((double )(neighbour_offset_z[dir])) *
153+ *((double *)(&_data_indexVector[40 * ctr_0 + 32 ]))) *
154+ weights[dir] +
155+ _data_pdfs[_stride_pdfs_0 * x + _stride_pdfs_1 * y +
156+ _stride_pdfs_2 * z + _stride_pdfs_3 * dir];
81157 }
82158 }
83159}
@@ -92,7 +168,8 @@ static FUNC_PREFIX void dynamicubbdoubleprecision_boundary_DynamicUBBDoublePreci
92168#pragma pop
93169#endif
94170
95- void DynamicUBBDoublePrecision::run_impl (IBlock *block, IndexVectors::Type type) {
171+ void DynamicUBBDoublePrecision::run_impl (IBlock *block,
172+ IndexVectors::Type type) {
96173 auto *indexVectors = block->getData <IndexVectors>(indexVectorID);
97174 int32_t indexVectorSize = int32_c (indexVectors->indexVector (type).size ());
98175 if (indexVectorSize == 0 )
@@ -110,7 +187,10 @@ void DynamicUBBDoublePrecision::run_impl(IBlock *block, IndexVectors::Type type)
110187 const int64_t _stride_pdfs_1 = int64_t (pdfs->yStride ());
111188 const int64_t _stride_pdfs_2 = int64_t (pdfs->zStride ());
112189 const int64_t _stride_pdfs_3 = int64_t (1 * int64_t (pdfs->fStride ()));
113- internal_3cfabb7f34e389af9363b890d8729bed::dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision (_data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, indexVectorSize);
190+ internal_3cfabb7f34e389af9363b890d8729bed::
191+ dynamicubbdoubleprecision_boundary_DynamicUBBDoublePrecision (
192+ _data_indexVector, _data_pdfs, _stride_pdfs_0, _stride_pdfs_1,
193+ _stride_pdfs_2, _stride_pdfs_3, indexVectorSize);
114194}
115195
116196void DynamicUBBDoublePrecision::run (IBlock *block) {
0 commit comments