lbmpy merge requestshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests2022-11-08T09:04:23+01:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/134Simplify equilibrium terms2022-11-08T09:04:23+01:00Markus HolzerSimplify equilibrium termsFor some constellations, the equilibrium terms have grown rather large. This MR simplifies the terms to obtain a more reasonable representation of the EQ again
Fixes #37For some constellations, the equilibrium terms have grown rather large. This MR simplifies the terms to obtain a more reasonable representation of the EQ again
Fixes #37Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/132More tests for fluctuating LB2022-10-25T16:13:12+02:00Markus HolzerMore tests for fluctuating LBDue to Issue 188 in waLBerla, this MR introduces more test cases for the fluctuating LB to make sure it works as intendedDue to Issue 188 in waLBerla, this MR introduces more test cases for the fluctuating LB to make sure it works as intendedMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/110Remove OpenCL support2021-11-22T23:30:24+01:00Markus HolzerRemove OpenCL supportDue to pystencils!278 the OpenCL support of lbmpy needs to be removedDue to pystencils!278 the OpenCL support of lbmpy needs to be removedMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/89FreeSlip2021-07-09T10:14:40+02:00Markus HolzerFreeSlipThis MR adds FreeSlip boundary conditions to lbmpy. Fixes #3This MR adds FreeSlip boundary conditions to lbmpy. Fixes #3Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/84Use int64 for indexing2021-06-07T15:30:42+02:00Markus HolzerUse int64 for indexingFixes #18
The code is changed in the following way. As an example, a generated UBB boundary is shown. Before the adaption:
```cpp
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,26,25,24,23,22,2...Fixes #18
The code is changed in the following way. As an example, a generated UBB boundary is shown. Before the adaption:
```cpp
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,26,25,24,23,22,21,20,19 };
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,1,-1,1,-1,1,-1,1,-1 };
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,1,1,-1,-1,1,1,-1,-1 };
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,1,1,1,1,-1,-1,-1,-1 };
const double weights [] = { 0.296296296296296,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963 };
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,1,-1,1,-1,1,-1,1,-1 };
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,1,1,-1,-1,1,1,-1,-1 };
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,1,1,1,1,-1,-1,-1,-1 };
for (int64_t ctr_0 = 0; ctr_0 < _size_indexField_0; ctr_0 += 1)
{
const int32_t x = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0]));
const int32_t y = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 4]));
const int32_t z = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 8]));
const int32_t dir = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 12]));
_data_ldc_pdfSrc[x + 452*y + 204304*z + 92345408*f_in_inv_dir_idx[dir] + f_in_inv_offsets_x[dir] + 452*f_in_inv_offsets_y[dir] + 204304*f_in_inv_offsets_z[dir]] = -0.029999999999999999*neighbour_offset_x[dir]*weights[dir] + _data_ldc_pdfSrc[92345408*dir + x + 452*y + 204304*z];
```
After the adaption:
```cpp
const int64_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,26,25,24,23,22,21,20,19 };
const int64_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,1,-1,1,-1,1,-1,1,-1 };
const int64_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,1,1,-1,-1,1,1,-1,-1 };
const int64_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,1,1,1,1,-1,-1,-1,-1 };
const double weights [] = { 0.296296296296296,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963 };
const int64_t neighbour_offset_x [] = { 0,0,0,-1,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,-1,1,1,-1,1,-1,1,-1,1,-1 };
const int64_t neighbour_offset_y [] = { 0,1,-1,0,0,0,0,1,1,-1,-1,1,-1,0,0,1,-1,0,0,1,1,-1,-1,1,1,-1,-1 };
const int64_t neighbour_offset_z [] = { 0,0,0,0,0,1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1 };
for (int64_t ctr_0 = 0; ctr_0 < _size_indexField_0; ctr_0 += 1)
{
const int64_t x = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0]));
const int64_t y = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 4]));
const int64_t z = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 8]));
const int64_t dir = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 12]));
_data_ldc_pdfSrc[x + 452*y + 204304*z + 92345408*f_in_inv_dir_idx[dir] + f_in_inv_offsets_x[dir] + 452*f_in_inv_offsets_y[dir] + 204304*f_in_inv_offsets_z[dir]] = -0.029999999999999999*neighbour_offset_x[dir]*weights[dir] + _data_ldc_pdfSrc[92345408*dir + x + 452*y + 204304*z];
```Markus HolzerMarkus Holzer