aboutsummaryrefslogtreecommitdiff
path: root/boltzgen/kernel/template/momenta_boundary.cpp.mako
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-31 13:13:00 +0100
committerAdrian Kummerlaender2019-10-31 13:13:00 +0100
commite2b00f4ec963060be98939c7b0d12d6c00e50a02 (patch)
tree9b8729d491a2d9cb2b5fafe8284bc807ad21665a /boltzgen/kernel/template/momenta_boundary.cpp.mako
parentc82b38122cc3ab7717cb0ba9ec530b4658bd03e4 (diff)
downloadboltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar.gz
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar.bz2
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar.lz
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar.xz
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.tar.zst
boltzgen-e2b00f4ec963060be98939c7b0d12d6c00e50a02.zip
Call symbolic generator inside code templates
This paves the way for dropping in other LBM collision models. As a side benefit the default momenta calulcation is now fully inlined where possible.
Diffstat (limited to 'boltzgen/kernel/template/momenta_boundary.cpp.mako')
-rw-r--r--boltzgen/kernel/template/momenta_boundary.cpp.mako5
1 files changed, 5 insertions, 0 deletions
diff --git a/boltzgen/kernel/template/momenta_boundary.cpp.mako b/boltzgen/kernel/template/momenta_boundary.cpp.mako
index 3f51087..6d05288 100644
--- a/boltzgen/kernel/template/momenta_boundary.cpp.mako
+++ b/boltzgen/kernel/template/momenta_boundary.cpp.mako
@@ -1,3 +1,8 @@
+<%
+moments_subexpr, moments_assignment = model.moments()
+collision_subexpr, collision_assignment = model.bgk(f_eq = model.equilibrium(resolve_moments = False))
+%>
+
<%def name="momenta_boundary(name, param)">
void ${name}_momenta_boundary(
${float_type}* f_next,