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
2eda907a
Commit
2eda907a
authored
Jul 11, 2019
by
Martin Bauer
Browse files
Test for smagorinsky output field
parent
a11fc764
Pipeline
#16430
passed with stage
in 41 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
lbmpy_walberla_tests/test_walberla_codegen.py
View file @
2eda907a
...
...
@@ -61,3 +61,16 @@ class WalberlaLbmpyCodegenTest(unittest.TestCase):
lb_method
=
create_lb_method
(
stencil
=
'D3Q19'
,
method
=
'srt'
,
relaxation_rates
=
[
omega
],
compressible
=
False
)
generate_lattice_model
(
ctx
,
'Model'
,
lb_method
,
update_rule_params
=
{
'compressible'
:
False
})
assert
'static const bool compressible = false;'
in
ctx
.
files
[
'Model.h'
]
@
staticmethod
def
test_output_field
():
with
ManualCodeGenerationContext
(
openmp
=
True
,
double_accuracy
=
True
)
as
ctx
:
omega_field
=
ps
.
fields
(
"omega_out: [3D]"
,
layout
=
'fzyx'
)
parameters
=
{
'stencil'
:
'D3Q19'
,
'method'
:
'trt'
,
'smagorinsky'
:
True
,
'omega_output_field'
:
omega_field
,
}
lb_method
=
create_lb_method
(
**
parameters
)
generate_lattice_model
(
ctx
,
'Model'
,
lb_method
,
update_rule_params
=
parameters
)
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