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
pycodegen
lbmpy_walberla
Commits
913d2040
Commit
913d2040
authored
May 09, 2019
by
Martin Bauer
Browse files
Optional parameters to be passed to update rule (entropic, smagorinsky...)
parent
f3e4e123
Pipeline
#15320
passed with stage
in 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lbmpy_walberla/walberla_lbm_generation.py
View file @
913d2040
...
...
@@ -24,7 +24,7 @@ cpp_printer = CustomSympyPrinter(dialect='c')
REFINEMENT_SCALE_FACTOR
=
sp
.
Symbol
(
"level_scale_factor"
)
def
generate_lattice_model
(
generation_context
,
class_name
,
lb_method
,
refinement_scaling
=
None
,
def
generate_lattice_model
(
generation_context
,
class_name
,
lb_method
,
refinement_scaling
=
None
,
update_rule_params
=
{},
**
create_kernel_params
):
# usually a numpy layout is chosen by default i.e. xyzf - which is bad for waLBerla where at least the spatial
...
...
@@ -36,7 +36,8 @@ def generate_lattice_model(generation_context, class_name, lb_method, refinement
raise
ValueError
(
"Lattice Models can only be generated for CPUs. To generate LBM on GPUs use sweeps directly"
)
is_float
=
not
generation_context
.
double_accuracy
params
,
opt_params
=
update_with_default_parameters
({
'lb_method'
:
lb_method
},
optimization
)
update_rule_params
[
'lb_method'
]
=
lb_method
params
,
opt_params
=
update_with_default_parameters
(
update_rule_params
,
optimization
)
stencil_name
=
get_stencil_name
(
lb_method
.
stencil
)
if
not
stencil_name
:
...
...
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