diff --git a/python/lbmpy_walberla/templates/LatticeModel.tmpl.h b/python/lbmpy_walberla/templates/LatticeModel.tmpl.h index 769ae027ce76a0c334dfe9107487f99aaa5fb488..9c41706914f016adf9320f46808f68ce7beb0536 100644 --- a/python/lbmpy_walberla/templates/LatticeModel.tmpl.h +++ b/python/lbmpy_walberla/templates/LatticeModel.tmpl.h @@ -109,7 +109,7 @@ public: class Sweep { public: - Sweep( BlockDataID _pdfsID ) : pdfsID(_pdfsID) {}; + Sweep( BlockDataID _pdfsID ) : pdfsID(_pdfsID) {} //void stream ( IBlock * const block, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); void collide ( IBlock * const block, const uint_t numberOfGhostLayersToInclude = uint_t(0) ); @@ -134,7 +134,7 @@ public: {{class_name}}( {{stream_collide_kernel|generate_constructor_parameters(lmIgnores+lmOffsets) }} ) : {{ stream_collide_kernel|generate_constructor_initializer_list(lmIgnores+lmOffsets) }}, currentLevel(0) - {}; + {} void configure( IBlock & block, StructuredBlockStorage & storage ) { configureBlock( &block, &storage ); } diff --git a/python/pystencils_walberla/sweep.py b/python/pystencils_walberla/sweep.py index f6e190fded98f6063d5ccad4043daa34d3cb21da..85de00f06f151787e3d8025c6c357660933239ef 100644 --- a/python/pystencils_walberla/sweep.py +++ b/python/pystencils_walberla/sweep.py @@ -98,10 +98,10 @@ def generate_selective_sweep(generation_context, class_name, selection_tree, int ghost_layers_to_include: see documentation of `generate_sweep` cpu_vectorize_info: Dictionary containing information about CPU vectorization applied to the kernels cpu_openmp: Whether or not CPU kernels use OpenMP parallelization - max_threads: only relevant for GPU kernels. Will be argument of `__launch_bounds__ + max_threads: only relevant for GPU kernels. Will be argument of `__launch_bounds__` block_offset: A tuple of TypedSymbols that will function as internal variable to store storage.getBlockCellBB(block).min()) -` + """ def to_name(f): return f.name if isinstance(f, Field) else f diff --git a/python/pystencils_walberla/templates/Boundary.tmpl.h b/python/pystencils_walberla/templates/Boundary.tmpl.h index 43fd409eaaa9ba80cfb79bfc45016a5e02f13efb..8fcce482036fd762f867b0d37e1fea8571f95d6d 100644 --- a/python/pystencils_walberla/templates/Boundary.tmpl.h +++ b/python/pystencils_walberla/templates/Boundary.tmpl.h @@ -204,7 +204,7 @@ public: auto createForceVector = []( IBlock * const , StructuredBlockStorage * const ) { return new ForceVector(); }; forceVectorID = blocks->addStructuredBlockData< ForceVector >( createForceVector, "forceVector_{{class_name}}"); {%- endif %} - }; + } void run ( {{- ["IBlock * block", kernel.kernel_selection_parameters, ["gpuStream_t stream = nullptr"] if target == 'gpu' else []] | type_identifier_list -}} diff --git a/python/pystencils_walberla/templates/CpuPackInfo.tmpl.h b/python/pystencils_walberla/templates/CpuPackInfo.tmpl.h index 137f4da6ade5ceb1e92c77b54277b288e335192c..4e1f85fd171c81899b327b0695d8565e0bc0c645 100644 --- a/python/pystencils_walberla/templates/CpuPackInfo.tmpl.h +++ b/python/pystencils_walberla/templates/CpuPackInfo.tmpl.h @@ -46,7 +46,7 @@ class {{class_name}} : public ::walberla::communication::UniformPackInfo public: {{class_name}}( {{fused_kernel|generate_constructor_parameters(parameters_to_ignore=['buffer'])}} ) : {{ fused_kernel|generate_constructor_initializer_list(parameters_to_ignore=['buffer']) }} - {}; + {} ~{{class_name}}() override = default; bool constantDataExchange() const override { return true; } diff --git a/python/pystencils_walberla/templates/GpuPackInfo.tmpl.h b/python/pystencils_walberla/templates/GpuPackInfo.tmpl.h index 820c6b8bec516e12f504230024207804d013fec1..06312a1474cf9d7f2b3fa1ab583e04cf7c739a32 100644 --- a/python/pystencils_walberla/templates/GpuPackInfo.tmpl.h +++ b/python/pystencils_walberla/templates/GpuPackInfo.tmpl.h @@ -52,7 +52,7 @@ class {{class_name}} : public ::walberla::gpu::GeneratedGPUPackInfo public: {{class_name}}( {{fused_kernel|generate_constructor_parameters(parameters_to_ignore=['buffer'])}} ) : {{ fused_kernel|generate_constructor_initializer_list(parameters_to_ignore=['buffer']) }} - {}; + {} ~{{class_name}}() override = default; void pack (stencil::Direction dir, unsigned char * buffer, IBlock * block, gpuStream_t stream) override; diff --git a/python/pystencils_walberla/templates/Sweep.tmpl.h b/python/pystencils_walberla/templates/Sweep.tmpl.h index bebbe855c33cf00fc825ca51d5a057f05fa079a1..b146a848cf33a72c319428d81f3a13676d0b0657 100644 --- a/python/pystencils_walberla/templates/Sweep.tmpl.h +++ b/python/pystencils_walberla/templates/Sweep.tmpl.h @@ -32,7 +32,9 @@ #include "domain_decomposition/BlockDataID.h" #include "domain_decomposition/IBlock.h" #include "domain_decomposition/StructuredBlockStorage.h" -#include <set> + +#include <functional> +#include <unordered_map> {% for header in interface_spec.headers %} #include {{header}} @@ -60,8 +62,8 @@ class {{class_name}} { public: {{class_name}}( {{kernel|generate_constructor_parameters(parameters_to_ignore=parameters_to_ignore)}} {%if inner_outer_split%}, const Cell & outerWidth=Cell(1, 1, 1){% endif %}) - : {{ kernel|generate_constructor_initializer_list(parameters_to_ignore=parameters_to_ignore) }}{%if inner_outer_split%}{% if kernel|generate_constructor_initializer_list|length %},{% endif %} outerWidth_(outerWidth){% endif %}{%if block_offset%}, configured_(false){% endif %} - {}; + : {{ kernel|generate_constructor_initializer_list(parameters_to_ignore=parameters_to_ignore) }}{%if inner_outer_split%}{% if kernel|generate_constructor_initializer_list|length %},{% endif %} outerWidth_(outerWidth){% endif %}{%if block_offset%}{% for offset in block_offset -%}, {{offset[0]}}_({{offset[1]}}(0)) {% endfor -%}, configured_(false){% endif %} + {} {{ kernel| generate_destructor(class_name) |indent(3) }}