diff options
Diffstat (limited to 'boltzgen/kernel/template/bounce_back_boundary.cpp.mako')
-rw-r--r-- | boltzgen/kernel/template/bounce_back_boundary.cpp.mako | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/boltzgen/kernel/template/bounce_back_boundary.cpp.mako b/boltzgen/kernel/template/bounce_back_boundary.cpp.mako index c7abd2a..91dcfa0 100644 --- a/boltzgen/kernel/template/bounce_back_boundary.cpp.mako +++ b/boltzgen/kernel/template/bounce_back_boundary.cpp.mako @@ -9,19 +9,15 @@ void bounce_back_boundary( ${float_type}* f_next, const ${float_type} f_curr_${i} = preshifted_f_prev[${layout.pop_offset(i) + layout.neighbor_offset(-c_i)}]; % endfor -% for i, expr in enumerate(moments_subexpr): - const ${float_type} ${expr[0]} = ${ccode(expr[1])}; -% endfor - -% for i, expr in enumerate(moments_assignment): - ${float_type} ${ccode(expr)} -% endfor +<% + subexpr, assignment = model.bgk(f_eq = model.equilibrium(resolve_moments = True)) +%> -% for i, expr in enumerate(collision_subexpr): +% for i, expr in enumerate(subexpr): const ${float_type} ${expr[0]} = ${ccode(expr[1])}; % endfor -% for i, expr in enumerate(collision_assignment): +% for i, expr in enumerate(assignment): const ${float_type} ${ccode(expr)} % endfor |