Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Hönig
waLBerla
Commits
f0bd64c8
Commit
f0bd64c8
authored
Jun 16, 2021
by
Markus Holzer
Committed by
Christoph Schwarzmeier
Jun 16, 2021
Browse files
Add include guards
parent
e48f00a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
python/lbmpy_walberla/templates/LatticeModel.tmpl.h
View file @
f0bd64c8
...
...
@@ -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
}}];
...
...
python/lbmpy_walberla/walberla_lbm_generation.py
View file @
f0bd64c8
...
...
@@ -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
,
...
...
python/pystencils_walberla/codegen.py
View file @
f0bd64c8
...
...
@@ -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
...
...
python/pystencils_walberla/templates/Boundary.tmpl.h
View file @
f0bd64c8
...
...
@@ -17,6 +17,7 @@
//! \\author pystencils
//======================================================================================================================
#pragma once
#include
"core/DataTypes.h"
{
%
if
target
is
equalto
'
cpu
'
-%
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment