Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
5040799c
Commit
5040799c
authored
6 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
Use optimized walberla pack info
parent
e10d82d0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lbstep.py
+4
-2
4 additions, 2 deletions
lbstep.py
moments.py
+15
-11
15 additions, 11 deletions
moments.py
with
19 additions
and
13 deletions
lbstep.py
+
4
−
2
View file @
5040799c
...
...
@@ -120,8 +120,10 @@ class LatticeBoltzmannStep:
# -- Boundary Handling & Synchronization ---
stencil_name
=
method_parameters
[
'
stencil
'
]
self
.
_sync_src
=
data_handling
.
synchronization_function
([
self
.
_pdf_arr_name
],
stencil_name
,
target
)
self
.
_sync_tmp
=
data_handling
.
synchronization_function
([
self
.
_tmp_arr_name
],
stencil_name
,
target
)
self
.
_sync_src
=
data_handling
.
synchronization_function
([
self
.
_pdf_arr_name
],
stencil_name
,
target
,
stencil_restricted
=
True
)
self
.
_sync_tmp
=
data_handling
.
synchronization_function
([
self
.
_tmp_arr_name
],
stencil_name
,
target
,
stencil_restricted
=
True
)
self
.
_boundary_handling
=
LatticeBoltzmannBoundaryHandling
(
self
.
method
,
self
.
_data_handling
,
self
.
_pdf_arr_name
,
name
=
name
+
"
_boundary_handling
"
,
...
...
This diff is collapsed.
Click to expand it.
moments.py
+
15
−
11
View file @
5040799c
...
...
@@ -464,13 +464,16 @@ def moment_equality_table(stencil, discrete_equilibrium=None, continuous_equilib
Creates a table showing which moments of a discrete stencil/equilibrium coincide with the
corresponding continuous moments
:param stencil: list of stencil velocities
:param discrete_equilibrium: list of sympy expr to compute discrete equilibrium for each direction, if left
to default the standard discrete Maxwellian equilibrium is used
:param continuous_equilibrium: continuous equilibrium, if left to default, the continuous Maxwellian is used
:param max_order: compare moments up to this order (number of rows in table)
:param truncate_order: moments are considered equal if they match up to this order
:return: Object to display in an Jupyter notebook
Args:
stencil: list of stencil velocities
discrete_equilibrium: list of sympy expr to compute discrete equilibrium for each direction, if left
to default the standard discrete Maxwellian equilibrium is used
continuous_equilibrium: continuous equilibrium, if left to default, the continuous Maxwellian is used
max_order: compare moments up to this order (number of rows in table)
truncate_order: moments are considered equal if they match up to this order
Returns:
Object to display in an Jupyter notebook
"""
import
ipy_table
from
lbmpy.continuous_distribution_measures
import
continuous_moment
...
...
@@ -535,10 +538,11 @@ def moment_equality_table_by_stencil(name_to_stencil_dict, moments, truncate_ord
Creates a table for display in IPython notebooks that shows which moments agree between continuous and
discrete equilibrium, group by stencils
:param name_to_stencil_dict: dict from stencil name to stencil
:param moments: sequence of moments to compare - assumes that permutations have similar properties
so just one representative is shown labeled with its multiplicity
:param truncate_order: compare up to this order
Args:
name_to_stencil_dict: dict from stencil name to stencil
moments: sequence of moments to compare - assumes that permutations have similar properties
so just one representative is shown labeled with its multiplicity
truncate_order: compare up to this order
"""
import
ipy_table
from
lbmpy.maxwellian_equilibrium
import
discrete_maxwellian_equilibrium
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment