Commit 6b0e8cab authored by Christoph Schwarzmeier's avatar Christoph Schwarzmeier
Browse files

Merge branch 'includeGuards' into 'master'

Add include guards

Closes #148

See merge request walberla/walberla!461
parents 36eeb20a f0bd64c8
Pipeline #32748 canceled with stages
in 66 minutes and 2 seconds
......@@ -17,7 +17,7 @@
//
//======================================================================================================================
#pragma once
#include "core/DataTypes.h"
#include "core/logging/Logging.h"
......@@ -97,7 +97,7 @@ class {{class_name}}
public:
typedef stencil::{{stencil_name}} Stencil;
typedef stencil::{{stencil_name}} CommunicationStencil;
typedef stencil::{{communication_stencil_name}} CommunicationStencil;
static const real_t w[{{Q}}];
static const real_t wInv[{{Q}}];
......
......@@ -30,6 +30,9 @@ def __lattice_model(generation_context, class_name, lb_method, stream_collide_as
stencil_name = get_stencil_name(lb_method.stencil)
if not stencil_name:
raise ValueError("lb_method uses a stencil that is not supported in waLBerla")
communication_stencil_name = stencil_name if stencil_name != "D3Q15" else "D3Q27"
is_float = not generation_context.double_accuracy
dtype_string = "float32" if is_float else "float64"
......@@ -86,6 +89,7 @@ def __lattice_model(generation_context, class_name, lb_method, stream_collide_as
jinja_context = {
'class_name': class_name,
'stencil_name': stencil_name,
'communication_stencil_name': communication_stencil_name,
'D': lb_method.dim,
'Q': len(lb_method.stencil),
'compressible': lb_method.conserved_quantity_computation.compressible,
......
......@@ -424,7 +424,9 @@ def get_vectorize_instruction_set(generation_context):
if supported_instruction_sets:
return supported_instruction_sets[-1]
else: # if cpuinfo package is not installed
warnings.warn("Could not obtain supported vectorization instruction sets - defaulting to sse")
warnings.warn("Could not obtain supported vectorization instruction sets - defaulting to sse. "\
"This problem can probably be fixed by installing py-cpuinfo. This package can "\
"gather the needed hardware information.")
return 'sse'
else:
return None
......
......@@ -17,6 +17,7 @@
//! \\author pystencils
//======================================================================================================================
#pragma once
#include "core/DataTypes.h"
{% if target is equalto 'cpu' -%}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment