Loading [MathJax]/extensions/TeX/AMSmath.js
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
CollideSweepSinglePrecisionThermalized.cpp
Go to the documentation of this file.
1//======================================================================================================================
2//
3// This file is part of waLBerla. waLBerla is free software: you can
4// redistribute it and/or modify it under the terms of the GNU General Public
5// License as published by the Free Software Foundation, either version 3 of
6// the License, or (at your option) any later version.
7//
8// waLBerla is distributed in the hope that it will be useful, but WITHOUT
9// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11// for more details.
12//
13// You should have received a copy of the GNU General Public License along
14// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
15//
16//! \\file CollideSweepSinglePrecisionThermalized.cpp
17//! \\author pystencils
18//======================================================================================================================
19
20// kernel generated with pystencils v1.3.3, lbmpy v1.3.3, lbmpy_walberla/pystencils_walberla from waLBerla commit b0842e1a493ce19ef1bbb8d2cf382fc343970a7f
21
22#include <cmath>
23
25#include "core/DataTypes.h"
26#include "core/Macros.h"
27
28#include "philox_rand.h"
29
30#define FUNC_PREFIX
31
32#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG)
33#pragma GCC diagnostic push
34#pragma GCC diagnostic ignored "-Wfloat-equal"
35#pragma GCC diagnostic ignored "-Wshadow"
36#pragma GCC diagnostic ignored "-Wconversion"
37#pragma GCC diagnostic ignored "-Wunused-variable"
38#endif
39
40#if (defined WALBERLA_CXX_COMPILER_IS_INTEL)
41#pragma warning push
42#pragma warning(disable : 1599)
43#endif
44
45using namespace std;
46
47namespace walberla {
48namespace pystencils {
49
50namespace internal_69764eed2d0964e29e3b97d1054b4693 {
51static FUNC_PREFIX void collidesweepsingleprecisionthermalized_collidesweepsingleprecisionthermalized(float *RESTRICT const _data_force, float *RESTRICT _data_pdfs, int64_t const _size_force_0, int64_t const _size_force_1, int64_t const _size_force_2, int64_t const _stride_force_0, int64_t const _stride_force_1, int64_t const _stride_force_2, int64_t const _stride_force_3, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, uint32_t block_offset_0, uint32_t block_offset_1, uint32_t block_offset_2, float kT, float omega_bulk, float omega_even, float omega_odd, float omega_shear, uint32_t seed, uint32_t time_step) {
52 const float xi_28 = omega_bulk * 0.5f;
53 const float xi_55 = omega_shear * 0.041666666666666664f;
54 const float xi_60 = omega_bulk * 0.041666666666666664f;
55 const float xi_71 = omega_shear * 0.125f;
56 const float xi_109 = 2.4494897427831779f;
57 const float xi_134 = omega_odd * 0.25f;
58 const float xi_145 = omega_odd * 0.083333333333333329f;
59 const float xi_198 = omega_shear * 0.25f;
60 const float xi_211 = omega_odd * 0.041666666666666664f;
61 const float xi_213 = omega_odd * 0.125f;
62 const float rr_0 = 0.0f;
63 const float xi_53 = rr_0 * 0.041666666666666664f;
64 for (int64_t ctr_2 = 0; ctr_2 < _size_force_2; ctr_2 += 1) {
65 for (int64_t ctr_1 = 0; ctr_1 < _size_force_1; ctr_1 += 1) {
66 for (int64_t ctr_0 = 0; ctr_0 < _size_force_0; ctr_0 += 1) {
67 const float xi_244 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2 + _stride_force_3];
68 const float xi_245 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 17 * _stride_pdfs_3];
69 const float xi_246 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2];
70 const float xi_247 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 16 * _stride_pdfs_3];
71 const float xi_248 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 3 * _stride_pdfs_3];
72 const float xi_249 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 8 * _stride_pdfs_3];
73 const float xi_250 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2];
74 const float xi_251 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + _stride_pdfs_3];
75 const float xi_252 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 2 * _stride_pdfs_3];
76 const float xi_253 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 12 * _stride_pdfs_3];
77 const float xi_254 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 15 * _stride_pdfs_3];
78 const float xi_255 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 7 * _stride_pdfs_3];
79 const float xi_256 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2 + 2 * _stride_force_3];
80 const float xi_257 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 18 * _stride_pdfs_3];
81 const float xi_258 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 10 * _stride_pdfs_3];
82 const float xi_259 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 13 * _stride_pdfs_3];
83 const float xi_260 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 6 * _stride_pdfs_3];
84 const float xi_261 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 9 * _stride_pdfs_3];
85 const float xi_262 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 14 * _stride_pdfs_3];
86 const float xi_263 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 5 * _stride_pdfs_3];
87 const float xi_264 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 11 * _stride_pdfs_3];
88 const float xi_265 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 4 * _stride_pdfs_3];
89
90 float random_3_0{};
91 float random_3_1{};
92 float random_3_2{};
93 float random_3_3{};
94 if (kT > 0.) {
95 philox_float4(time_step, block_offset_0 + ctr_0, block_offset_1 + ctr_1, block_offset_2 + ctr_2, 3, seed, random_3_0, random_3_1, random_3_2, random_3_3);
96 }
97
98 float random_2_0{};
99 float random_2_1{};
100 float random_2_2{};
101 float random_2_3{};
102 if (kT > 0.) {
103 philox_float4(time_step, block_offset_0 + ctr_0, block_offset_1 + ctr_1, block_offset_2 + ctr_2, 2, seed, random_2_0, random_2_1, random_2_2, random_2_3);
104 }
105
106 float random_1_0{};
107 float random_1_1{};
108 float random_1_2{};
109 float random_1_3{};
110 if (kT > 0.) {
111 philox_float4(time_step, block_offset_0 + ctr_0, block_offset_1 + ctr_1, block_offset_2 + ctr_2, 1, seed, random_1_0, random_1_1, random_1_2, random_1_3);
112 }
113
114 float random_0_0{};
115 float random_0_1{};
116 float random_0_2{};
117 float random_0_3{};
118 if (kT > 0.) {
119 philox_float4(time_step, block_offset_0 + ctr_0, block_offset_1 + ctr_1, block_offset_2 + ctr_2, 0, seed, random_0_0, random_0_1, random_0_2, random_0_3);
120 }
121 const float xi_2 = xi_257 + xi_262;
122 const float xi_3 = xi_2 + xi_265;
123 const float xi_4 = xi_251 + xi_254 + xi_264;
124 const float xi_5 = xi_253 + xi_263;
125 const float xi_6 = xi_245 + xi_260;
126 const float xi_8 = -xi_261;
127 const float xi_9 = -xi_255;
128 const float xi_10 = -xi_245;
129 const float xi_11 = -xi_259;
130 const float xi_12 = -xi_248;
131 const float xi_13 = xi_10 + xi_11 + xi_12;
132 const float xi_14 = -xi_252;
133 const float xi_15 = -xi_258;
134 const float xi_16 = xi_14 + xi_15;
135 const float xi_17 = -xi_247;
136 const float xi_18 = -xi_253;
137 const float xi_19 = xi_17 + xi_18;
138 const float xi_20 = -xi_257;
139 const float xi_21 = xi_10 + xi_20;
140 const float xi_22 = -xi_254;
141 const float xi_23 = -xi_260;
142 const float xi_24 = xi_17 + xi_22 + xi_23 + xi_264;
143 const float xi_29 = xi_244 * 0.16666666666666666f;
144 const float xi_30 = xi_244 * 0.083333333333333329f;
145 const float xi_42 = xi_246 * 0.16666666666666666f;
146 const float xi_43 = xi_246 * 0.083333333333333329f;
147 const float xi_49 = xi_256 * 0.16666666666666666f;
148 const float xi_50 = xi_256 * 0.083333333333333329f;
149 const float xi_67 = xi_244 * 0.25f;
150 const float xi_72 = xi_244 * xi_71;
151 const float xi_114 = -xi_250;
152 const float xi_118 = -xi_264;
153 const float xi_119 = xi_118 + xi_18;
154 const float xi_120 = -xi_249 + xi_8;
155 const float xi_122 = -xi_262;
156 const float xi_123 = xi_11 + xi_122 + xi_15 + xi_21;
157 const float xi_125 = xi_247 * 2.0f + xi_253 * 2.0f + xi_254 * 2.0f + xi_264 * 2.0f;
158 const float xi_126 = xi_125 + xi_248 * 5.0f + xi_265 * 5.0f;
159 const float xi_128 = xi_259 * 2.0f;
160 const float xi_129 = xi_262 * 2.0f;
161 const float xi_130 = xi_245 * 2.0f + xi_257 * 2.0f;
162 const float xi_132 = xi_118 + xi_253;
163 const float xi_133 = xi_132 + xi_14 + xi_22 + xi_247 + xi_251;
164 const float xi_135 = xi_133 * xi_134;
165 const float xi_136 = random_2_3 - 0.5f;
166 const float xi_141 = xi_255 * 2.0f;
167 const float xi_142 = xi_258 * 2.0f;
168 const float xi_143 = xi_249 * -2.0f + xi_261 * 2.0f;
169 const float xi_144 = xi_14 - xi_141 + xi_142 + xi_143 + xi_19 + xi_4;
170 const float xi_146 = xi_144 * xi_145;
171 const float xi_147 = random_1_2 - 0.5f;
172 const float xi_152 = random_0_1 - 0.5f;
173 const float xi_166 = xi_122 + xi_259;
174 const float xi_167 = xi_12 + xi_166 + xi_20 + xi_245 + xi_265;
175 const float xi_168 = xi_134 * xi_167;
176 const float xi_169 = random_2_1 - 0.5f;
177 const float xi_171 = xi_13 + xi_141 - xi_142 + xi_143 + xi_3;
178 const float xi_172 = xi_145 * xi_171;
179 const float xi_173 = random_2_0 - 0.5f;
180 const float xi_178 = xi_119 + xi_23 + xi_247 + xi_254 + xi_263;
181 const float xi_179 = xi_134 * xi_178;
182 const float xi_180 = random_2_2 - 0.5f;
183 const float xi_182 = -xi_128 - xi_129 + xi_130 + xi_24 + xi_5;
184 const float xi_183 = xi_145 * xi_182;
185 const float xi_184 = random_1_3 - 0.5f;
186 const float xi_212 = xi_182 * xi_211;
187 const float xi_214 = xi_178 * xi_213;
188 const float xi_220 = xi_144 * xi_211;
189 const float xi_221 = xi_133 * xi_213;
190 const float xi_235 = xi_167 * xi_213;
191 const float xi_236 = xi_171 * xi_211;
192 const float xi_31 = rr_0 * xi_30;
193 const float xi_44 = rr_0 * xi_43;
194 const float xi_51 = rr_0 * xi_50;
195 const float xi_54 = xi_246 * xi_53;
196 const float xi_59 = xi_244 * xi_53;
197 const float xi_81 = xi_256 * xi_53;
198 const float vel0Term = xi_249 + xi_258 + xi_3;
199 const float vel1Term = xi_255 + xi_4;
200 const float vel2Term = xi_259 + xi_5;
201 const float rho = vel0Term + vel1Term + vel2Term + xi_247 + xi_248 + xi_250 + xi_252 + xi_261 + xi_6;
202 const float xi_105 = kT * rho;
203 const float xi_106 = powf(xi_105 * (1.0f - (-omega_even + 1.0f) * (-omega_even + 1.0f)), 0.5f);
204 const float xi_107 = xi_106 * (random_3_0 - 0.5f) * 3.7416573867739413f;
205 const float xi_108 = xi_106 * (random_3_2 - 0.5f) * 5.4772255750516612f;
206 const float xi_110 = xi_109 * (random_1_1 - 0.5f) * powf(xi_105 * (1.0f - (-omega_bulk + 1.0f) * (-omega_bulk + 1.0f)), 0.5f);
207 const float xi_111 = xi_106 * (random_3_1 - 0.5f) * 8.3666002653407556f;
208 const float xi_137 = powf(xi_105 * (1.0f - (-omega_odd + 1.0f) * (-omega_odd + 1.0f)), 0.5f);
209 const float xi_138 = xi_137 * 1.4142135623730951f;
210 const float xi_139 = xi_138 * 0.5f;
211 const float xi_140 = xi_136 * xi_139;
212 const float xi_148 = xi_109 * xi_137;
213 const float xi_149 = xi_148 * 0.16666666666666666f;
214 const float xi_150 = xi_147 * xi_149;
215 const float xi_151 = -xi_146 - xi_150;
216 const float xi_153 = powf(xi_105 * (1.0f - (-omega_shear + 1.0f) * (-omega_shear + 1.0f)), 0.5f);
217 const float xi_154 = xi_153 * 0.5f;
218 const float xi_155 = xi_152 * xi_154;
219 const float xi_161 = xi_153 * (random_0_0 - 0.5f) * 1.7320508075688772f;
220 const float xi_165 = xi_146 + xi_150;
221 const float xi_170 = xi_139 * xi_169;
222 const float xi_174 = xi_149 * xi_173;
223 const float xi_175 = xi_172 + xi_174;
224 const float xi_177 = -xi_172 - xi_174;
225 const float xi_181 = xi_139 * xi_180;
226 const float xi_185 = xi_149 * xi_184;
227 const float xi_186 = -xi_183 - xi_185;
228 const float xi_188 = xi_183 + xi_185;
229 const float xi_189 = xi_152 * xi_153 * 0.25f;
230 const float xi_192 = xi_107 * 0.083333333333333329f;
231 const float xi_196 = xi_154 * (random_0_2 - 0.5f);
232 const float xi_203 = xi_154 * (random_1_0 - 0.5f);
233 const float xi_207 = xi_111 * -0.014285714285714285f;
234 const float xi_208 = xi_108 * 0.050000000000000003f;
235 const float xi_215 = xi_148 * 0.083333333333333329f;
236 const float xi_216 = xi_184 * xi_215;
237 const float xi_217 = xi_138 * 0.25f;
238 const float xi_218 = xi_180 * xi_217;
239 const float xi_219 = -xi_212 + xi_214 - xi_216 + xi_218;
240 const float xi_222 = xi_147 * xi_215;
241 const float xi_223 = xi_136 * xi_217;
242 const float xi_224 = -xi_220 + xi_221 - xi_222 + xi_223;
243 const float xi_225 = xi_220 - xi_221 + xi_222 - xi_223;
244 const float xi_227 = -xi_189;
245 const float xi_230 = xi_111 * 0.035714285714285712f;
246 const float xi_232 = xi_154 * (random_0_3 - 0.5f);
247 const float xi_237 = xi_169 * xi_217;
248 const float xi_238 = xi_173 * xi_215;
249 const float xi_239 = -xi_235 + xi_236 - xi_237 + xi_238;
250 const float xi_241 = xi_235 - xi_236 + xi_237 - xi_238;
251 const float xi_242 = xi_212 - xi_214 + xi_216 - xi_218;
252 const float xi_0 = ((1.0f) / (rho));
253 const float xi_7 = xi_0 * 0.5f;
254 const float u_0 = xi_0 * (vel0Term + xi_13 + xi_8 + xi_9) + xi_246 * xi_7;
255 const float xi_25 = u_0 * xi_246;
256 const float xi_37 = xi_25 * 0.16666666666666666f;
257 const float xi_38 = xi_25 * 0.083333333333333329f;
258 const float xi_39 = omega_shear * xi_38;
259 const float xi_40 = -xi_37 + xi_39;
260 const float xi_56 = -xi_25 * xi_55 + xi_37;
261 const float xi_57 = -xi_43 + xi_54 + xi_56;
262 const float xi_61 = -xi_25 * xi_60;
263 const float xi_68 = u_0 * xi_67;
264 const float xi_73 = u_0 * xi_72;
265 const float xi_77 = xi_43 - xi_54 + xi_56;
266 const float xi_84 = -xi_38;
267 const float xi_95 = u_0 * xi_256;
268 const float xi_96 = xi_95 * 0.25f;
269 const float xi_99 = xi_71 * xi_95;
270 const float xi_113 = rho * (u_0 * u_0);
271 const float u_1 = xi_0 * (vel1Term + xi_16 + xi_19 + xi_249 + xi_8) + xi_244 * xi_7;
272 const float xi_26 = u_1 * xi_244;
273 const float xi_32 = xi_26 * 0.16666666666666666f;
274 const float xi_45 = xi_26 * 0.083333333333333329f;
275 const float xi_46 = omega_shear * xi_45;
276 const float xi_47 = -xi_32 + xi_46;
277 const float xi_62 = -xi_26 * xi_60;
278 const float xi_69 = u_1 * 0.25f;
279 const float xi_70 = xi_246 * xi_69;
280 const float xi_74 = u_1 * xi_71;
281 const float xi_75 = xi_246 * xi_74;
282 const float xi_76 = -xi_68 - xi_70 + xi_73 + xi_75;
283 const float xi_78 = xi_68 + xi_70 - xi_73 - xi_75;
284 const float xi_86 = xi_256 * xi_69;
285 const float xi_88 = xi_256 * xi_74;
286 const float xi_93 = -xi_45;
287 const float xi_112 = rho * (u_1 * u_1);
288 const float xi_121 = xi_112 + xi_120 + xi_9;
289 const float xi_197 = rho * u_1;
290 const float xi_199 = xi_198 * (u_0 * xi_197 + xi_120 + xi_255 + xi_258);
291 const float xi_200 = -xi_196 - xi_199;
292 const float xi_201 = xi_196 + xi_199;
293 const float u_2 = xi_0 * (vel2Term + xi_21 + xi_24 + xi_262) + xi_256 * xi_7;
294 const float xi_27 = u_2 * xi_256;
295 const float xi_33 = xi_27 * 0.16666666666666666f;
296 const float xi_34 = xi_27 * 0.083333333333333329f;
297 const float xi_35 = omega_shear * xi_34;
298 const float xi_36 = -xi_33 + xi_35;
299 const float xi_41 = -omega_shear * xi_32 + xi_26 * 0.33333333333333331f + xi_36 + xi_40;
300 const float xi_48 = -omega_shear * xi_37 + xi_25 * 0.33333333333333331f + xi_36 + xi_47;
301 const float xi_52 = -omega_shear * xi_33 + xi_27 * 0.33333333333333331f + xi_40 + xi_47;
302 const float xi_58 = -xi_34;
303 const float xi_63 = -xi_27 * xi_60;
304 const float xi_64 = -xi_26 * xi_55 + xi_32 + xi_61 + xi_62 + xi_63;
305 const float xi_65 = xi_30 - xi_59 + xi_64;
306 const float xi_66 = xi_35 + xi_58 + xi_65;
307 const float xi_79 = -xi_30 + xi_59 + xi_64;
308 const float xi_80 = xi_35 + xi_58 + xi_79;
309 const float xi_82 = -xi_27 * xi_55 + xi_33;
310 const float xi_83 = xi_50 - xi_81 + xi_82;
311 const float xi_85 = xi_39 + xi_65 + xi_84;
312 const float xi_87 = u_2 * xi_67;
313 const float xi_89 = u_2 * xi_72;
314 const float xi_90 = xi_86 + xi_87 - xi_88 - xi_89;
315 const float xi_91 = xi_39 + xi_79 + xi_84;
316 const float xi_92 = -xi_86 - xi_87 + xi_88 + xi_89;
317 const float xi_94 = xi_46 + xi_61 + xi_62 + xi_63 + xi_83 + xi_93;
318 const float xi_97 = u_2 * xi_246;
319 const float xi_98 = xi_97 * 0.25f;
320 const float xi_100 = xi_71 * xi_97;
321 const float xi_101 = xi_100 - xi_96 - xi_98 + xi_99;
322 const float xi_102 = -xi_100 + xi_96 + xi_98 - xi_99;
323 const float xi_103 = -xi_50 + xi_81 + xi_82;
324 const float xi_104 = xi_103 + xi_46 + xi_61 + xi_62 + xi_63 + xi_93;
325 const float xi_115 = rho * (u_2 * u_2);
326 const float xi_116 = xi_114 + xi_115 * 0.66666666666666663f + xi_260 * 3.0f + xi_263 * 3.0f;
327 const float xi_117 = omega_even * (xi_112 * 0.66666666666666663f + xi_113 * 1.6666666666666667f + xi_116 + xi_247 * -3.0f + xi_251 * 3.0f + xi_252 * 3.0f + xi_253 * -3.0f + xi_254 * -3.0f + xi_264 * -3.0f);
328 const float xi_124 = omega_bulk * (xi_113 + xi_115 + xi_119 + xi_121 + xi_123 + xi_17 + xi_22 + xi_250);
329 const float xi_127 = omega_even * (xi_112 * 2.3333333333333335f + xi_116 + xi_126 + xi_245 * -5.0f + xi_251 * -2.0f + xi_252 * -2.0f + xi_257 * -5.0f + xi_259 * -5.0f + xi_262 * -5.0f);
330 const float xi_131 = omega_even * (xi_114 + xi_115 * 3.0f + xi_126 + xi_128 + xi_129 + xi_130 + xi_249 * -7.0f + xi_251 * 5.0f + xi_252 * 5.0f + xi_255 * -7.0f + xi_258 * -7.0f + xi_260 * -4.0f + xi_261 * -7.0f + xi_263 * -4.0f);
331 const float xi_156 = -xi_115 + xi_263;
332 const float xi_157 = omega_shear * (xi_121 + xi_156 + xi_16 + xi_2 - xi_251 + xi_259 + xi_6);
333 const float xi_158 = xi_157 * 0.125f;
334 const float xi_159 = xi_107 * -0.11904761904761904f + xi_131 * -0.01984126984126984f;
335 const float xi_160 = omega_shear * (-xi_112 + xi_113 * 2.0f + xi_120 + xi_123 + xi_125 + xi_156 + xi_248 * -2.0f + xi_251 + xi_252 + xi_260 + xi_265 * -2.0f + xi_9);
336 const float xi_162 = xi_160 * -0.041666666666666664f + xi_161 * -0.16666666666666666f;
337 const float xi_163 = xi_108 * -0.10000000000000001f + xi_117 * -0.050000000000000003f + xi_162;
338 const float xi_164 = xi_111 * 0.028571428571428571f + xi_127 * 0.014285714285714285f + xi_155 + xi_158 + xi_159 + xi_163;
339 const float xi_176 = xi_111 * -0.071428571428571425f + xi_127 * -0.035714285714285712f + xi_159 + xi_160 * 0.083333333333333329f + xi_161 * 0.33333333333333331f;
340 const float xi_187 = xi_107 * 0.095238095238095233f + xi_111 * -0.042857142857142858f + xi_127 * -0.021428571428571429f + xi_131 * 0.015873015873015872f - xi_155 - xi_158 + xi_163;
341 const float xi_190 = xi_157 * 0.0625f;
342 const float xi_191 = xi_131 * 0.013888888888888888f;
343 const float xi_193 = xi_110 * 0.083333333333333329f + xi_124 * 0.041666666666666664f;
344 const float xi_194 = xi_160 * 0.020833333333333332f + xi_161 * 0.083333333333333329f + xi_193;
345 const float xi_195 = xi_165 + xi_189 + xi_190 + xi_191 + xi_192 + xi_194;
346 const float xi_202 = xi_151 + xi_189 + xi_190 + xi_191 + xi_192 + xi_194;
347 const float xi_204 = xi_127 * -0.0071428571428571426f;
348 const float xi_205 = xi_198 * (u_2 * xi_197 + xi_132 + xi_17 + xi_254);
349 const float xi_206 = xi_117 * 0.025000000000000001f;
350 const float xi_209 = xi_107 * -0.023809523809523808f + xi_131 * -0.003968253968253968f;
351 const float xi_210 = xi_162 + xi_193 + xi_203 + xi_204 + xi_205 + xi_206 + xi_207 + xi_208 + xi_209;
352 const float xi_226 = xi_162 + xi_193 - xi_203 + xi_204 - xi_205 + xi_206 + xi_207 + xi_208 + xi_209;
353 const float xi_228 = -xi_190;
354 const float xi_229 = xi_127 * 0.017857142857142856f;
355 const float xi_231 = xi_188 + xi_194 + xi_209 + xi_227 + xi_228 + xi_229 + xi_230;
356 const float xi_233 = xi_198 * (rho * u_0 * u_2 + xi_10 + xi_166 + xi_257);
357 const float xi_234 = -xi_232 - xi_233;
358 const float xi_240 = xi_232 + xi_233;
359 const float xi_243 = xi_186 + xi_194 + xi_209 + xi_227 + xi_228 + xi_229 + xi_230;
360 const float forceTerm_0 = xi_25 * xi_28 - xi_25 + xi_26 * xi_28 - xi_26 + xi_27 * xi_28 - xi_27;
361 const float forceTerm_1 = xi_29 - xi_31 + xi_41;
362 const float forceTerm_2 = -xi_29 + xi_31 + xi_41;
363 const float forceTerm_3 = -xi_42 + xi_44 + xi_48;
364 const float forceTerm_4 = xi_42 - xi_44 + xi_48;
365 const float forceTerm_5 = xi_49 - xi_51 + xi_52;
366 const float forceTerm_6 = -xi_49 + xi_51 + xi_52;
367 const float forceTerm_7 = xi_57 + xi_66 + xi_76;
368 const float forceTerm_8 = xi_66 + xi_77 + xi_78;
369 const float forceTerm_9 = xi_57 + xi_78 + xi_80;
370 const float forceTerm_10 = xi_76 + xi_77 + xi_80;
371 const float forceTerm_11 = xi_83 + xi_85 + xi_90;
372 const float forceTerm_12 = xi_83 + xi_91 + xi_92;
373 const float forceTerm_13 = xi_101 + xi_57 + xi_94;
374 const float forceTerm_14 = xi_102 + xi_77 + xi_94;
375 const float forceTerm_15 = xi_103 + xi_85 + xi_92;
376 const float forceTerm_16 = xi_103 + xi_90 + xi_91;
377 const float forceTerm_17 = xi_102 + xi_104 + xi_57;
378 const float forceTerm_18 = xi_101 + xi_104 + xi_77;
379 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2] = forceTerm_0 + xi_107 * 0.14285714285714285f + xi_108 * 0.20000000000000001f - xi_110 + xi_111 * 0.085714285714285715f + xi_117 * 0.10000000000000001f + xi_124 * -0.5f + xi_127 * 0.042857142857142858f + xi_131 * 0.023809523809523808f + xi_250;
380 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + _stride_pdfs_3] = forceTerm_1 - xi_135 - xi_140 + xi_151 + xi_164 + xi_251;
381 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 2 * _stride_pdfs_3] = forceTerm_2 + xi_135 + xi_140 + xi_164 + xi_165 + xi_252;
382 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 3 * _stride_pdfs_3] = forceTerm_3 + xi_168 + xi_170 + xi_175 + xi_176 + xi_248;
383 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 4 * _stride_pdfs_3] = forceTerm_4 - xi_168 - xi_170 + xi_176 + xi_177 + xi_265;
384 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 5 * _stride_pdfs_3] = forceTerm_5 - xi_179 - xi_181 + xi_186 + xi_187 + xi_263;
385 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 6 * _stride_pdfs_3] = forceTerm_6 + xi_179 + xi_181 + xi_187 + xi_188 + xi_260;
386 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 7 * _stride_pdfs_3] = forceTerm_7 + xi_177 + xi_195 + xi_200 + xi_255;
387 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 8 * _stride_pdfs_3] = forceTerm_8 + xi_175 + xi_195 + xi_201 + xi_249;
388 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 9 * _stride_pdfs_3] = forceTerm_9 + xi_177 + xi_201 + xi_202 + xi_261;
389 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 10 * _stride_pdfs_3] = forceTerm_10 + xi_175 + xi_200 + xi_202 + xi_258;
390 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 11 * _stride_pdfs_3] = forceTerm_11 + xi_210 + xi_219 + xi_224 + xi_264;
391 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 12 * _stride_pdfs_3] = forceTerm_12 + xi_219 + xi_225 + xi_226 + xi_253;
392 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 13 * _stride_pdfs_3] = forceTerm_13 + xi_231 + xi_234 + xi_239 + xi_259;
393 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 14 * _stride_pdfs_3] = forceTerm_14 + xi_231 + xi_240 + xi_241 + xi_262;
394 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 15 * _stride_pdfs_3] = forceTerm_15 + xi_224 + xi_226 + xi_242 + xi_254;
395 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 16 * _stride_pdfs_3] = forceTerm_16 + xi_210 + xi_225 + xi_242 + xi_247;
396 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 17 * _stride_pdfs_3] = forceTerm_17 + xi_239 + xi_240 + xi_243 + xi_245;
397 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 18 * _stride_pdfs_3] = forceTerm_18 + xi_234 + xi_241 + xi_243 + xi_257;
398 }
399 }
400 }
401}
402} // namespace internal_69764eed2d0964e29e3b97d1054b4693
403
405 if (!this->configured_)
406 WALBERLA_ABORT("This Sweep contains a configure function that needs to be called manually")
407
408 auto pdfs = block->getData<field::GhostLayerField<float, 19>>(pdfsID);
409 auto force = block->getData<field::GhostLayerField<float, 3>>(forceID);
410
411 auto &omega_shear = this->omega_shear_;
412 auto &omega_even = this->omega_even_;
413 auto &block_offset_1 = this->block_offset_1_;
414 auto &kT = this->kT_;
415 auto &seed = this->seed_;
416 auto &time_step = this->time_step_;
417 auto &block_offset_2 = this->block_offset_2_;
418 auto &omega_odd = this->omega_odd_;
419 auto &block_offset_0 = this->block_offset_0_;
420 auto &omega_bulk = this->omega_bulk_;
421 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(force->nrOfGhostLayers()))
422 float *RESTRICT const _data_force = force->dataAt(0, 0, 0, 0);
423 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
424 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(pdfs->nrOfGhostLayers()))
425 float *RESTRICT _data_pdfs = pdfs->dataAt(0, 0, 0, 0);
426 WALBERLA_ASSERT_EQUAL(pdfs->layout(), field::fzyx)
427 WALBERLA_ASSERT_GREATER_EQUAL(force->xSizeWithGhostLayer(), int64_t(int64_c(force->xSize()) + 0))
428 const int64_t _size_force_0 = int64_t(int64_c(force->xSize()) + 0);
429 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
430 WALBERLA_ASSERT_GREATER_EQUAL(force->ySizeWithGhostLayer(), int64_t(int64_c(force->ySize()) + 0))
431 const int64_t _size_force_1 = int64_t(int64_c(force->ySize()) + 0);
432 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
433 WALBERLA_ASSERT_GREATER_EQUAL(force->zSizeWithGhostLayer(), int64_t(int64_c(force->zSize()) + 0))
434 const int64_t _size_force_2 = int64_t(int64_c(force->zSize()) + 0);
435 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
436 const int64_t _stride_force_0 = int64_t(force->xStride());
437 const int64_t _stride_force_1 = int64_t(force->yStride());
438 const int64_t _stride_force_2 = int64_t(force->zStride());
439 const int64_t _stride_force_3 = int64_t(1 * int64_t(force->fStride()));
440 const int64_t _stride_pdfs_0 = int64_t(pdfs->xStride());
441 const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride());
442 const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride());
443 const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride()));
444 internal_69764eed2d0964e29e3b97d1054b4693::collidesweepsingleprecisionthermalized_collidesweepsingleprecisionthermalized(_data_force, _data_pdfs, _size_force_0, _size_force_1, _size_force_2, _stride_force_0, _stride_force_1, _stride_force_2, _stride_force_3, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, block_offset_0, block_offset_1, block_offset_2, kT, omega_bulk, omega_even, omega_odd, omega_shear, seed, time_step);
445}
446
447void CollideSweepSinglePrecisionThermalized::runOnCellInterval(const shared_ptr<StructuredBlockStorage> &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block) {
448 if (!this->configured_)
449 WALBERLA_ABORT("This Sweep contains a configure function that needs to be called manually")
450
451 CellInterval ci = globalCellInterval;
452 CellInterval blockBB = blocks->getBlockCellBB(*block);
453 blockBB.expand(ghostLayers);
454 ci.intersect(blockBB);
455 blocks->transformGlobalToBlockLocalCellInterval(ci, *block);
456 if (ci.empty())
457 return;
458
459 auto pdfs = block->getData<field::GhostLayerField<float, 19>>(pdfsID);
460 auto force = block->getData<field::GhostLayerField<float, 3>>(forceID);
461
462 auto &omega_shear = this->omega_shear_;
463 auto &omega_even = this->omega_even_;
464 auto &block_offset_1 = this->block_offset_1_;
465 auto &kT = this->kT_;
466 auto &seed = this->seed_;
467 auto &time_step = this->time_step_;
468 auto &block_offset_2 = this->block_offset_2_;
469 auto &omega_odd = this->omega_odd_;
470 auto &block_offset_0 = this->block_offset_0_;
471 auto &omega_bulk = this->omega_bulk_;
472 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(force->nrOfGhostLayers()))
473 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(force->nrOfGhostLayers()))
474 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(force->nrOfGhostLayers()))
475 float *RESTRICT const _data_force = force->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
476 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
477 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(pdfs->nrOfGhostLayers()))
478 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(pdfs->nrOfGhostLayers()))
479 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(pdfs->nrOfGhostLayers()))
480 float *RESTRICT _data_pdfs = pdfs->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
481 WALBERLA_ASSERT_EQUAL(pdfs->layout(), field::fzyx)
482 WALBERLA_ASSERT_GREATER_EQUAL(force->xSizeWithGhostLayer(), int64_t(int64_c(ci.xSize()) + 0))
483 const int64_t _size_force_0 = int64_t(int64_c(ci.xSize()) + 0);
484 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
485 WALBERLA_ASSERT_GREATER_EQUAL(force->ySizeWithGhostLayer(), int64_t(int64_c(ci.ySize()) + 0))
486 const int64_t _size_force_1 = int64_t(int64_c(ci.ySize()) + 0);
487 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
488 WALBERLA_ASSERT_GREATER_EQUAL(force->zSizeWithGhostLayer(), int64_t(int64_c(ci.zSize()) + 0))
489 const int64_t _size_force_2 = int64_t(int64_c(ci.zSize()) + 0);
490 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
491 const int64_t _stride_force_0 = int64_t(force->xStride());
492 const int64_t _stride_force_1 = int64_t(force->yStride());
493 const int64_t _stride_force_2 = int64_t(force->zStride());
494 const int64_t _stride_force_3 = int64_t(1 * int64_t(force->fStride()));
495 const int64_t _stride_pdfs_0 = int64_t(pdfs->xStride());
496 const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride());
497 const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride());
498 const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride()));
499 internal_69764eed2d0964e29e3b97d1054b4693::collidesweepsingleprecisionthermalized_collidesweepsingleprecisionthermalized(_data_force, _data_pdfs, _size_force_0, _size_force_1, _size_force_2, _stride_force_0, _stride_force_1, _stride_force_2, _stride_force_3, _stride_pdfs_0, _stride_pdfs_1, _stride_pdfs_2, _stride_pdfs_3, block_offset_0, block_offset_1, block_offset_2, kT, omega_bulk, omega_even, omega_odd, omega_shear, seed, time_step);
500}
501
502} // namespace pystencils
503} // namespace walberla
504
505#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG)
506#pragma GCC diagnostic pop
507#endif
508
509#if (defined WALBERLA_CXX_COMPILER_IS_INTEL)
510#pragma warning pop
511#endif
#define FUNC_PREFIX
\file AdvectiveFluxKernel_double_precision.cpp \author pystencils
#define RESTRICT
\file AdvectiveFluxKernel_double_precision.h \author pystencils
void runOnCellInterval(const shared_ptr< StructuredBlockStorage > &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block)
static double * block(double *p, std::size_t index, std::size_t size)
Definition elc.cpp:172
QUALIFIERS void philox_float4(uint32 ctr0, uint32 ctr1, uint32 ctr2, uint32 ctr3, uint32 key0, uint32 key1, float &rnd1, float &rnd2, float &rnd3, float &rnd4)
static FUNC_PREFIX void collidesweepsingleprecisionthermalized_collidesweepsingleprecisionthermalized(float *RESTRICT const _data_force, float *RESTRICT _data_pdfs, int64_t const _size_force_0, int64_t const _size_force_1, int64_t const _size_force_2, int64_t const _stride_force_0, int64_t const _stride_force_1, int64_t const _stride_force_2, int64_t const _stride_force_3, int64_t const _stride_pdfs_0, int64_t const _stride_pdfs_1, int64_t const _stride_pdfs_2, int64_t const _stride_pdfs_3, uint32_t block_offset_0, uint32_t block_offset_1, uint32_t block_offset_2, float kT, float omega_bulk, float omega_even, float omega_odd, float omega_shear, uint32_t seed, uint32_t time_step)
\file PackInfoPdfDoublePrecision.cpp \author pystencils