Skip to content

Commit 50bfd3a

Browse files
committed
WIP: Adapt UBB to pull scheme
1 parent 515e4ff commit 50bfd3a

23 files changed

+295
-297
lines changed

maintainer/walberla_kernels/generate_lb_kernels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def paramlist(parameters, keys):
193193
lbmpy_walberla.generate_boundary(
194194
ctx, f"Dynamic_UBB_{precision_suffix}{target_suffix}", ubb_dynamic,
195195
method, additional_data_handler=ubb_data_handler,
196-
streaming_pattern="push", target=target)
196+
streaming_pattern="pull", target=target)
197197

198198
with open(f"Dynamic_UBB_{precision_suffix}{target_suffix}.h", "r+") as f:
199199
content = f.read()

src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_double_precision.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,9 +1625,9 @@ static FUNC_PREFIX void advectivefluxkernel_double_precision_advectivefluxkernel
16251625
} // namespace internal_5255e1c780a944d646f270232511968b
16261626

16271627
void AdvectiveFluxKernel_double_precision::run(IBlock *block) {
1628+
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
16281629
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
16291630
auto u = block->getData<field::GhostLayerField<double, 3>>(uID);
1630-
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
16311631

16321632
WALBERLA_ASSERT_GREATER_EQUAL(-1, -int_c(j->nrOfGhostLayers()));
16331633
double *RESTRICT const _data_j = j->dataAt(-1, -1, -1, 0);
@@ -1664,9 +1664,9 @@ void AdvectiveFluxKernel_double_precision::runOnCellInterval(const shared_ptr<St
16641664
if (ci.empty())
16651665
return;
16661666

1667+
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
16671668
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
16681669
auto u = block->getData<field::GhostLayerField<double, 3>>(uID);
1669-
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
16701670

16711671
WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin() - 1, -int_c(j->nrOfGhostLayers()));
16721672
WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin() - 1, -int_c(j->nrOfGhostLayers()));

src/walberla_bridge/src/electrokinetics/generated_kernels/AdvectiveFluxKernel_single_precision.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,9 +1625,9 @@ static FUNC_PREFIX void advectivefluxkernel_single_precision_advectivefluxkernel
16251625
} // namespace internal_47df4b171f276b8c3a55fc08d45e245e
16261626

16271627
void AdvectiveFluxKernel_single_precision::run(IBlock *block) {
1628-
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
16291628
auto rho = block->getData<field::GhostLayerField<float, 1>>(rhoID);
16301629
auto u = block->getData<field::GhostLayerField<float, 3>>(uID);
1630+
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
16311631

16321632
WALBERLA_ASSERT_GREATER_EQUAL(-1, -int_c(j->nrOfGhostLayers()));
16331633
float *RESTRICT const _data_j = j->dataAt(-1, -1, -1, 0);
@@ -1664,9 +1664,9 @@ void AdvectiveFluxKernel_single_precision::runOnCellInterval(const shared_ptr<St
16641664
if (ci.empty())
16651665
return;
16661666

1667-
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
16681667
auto rho = block->getData<field::GhostLayerField<float, 1>>(rhoID);
16691668
auto u = block->getData<field::GhostLayerField<float, 3>>(uID);
1669+
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
16701670

16711671
WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin() - 1, -int_c(j->nrOfGhostLayers()));
16721672
WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin() - 1, -int_c(j->nrOfGhostLayers()));

src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_double_precision.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ static FUNC_PREFIX void continuitykernel_double_precision_continuitykernel_doubl
108108
} // namespace internal_5c5e903f8ea7925cf790d7c2318b2c56
109109

110110
void ContinuityKernel_double_precision::run(IBlock *block) {
111-
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
112111
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
112+
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
113113

114114
WALBERLA_ASSERT_GREATER_EQUAL(-1, -int_c(j->nrOfGhostLayers()));
115115
double *RESTRICT const _data_j = j->dataAt(-1, -1, -1, 0);
@@ -140,8 +140,8 @@ void ContinuityKernel_double_precision::runOnCellInterval(const shared_ptr<Struc
140140
if (ci.empty())
141141
return;
142142

143-
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
144143
auto j = block->getData<field::GhostLayerField<double, 13>>(jID);
144+
auto rho = block->getData<field::GhostLayerField<double, 1>>(rhoID);
145145

146146
WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin() - 1, -int_c(j->nrOfGhostLayers()));
147147
WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin() - 1, -int_c(j->nrOfGhostLayers()));

src/walberla_bridge/src/electrokinetics/generated_kernels/ContinuityKernel_single_precision.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ static FUNC_PREFIX void continuitykernel_single_precision_continuitykernel_singl
108108
} // namespace internal_990034b4e4dd57d2802b4bcb5f716e46
109109

110110
void ContinuityKernel_single_precision::run(IBlock *block) {
111-
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
112111
auto rho = block->getData<field::GhostLayerField<float, 1>>(rhoID);
112+
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
113113

114114
WALBERLA_ASSERT_GREATER_EQUAL(-1, -int_c(j->nrOfGhostLayers()));
115115
float *RESTRICT const _data_j = j->dataAt(-1, -1, -1, 0);
@@ -140,8 +140,8 @@ void ContinuityKernel_single_precision::runOnCellInterval(const shared_ptr<Struc
140140
if (ci.empty())
141141
return;
142142

143-
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
144143
auto rho = block->getData<field::GhostLayerField<float, 1>>(rhoID);
144+
auto j = block->getData<field::GhostLayerField<float, 13>>(jID);
145145

146146
WALBERLA_ASSERT_GREATER_EQUAL(ci.xMin() - 1, -int_c(j->nrOfGhostLayers()));
147147
WALBERLA_ASSERT_GREATER_EQUAL(ci.yMin() - 1, -int_c(j->nrOfGhostLayers()));

src/walberla_bridge/src/electrokinetics/generated_kernels/DiffusiveFluxKernelWithElectrostatic_double_precision.cpp

Lines changed: 56 additions & 74 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)