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
CollideSweepSinglePrecisionLeesEdwards.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 CollideSweepSinglePrecisionLeesEdwards.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#define FUNC_PREFIX
29
30#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG)
31#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-Wfloat-equal"
33#pragma GCC diagnostic ignored "-Wshadow"
34#pragma GCC diagnostic ignored "-Wconversion"
35#pragma GCC diagnostic ignored "-Wunused-variable"
36#endif
37
38#if (defined WALBERLA_CXX_COMPILER_IS_INTEL)
39#pragma warning push
40#pragma warning(disable : 1599)
41#endif
42
43using namespace std;
44
45namespace walberla {
46namespace pystencils {
47
48namespace internal_ab1f3bc3368574afb482da84ccb58898 {
49static FUNC_PREFIX void collidesweepsingleprecisionleesedwards_collidesweepsingleprecisionleesedwards(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, float grid_size, float omega_shear, float v_s) {
50 const float xi_0 = ((1.0f) / (omega_shear * -0.25f + 2.0f));
51 const float rr_0 = xi_0 * (omega_shear * -2.0f + 4.0f);
52 for (int64_t ctr_2 = 0; ctr_2 < _size_force_2; ctr_2 += 1) {
53 for (int64_t ctr_1 = 0; ctr_1 < _size_force_1; ctr_1 += 1) {
54 for (int64_t ctr_0 = 0; ctr_0 < _size_force_0; ctr_0 += 1) {
55 const float xi_25 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2 + _stride_force_3];
56 const float xi_26 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 17 * _stride_pdfs_3];
57 const float xi_27 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2];
58 const float xi_28 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 16 * _stride_pdfs_3];
59 const float xi_29 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 3 * _stride_pdfs_3];
60 const float xi_30 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 8 * _stride_pdfs_3];
61 const float xi_31 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2];
62 const float xi_32 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + _stride_pdfs_3];
63 const float xi_33 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 2 * _stride_pdfs_3];
64 const float xi_34 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 15 * _stride_pdfs_3];
65 const float xi_35 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 12 * _stride_pdfs_3];
66 const float xi_36 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 7 * _stride_pdfs_3];
67 const float xi_37 = _data_force[_stride_force_0 * ctr_0 + _stride_force_1 * ctr_1 + _stride_force_2 * ctr_2 + 2 * _stride_force_3];
68 const float xi_38 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 18 * _stride_pdfs_3];
69 const float xi_39 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 10 * _stride_pdfs_3];
70 const float xi_40 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 13 * _stride_pdfs_3];
71 const float xi_41 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 6 * _stride_pdfs_3];
72 const float xi_42 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 9 * _stride_pdfs_3];
73 const float xi_43 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 14 * _stride_pdfs_3];
74 const float xi_44 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 5 * _stride_pdfs_3];
75 const float xi_45 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 11 * _stride_pdfs_3];
76 const float xi_46 = _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 4 * _stride_pdfs_3];
77 const float xi_3 = xi_26;
78 const float xi_4 = xi_28;
79 const float xi_5 = xi_37;
80 const float xi_6 = xi_29;
81 const float xi_7 = xi_36;
82 const float xi_8 = xi_32;
83 const float xi_9 = xi_25;
84 const float xi_10 = xi_27;
85 const float xi_11 = xi_43;
86 const float xi_12 = xi_30;
87 const float xi_13 = xi_42;
88 const float xi_14 = xi_46;
89 const float xi_15 = xi_40;
90 const float xi_16 = xi_41;
91 const float xi_17 = xi_31;
92 const float xi_18 = xi_38;
93 const float xi_19 = xi_33;
94 const float xi_20 = xi_34;
95 const float xi_21 = xi_45;
96 const float xi_22 = xi_44;
97 const float xi_23 = xi_35;
98 const float xi_24 = xi_39;
99 const float vel0Term = xi_11 + xi_12 + xi_14 + xi_18 + xi_24;
100 const float vel1Term = xi_20 + xi_21 + xi_7 + xi_8;
101 const float vel2Term = xi_15 + xi_22 + xi_23;
102 const float rho = vel0Term + vel1Term + vel2Term + xi_13 + xi_16 + xi_17 + xi_19 + xi_3 + xi_4 + xi_6;
103 const float xi_1 = ((1.0f) / (rho));
104 const float u_0 = xi_1 * xi_10 * 0.5f + xi_1 * (vel0Term - xi_13 - xi_15 - xi_3 - xi_6 - xi_7);
105 const float u_1 = xi_1 * xi_9 * 0.5f + xi_1 * (vel1Term + xi_12 - xi_13 - xi_19 - xi_23 - xi_24 - xi_4);
106 const float u_2 = xi_1 * xi_5 * 0.5f + xi_1 * (vel2Term + xi_11 - xi_16 - xi_18 - xi_20 + xi_21 - xi_3 - xi_4);
107 const float forceTerm_0 = omega_shear * u_0 * xi_10 * 0.5f + omega_shear * u_1 * xi_9 * 0.5f + omega_shear * u_2 * xi_5 * 0.5f - u_0 * xi_10 - u_1 * xi_9 - u_2 * xi_5;
108 const float forceTerm_1 = omega_shear * u_0 * xi_10 * 0.083333333333333329f + omega_shear * u_1 * xi_9 * -0.16666666666666666f + omega_shear * u_2 * xi_5 * 0.083333333333333329f + rr_0 * xi_9 * -0.083333333333333329f + u_0 * xi_10 * -0.16666666666666666f + u_1 * xi_9 * 0.33333333333333331f + u_2 * xi_5 * -0.16666666666666666f + xi_9 * 0.16666666666666666f;
109 const float forceTerm_2 = omega_shear * u_0 * xi_10 * 0.083333333333333329f + omega_shear * u_1 * xi_9 * -0.16666666666666666f + omega_shear * u_2 * xi_5 * 0.083333333333333329f + rr_0 * xi_9 * 0.083333333333333329f + u_0 * xi_10 * -0.16666666666666666f + u_1 * xi_9 * 0.33333333333333331f + u_2 * xi_5 * -0.16666666666666666f + xi_9 * -0.16666666666666666f;
110 const float forceTerm_3 = omega_shear * u_0 * xi_10 * -0.16666666666666666f + omega_shear * u_1 * xi_9 * 0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.083333333333333329f + rr_0 * xi_10 * 0.083333333333333329f + u_0 * xi_10 * 0.33333333333333331f + u_1 * xi_9 * -0.16666666666666666f + u_2 * xi_5 * -0.16666666666666666f + xi_10 * -0.16666666666666666f;
111 const float forceTerm_4 = omega_shear * u_0 * xi_10 * -0.16666666666666666f + omega_shear * u_1 * xi_9 * 0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.083333333333333329f + rr_0 * xi_10 * -0.083333333333333329f + u_0 * xi_10 * 0.33333333333333331f + u_1 * xi_9 * -0.16666666666666666f + u_2 * xi_5 * -0.16666666666666666f + xi_10 * 0.16666666666666666f;
112 const float forceTerm_5 = omega_shear * u_0 * xi_10 * 0.083333333333333329f + omega_shear * u_1 * xi_9 * 0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.16666666666666666f + rr_0 * xi_5 * -0.083333333333333329f + u_0 * xi_10 * -0.16666666666666666f + u_1 * xi_9 * -0.16666666666666666f + u_2 * xi_5 * 0.33333333333333331f + xi_5 * 0.16666666666666666f;
113 const float forceTerm_6 = omega_shear * u_0 * xi_10 * 0.083333333333333329f + omega_shear * u_1 * xi_9 * 0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.16666666666666666f + rr_0 * xi_5 * 0.083333333333333329f + u_0 * xi_10 * -0.16666666666666666f + u_1 * xi_9 * -0.16666666666666666f + u_2 * xi_5 * 0.33333333333333331f + xi_5 * -0.16666666666666666f;
114 const float forceTerm_7 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_9 * 0.125f + omega_shear * u_1 * xi_10 * 0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.041666666666666664f + rr_0 * xi_10 * 0.041666666666666664f + rr_0 * xi_9 * -0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_9 * -0.25f + u_1 * xi_10 * -0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * -0.083333333333333329f + xi_10 * -0.083333333333333329f + xi_9 * 0.083333333333333329f;
115 const float forceTerm_8 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_9 * -0.125f + omega_shear * u_1 * xi_10 * -0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.041666666666666664f + rr_0 * xi_10 * -0.041666666666666664f + rr_0 * xi_9 * -0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_9 * 0.25f + u_1 * xi_10 * 0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * -0.083333333333333329f + xi_10 * 0.083333333333333329f + xi_9 * 0.083333333333333329f;
116 const float forceTerm_9 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_9 * -0.125f + omega_shear * u_1 * xi_10 * -0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.041666666666666664f + rr_0 * xi_10 * 0.041666666666666664f + rr_0 * xi_9 * 0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_9 * 0.25f + u_1 * xi_10 * 0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * -0.083333333333333329f + xi_10 * -0.083333333333333329f + xi_9 * -0.083333333333333329f;
117 const float forceTerm_10 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_9 * 0.125f + omega_shear * u_1 * xi_10 * 0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * 0.041666666666666664f + rr_0 * xi_10 * -0.041666666666666664f + rr_0 * xi_9 * 0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_9 * -0.25f + u_1 * xi_10 * -0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * -0.083333333333333329f + xi_10 * 0.083333333333333329f + xi_9 * -0.083333333333333329f;
118 const float forceTerm_11 = omega_shear * u_0 * xi_10 * 0.041666666666666664f + omega_shear * u_1 * xi_5 * -0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + omega_shear * u_2 * xi_9 * -0.125f + rr_0 * xi_5 * -0.041666666666666664f + rr_0 * xi_9 * -0.041666666666666664f + u_0 * xi_10 * -0.083333333333333329f + u_1 * xi_5 * 0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * 0.16666666666666666f + u_2 * xi_9 * 0.25f + xi_5 * 0.083333333333333329f + xi_9 * 0.083333333333333329f;
119 const float forceTerm_12 = omega_shear * u_0 * xi_10 * 0.041666666666666664f + omega_shear * u_1 * xi_5 * 0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + omega_shear * u_2 * xi_9 * 0.125f + rr_0 * xi_5 * -0.041666666666666664f + rr_0 * xi_9 * 0.041666666666666664f + u_0 * xi_10 * -0.083333333333333329f + u_1 * xi_5 * -0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * 0.16666666666666666f + u_2 * xi_9 * -0.25f + xi_5 * 0.083333333333333329f + xi_9 * -0.083333333333333329f;
120 const float forceTerm_13 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_5 * 0.125f + omega_shear * u_1 * xi_9 * 0.041666666666666664f + omega_shear * u_2 * xi_10 * 0.125f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + rr_0 * xi_10 * 0.041666666666666664f + rr_0 * xi_5 * -0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_5 * -0.25f + u_1 * xi_9 * -0.083333333333333329f + u_2 * xi_10 * -0.25f + u_2 * xi_5 * 0.16666666666666666f + xi_10 * -0.083333333333333329f + xi_5 * 0.083333333333333329f;
121 const float forceTerm_14 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_5 * -0.125f + omega_shear * u_1 * xi_9 * 0.041666666666666664f + omega_shear * u_2 * xi_10 * -0.125f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + rr_0 * xi_10 * -0.041666666666666664f + rr_0 * xi_5 * -0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_5 * 0.25f + u_1 * xi_9 * -0.083333333333333329f + u_2 * xi_10 * 0.25f + u_2 * xi_5 * 0.16666666666666666f + xi_10 * 0.083333333333333329f + xi_5 * 0.083333333333333329f;
122 const float forceTerm_15 = omega_shear * u_0 * xi_10 * 0.041666666666666664f + omega_shear * u_1 * xi_5 * 0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + omega_shear * u_2 * xi_9 * 0.125f + rr_0 * xi_5 * 0.041666666666666664f + rr_0 * xi_9 * -0.041666666666666664f + u_0 * xi_10 * -0.083333333333333329f + u_1 * xi_5 * -0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * 0.16666666666666666f + u_2 * xi_9 * -0.25f + xi_5 * -0.083333333333333329f + xi_9 * 0.083333333333333329f;
123 const float forceTerm_16 = omega_shear * u_0 * xi_10 * 0.041666666666666664f + omega_shear * u_1 * xi_5 * -0.125f + omega_shear * u_1 * xi_9 * -0.083333333333333329f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + omega_shear * u_2 * xi_9 * -0.125f + rr_0 * xi_5 * 0.041666666666666664f + rr_0 * xi_9 * 0.041666666666666664f + u_0 * xi_10 * -0.083333333333333329f + u_1 * xi_5 * 0.25f + u_1 * xi_9 * 0.16666666666666666f + u_2 * xi_5 * 0.16666666666666666f + u_2 * xi_9 * 0.25f + xi_5 * -0.083333333333333329f + xi_9 * -0.083333333333333329f;
124 const float forceTerm_17 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_5 * -0.125f + omega_shear * u_1 * xi_9 * 0.041666666666666664f + omega_shear * u_2 * xi_10 * -0.125f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + rr_0 * xi_10 * 0.041666666666666664f + rr_0 * xi_5 * 0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_5 * 0.25f + u_1 * xi_9 * -0.083333333333333329f + u_2 * xi_10 * 0.25f + u_2 * xi_5 * 0.16666666666666666f + xi_10 * -0.083333333333333329f + xi_5 * -0.083333333333333329f;
125 const float forceTerm_18 = omega_shear * u_0 * xi_10 * -0.083333333333333329f + omega_shear * u_0 * xi_5 * 0.125f + omega_shear * u_1 * xi_9 * 0.041666666666666664f + omega_shear * u_2 * xi_10 * 0.125f + omega_shear * u_2 * xi_5 * -0.083333333333333329f + rr_0 * xi_10 * -0.041666666666666664f + rr_0 * xi_5 * 0.041666666666666664f + u_0 * xi_10 * 0.16666666666666666f + u_0 * xi_5 * -0.25f + u_1 * xi_9 * -0.083333333333333329f + u_2 * xi_10 * -0.25f + u_2 * xi_5 * 0.16666666666666666f + xi_10 * 0.083333333333333329f + xi_5 * -0.083333333333333329f;
126 const float u0Mu1 = u_0 - u_1;
127 const float u0Pu1 = u_0 + u_1;
128 const float u1Pu2 = u_1 + u_2;
129 const float u1Mu2 = u_1 - u_2;
130 const float u0Mu2 = u_0 - u_2;
131 const float u0Pu2 = u_0 + u_2;
132 const float f_eq_common = rho - rho * u_0 * u_0 - rho * u_1 * u_1 - rho * u_2 * u_2;
133 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2] = forceTerm_0 + omega_shear * (f_eq_common * 0.33333333333333331f - xi_17) + xi_17;
134 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + _stride_pdfs_3] = forceTerm_1 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_1 * u_1)) + xi_19 * -0.5f + xi_8 * -0.5f) + rr_0 * (rho * u_1 * 0.16666666666666666f + xi_19 * 0.5f + xi_8 * -0.5f) + xi_8 + ((-1.0f <= -grid_size + ((float)(ctr_1))) ? (rho * v_s * (u_0 * 2.0f + v_s) * 0.16666666666666666f) : (0.0f));
135 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 2 * _stride_pdfs_3] = forceTerm_2 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_1 * u_1)) + xi_19 * -0.5f + xi_8 * -0.5f) + rr_0 * (rho * u_1 * -0.16666666666666666f + xi_19 * -0.5f + xi_8 * 0.5f) + xi_19 + ((0.0f >= ((float)(ctr_1))) ? (rho * v_s * (u_0 * -2.0f + v_s) * 0.16666666666666666f) : (0.0f));
136 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 3 * _stride_pdfs_3] = forceTerm_3 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_0 * u_0)) + xi_14 * -0.5f + xi_6 * -0.5f) + rr_0 * (rho * u_0 * -0.16666666666666666f + xi_14 * 0.5f + xi_6 * -0.5f) + xi_6;
137 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 4 * _stride_pdfs_3] = forceTerm_4 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_0 * u_0)) + xi_14 * -0.5f + xi_6 * -0.5f) + rr_0 * (rho * u_0 * 0.16666666666666666f + xi_14 * -0.5f + xi_6 * 0.5f) + xi_14;
138 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 5 * _stride_pdfs_3] = forceTerm_5 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_2 * u_2)) + xi_16 * -0.5f + xi_22 * -0.5f) + rr_0 * (rho * u_2 * 0.16666666666666666f + xi_16 * 0.5f + xi_22 * -0.5f) + xi_22;
139 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 6 * _stride_pdfs_3] = forceTerm_6 + omega_shear * (f_eq_common * 0.16666666666666666f + rho * (-0.1111111111111111f + 0.33333333333333331f * (u_2 * u_2)) + xi_16 * -0.5f + xi_22 * -0.5f) + rr_0 * (rho * u_2 * -0.16666666666666666f + xi_16 * -0.5f + xi_22 * 0.5f) + xi_16;
140 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 7 * _stride_pdfs_3] = forceTerm_7 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_2 * u_2) + 0.125f * (u0Mu1 * u0Mu1)) + xi_24 * -0.5f + xi_7 * -0.5f) + rr_0 * (rho * u0Mu1 * -0.083333333333333329f + xi_24 * 0.5f + xi_7 * -0.5f) + xi_7 + ((-1.0f <= -grid_size + ((float)(ctr_1))) ? (rho * v_s * (u_0 * -2.0f + u_1 * 3.0f - v_s + 1.0f) * 0.083333333333333329f) : (0.0f));
141 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 8 * _stride_pdfs_3] = forceTerm_8 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_2 * u_2) + 0.125f * (u0Pu1 * u0Pu1)) + xi_12 * -0.5f + xi_13 * -0.5f) + rr_0 * (rho * u0Pu1 * 0.083333333333333329f + xi_12 * -0.5f + xi_13 * 0.5f) + xi_12 + ((-1.0f <= -grid_size + ((float)(ctr_1))) ? (rho * v_s * (u_0 * 2.0f + u_1 * 3.0f + v_s + 1.0f) * -0.083333333333333329f) : (0.0f));
142 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 9 * _stride_pdfs_3] = forceTerm_9 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_2 * u_2) + 0.125f * (u0Pu1 * u0Pu1)) + xi_12 * -0.5f + xi_13 * -0.5f) + rr_0 * (rho * u0Pu1 * -0.083333333333333329f + xi_12 * 0.5f + xi_13 * -0.5f) + xi_13 + ((0.0f >= ((float)(ctr_1))) ? (rho * v_s * (u_0 * 2.0f + u_1 * 3.0f - v_s - 1.0f) * 0.083333333333333329f) : (0.0f));
143 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 10 * _stride_pdfs_3] = forceTerm_10 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_2 * u_2) + 0.125f * (u0Mu1 * u0Mu1)) + xi_24 * -0.5f + xi_7 * -0.5f) + rr_0 * (rho * u0Mu1 * 0.083333333333333329f + xi_24 * -0.5f + xi_7 * 0.5f) + xi_24 + ((0.0f >= ((float)(ctr_1))) ? (rho * v_s * (u_0 * 2.0f + u_1 * -3.0f - v_s + 1.0f) * 0.083333333333333329f) : (0.0f));
144 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 11 * _stride_pdfs_3] = forceTerm_11 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_0 * u_0) + 0.125f * (u1Pu2 * u1Pu2)) + xi_21 * -0.5f + xi_4 * -0.5f) + rr_0 * (rho * u1Pu2 * 0.083333333333333329f + xi_21 * -0.5f + xi_4 * 0.5f) + xi_21;
145 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 12 * _stride_pdfs_3] = forceTerm_12 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_0 * u_0) + 0.125f * (u1Mu2 * u1Mu2)) + xi_20 * -0.5f + xi_23 * -0.5f) + rr_0 * (rho * u1Mu2 * -0.083333333333333329f + xi_20 * 0.5f + xi_23 * -0.5f) + xi_23;
146 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 13 * _stride_pdfs_3] = forceTerm_13 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_1 * u_1) + 0.125f * (u0Mu2 * u0Mu2)) + xi_15 * -0.5f + xi_18 * -0.5f) + rr_0 * (rho * u0Mu2 * -0.083333333333333329f + xi_15 * -0.5f + xi_18 * 0.5f) + xi_15;
147 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 14 * _stride_pdfs_3] = forceTerm_14 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_1 * u_1) + 0.125f * (u0Pu2 * u0Pu2)) + xi_11 * -0.5f + xi_3 * -0.5f) + rr_0 * (rho * u0Pu2 * 0.083333333333333329f + xi_11 * -0.5f + xi_3 * 0.5f) + xi_11;
148 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 15 * _stride_pdfs_3] = forceTerm_15 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_0 * u_0) + 0.125f * (u1Mu2 * u1Mu2)) + xi_20 * -0.5f + xi_23 * -0.5f) + rr_0 * (rho * u1Mu2 * 0.083333333333333329f + xi_20 * -0.5f + xi_23 * 0.5f) + xi_20;
149 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 16 * _stride_pdfs_3] = forceTerm_16 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_0 * u_0) + 0.125f * (u1Pu2 * u1Pu2)) + xi_21 * -0.5f + xi_4 * -0.5f) + rr_0 * (rho * u1Pu2 * -0.083333333333333329f + xi_21 * 0.5f + xi_4 * -0.5f) + xi_4;
150 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 17 * _stride_pdfs_3] = forceTerm_17 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_1 * u_1) + 0.125f * (u0Pu2 * u0Pu2)) + xi_11 * -0.5f + xi_3 * -0.5f) + rr_0 * (rho * u0Pu2 * -0.083333333333333329f + xi_11 * 0.5f + xi_3 * -0.5f) + xi_3;
151 _data_pdfs[_stride_pdfs_0 * ctr_0 + _stride_pdfs_1 * ctr_1 + _stride_pdfs_2 * ctr_2 + 18 * _stride_pdfs_3] = forceTerm_18 + omega_shear * (f_eq_common * 0.041666666666666664f + rho * (-0.013888888888888888f + 0.041666666666666664f * (u_1 * u_1) + 0.125f * (u0Mu2 * u0Mu2)) + xi_15 * -0.5f + xi_18 * -0.5f) + rr_0 * (rho * u0Mu2 * 0.083333333333333329f + xi_15 * 0.5f + xi_18 * -0.5f) + xi_18;
152 }
153 }
154 }
155}
156} // namespace internal_ab1f3bc3368574afb482da84ccb58898
157
159
160 auto pdfs = block->getData<field::GhostLayerField<float, 19>>(pdfsID);
161 auto force = block->getData<field::GhostLayerField<float, 3>>(forceID);
162
163 auto &grid_size = this->grid_size_;
164 auto &omega_shear = this->omega_shear_;
165 auto &v_s = this->v_s_;
166 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(force->nrOfGhostLayers()))
167 float *RESTRICT const _data_force = force->dataAt(0, 0, 0, 0);
168 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
169 WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(pdfs->nrOfGhostLayers()))
170 float *RESTRICT _data_pdfs = pdfs->dataAt(0, 0, 0, 0);
171 WALBERLA_ASSERT_EQUAL(pdfs->layout(), field::fzyx)
172 WALBERLA_ASSERT_GREATER_EQUAL(force->xSizeWithGhostLayer(), int64_t(int64_c(force->xSize()) + 0))
173 const int64_t _size_force_0 = int64_t(int64_c(force->xSize()) + 0);
174 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
175 WALBERLA_ASSERT_GREATER_EQUAL(force->ySizeWithGhostLayer(), int64_t(int64_c(force->ySize()) + 0))
176 const int64_t _size_force_1 = int64_t(int64_c(force->ySize()) + 0);
177 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
178 WALBERLA_ASSERT_GREATER_EQUAL(force->zSizeWithGhostLayer(), int64_t(int64_c(force->zSize()) + 0))
179 const int64_t _size_force_2 = int64_t(int64_c(force->zSize()) + 0);
180 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
181 const int64_t _stride_force_0 = int64_t(force->xStride());
182 const int64_t _stride_force_1 = int64_t(force->yStride());
183 const int64_t _stride_force_2 = int64_t(force->zStride());
184 const int64_t _stride_force_3 = int64_t(1 * int64_t(force->fStride()));
185 const int64_t _stride_pdfs_0 = int64_t(pdfs->xStride());
186 const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride());
187 const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride());
188 const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride()));
189 internal_ab1f3bc3368574afb482da84ccb58898::collidesweepsingleprecisionleesedwards_collidesweepsingleprecisionleesedwards(_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, grid_size, omega_shear, v_s);
190}
191
192void CollideSweepSinglePrecisionLeesEdwards::runOnCellInterval(const shared_ptr<StructuredBlockStorage> &blocks, const CellInterval &globalCellInterval, cell_idx_t ghostLayers, IBlock *block) {
193
194 CellInterval ci = globalCellInterval;
195 CellInterval blockBB = blocks->getBlockCellBB(*block);
196 blockBB.expand(ghostLayers);
197 ci.intersect(blockBB);
198 blocks->transformGlobalToBlockLocalCellInterval(ci, *block);
199 if (ci.empty())
200 return;
201
202 auto pdfs = block->getData<field::GhostLayerField<float, 19>>(pdfsID);
203 auto force = block->getData<field::GhostLayerField<float, 3>>(forceID);
204
205 auto &grid_size = this->grid_size_;
206 auto &omega_shear = this->omega_shear_;
207 auto &v_s = this->v_s_;
208 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(force->nrOfGhostLayers()))
209 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(force->nrOfGhostLayers()))
210 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(force->nrOfGhostLayers()))
211 float *RESTRICT const _data_force = force->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
212 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
213 WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin(), -int_c(pdfs->nrOfGhostLayers()))
214 WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin(), -int_c(pdfs->nrOfGhostLayers()))
215 WALBERLA_ASSERT_GREATER_EQUAL(ci.zMin(), -int_c(pdfs->nrOfGhostLayers()))
216 float *RESTRICT _data_pdfs = pdfs->dataAt(ci.xMin(), ci.yMin(), ci.zMin(), 0);
217 WALBERLA_ASSERT_EQUAL(pdfs->layout(), field::fzyx)
218 WALBERLA_ASSERT_GREATER_EQUAL(force->xSizeWithGhostLayer(), int64_t(int64_c(ci.xSize()) + 0))
219 const int64_t _size_force_0 = int64_t(int64_c(ci.xSize()) + 0);
220 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
221 WALBERLA_ASSERT_GREATER_EQUAL(force->ySizeWithGhostLayer(), int64_t(int64_c(ci.ySize()) + 0))
222 const int64_t _size_force_1 = int64_t(int64_c(ci.ySize()) + 0);
223 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
224 WALBERLA_ASSERT_GREATER_EQUAL(force->zSizeWithGhostLayer(), int64_t(int64_c(ci.zSize()) + 0))
225 const int64_t _size_force_2 = int64_t(int64_c(ci.zSize()) + 0);
226 WALBERLA_ASSERT_EQUAL(force->layout(), field::fzyx)
227 const int64_t _stride_force_0 = int64_t(force->xStride());
228 const int64_t _stride_force_1 = int64_t(force->yStride());
229 const int64_t _stride_force_2 = int64_t(force->zStride());
230 const int64_t _stride_force_3 = int64_t(1 * int64_t(force->fStride()));
231 const int64_t _stride_pdfs_0 = int64_t(pdfs->xStride());
232 const int64_t _stride_pdfs_1 = int64_t(pdfs->yStride());
233 const int64_t _stride_pdfs_2 = int64_t(pdfs->zStride());
234 const int64_t _stride_pdfs_3 = int64_t(1 * int64_t(pdfs->fStride()));
235 internal_ab1f3bc3368574afb482da84ccb58898::collidesweepsingleprecisionleesedwards_collidesweepsingleprecisionleesedwards(_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, grid_size, omega_shear, v_s);
236}
237
238} // namespace pystencils
239} // namespace walberla
240
241#if (defined WALBERLA_CXX_COMPILER_IS_GNU) || (defined WALBERLA_CXX_COMPILER_IS_CLANG)
242#pragma GCC diagnostic pop
243#endif
244
245#if (defined WALBERLA_CXX_COMPILER_IS_INTEL)
246#pragma warning pop
247#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
static FUNC_PREFIX void collidesweepsingleprecisionleesedwards_collidesweepsingleprecisionleesedwards(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, float grid_size, float omega_shear, float v_s)
\file PackInfoPdfDoublePrecision.cpp \author pystencils