From 14d51c9fa06c2bd1e780beb08f54cf37a70df42e Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 23 Jan 2020 20:28:39 +0100 Subject: [PATCH] Some whitespace control in templates --- src/pystencils_autodiff/walberla.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pystencils_autodiff/walberla.py b/src/pystencils_autodiff/walberla.py index 9d272ea..b4c1841 100644 --- a/src/pystencils_autodiff/walberla.py +++ b/src/pystencils_autodiff/walberla.py @@ -157,10 +157,10 @@ class FieldAllocation(JinjaCppFile): TEMPLATE = jinja2.Template("""BlockDataID {{ field_name }}_data = field::addToStorage<{{ field_type }}>( {{ block_forrest }}, {{ field_name }} - {%- if init_value %} , {{ init_value }} {% endif %} - {%- if layout_str %} , {{ layout_str }} {% endif %} - {%- if num_ghost_layers %}, {{ num_ghost_layers }} {% endif %} - {%- if always_initialize %}, {{ always_initialize }} {% endif %}) + {%- if init_value -%} , {{ init_value }} {% endif %} + {%- if layout_str -%} , {{ layout_str }} {% endif %} + {%- if num_ghost_layers -%}, {{ num_ghost_layers }} {% endif %} + {%- if always_initialize -%}, {{ always_initialize }} {% endif %}) """) # noqa def __init__(self, block_forrest, field): -- GitLab