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
8e777304
Commit
8e777304
authored
5 years ago
by
Michael Kuron
Browse files
Options
Downloads
Patches
Plain Diff
remove obsolete fluctuatinglb.method_with_rescaled_equilibrium_values
parent
4cd1c355
No related branches found
No related tags found
1 merge request
!5
Remove obsolete fluctuatinglb.method_with_rescaled_equilibrium_values
Pipeline
#17219
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lbmpy/creationfunctions.py
+1
-4
1 addition, 4 deletions
lbmpy/creationfunctions.py
lbmpy/fluctuatinglb.py
+0
-13
0 additions, 13 deletions
lbmpy/fluctuatinglb.py
with
1 addition
and
17 deletions
lbmpy/creationfunctions.py
+
1
−
4
View file @
8e777304
...
@@ -177,7 +177,7 @@ from lbmpy.fieldaccess import (
...
@@ -177,7 +177,7 @@ from lbmpy.fieldaccess import (
AAEvenTimeStepAccessor
,
AAOddTimeStepAccessor
,
CollideOnlyInplaceAccessor
,
AAEvenTimeStepAccessor
,
AAOddTimeStepAccessor
,
CollideOnlyInplaceAccessor
,
EsoTwistEvenTimeStepAccessor
,
EsoTwistOddTimeStepAccessor
,
PdfFieldAccessor
,
EsoTwistEvenTimeStepAccessor
,
EsoTwistOddTimeStepAccessor
,
PdfFieldAccessor
,
PeriodicTwoFieldsAccessor
,
StreamPullTwoFieldsAccessor
,
StreamPushTwoFieldsAccessor
)
PeriodicTwoFieldsAccessor
,
StreamPullTwoFieldsAccessor
,
StreamPushTwoFieldsAccessor
)
from
lbmpy.fluctuatinglb
import
add_fluctuations_to_collision_rule
,
method_with_rescaled_equilibrium_values
from
lbmpy.fluctuatinglb
import
add_fluctuations_to_collision_rule
from
lbmpy.methods
import
(
from
lbmpy.methods
import
(
create_mrt3
,
create_mrt_orthogonal
,
create_mrt_raw
,
create_srt
,
create_trt
,
create_trt_kbc
)
create_mrt3
,
create_mrt_orthogonal
,
create_mrt_raw
,
create_srt
,
create_trt
,
create_trt_kbc
)
from
lbmpy.methods.creationfunctions
import
create_generic_mrt
from
lbmpy.methods.creationfunctions
import
create_generic_mrt
...
@@ -307,9 +307,6 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
...
@@ -307,9 +307,6 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
if
rho_in
is
not
None
and
isinstance
(
rho_in
,
Field
):
if
rho_in
is
not
None
and
isinstance
(
rho_in
,
Field
):
rho_in
=
rho_in
.
center
rho_in
=
rho_in
.
center
if
params
[
'
fluctuating
'
]:
lb_method
=
method_with_rescaled_equilibrium_values
(
lb_method
)
if
u_in
is
not
None
:
if
u_in
is
not
None
:
density_rhs
=
sum
(
lb_method
.
pre_collision_pdf_symbols
)
if
rho_in
is
None
else
rho_in
density_rhs
=
sum
(
lb_method
.
pre_collision_pdf_symbols
)
if
rho_in
is
None
else
rho_in
eqs
=
[
Assignment
(
cqc
.
zeroth_order_moment_symbol
,
density_rhs
)]
eqs
=
[
Assignment
(
cqc
.
zeroth_order_moment_symbol
,
density_rhs
)]
...
...
This diff is collapsed.
Click to expand it.
lbmpy/fluctuatinglb.py
+
0
−
13
View file @
8e777304
...
@@ -45,19 +45,6 @@ def fluctuating_variance_from_temperature(method, temperature, c_s_sq=sp.Symbol(
...
@@ -45,19 +45,6 @@ def fluctuating_variance_from_temperature(method, temperature, c_s_sq=sp.Symbol(
for
norm
,
rr
in
zip
(
normalization_factors
,
method
.
relaxation_rates
)]
for
norm
,
rr
in
zip
(
normalization_factors
,
method
.
relaxation_rates
)]
def
method_with_rescaled_equilibrium_values
(
base_method
):
"""
Re-scales the equilibrium moments by 1 / sqrt(M*w) with moment matrix M and weights w
"""
from
lbmpy.creationfunctions
import
create_lb_method_from_existing
sig_k
=
abs
(
base_method
.
moment_matrix
)
*
sp
.
Matrix
(
base_method
.
weights
)
def
modification_rule
(
moment
,
eq
,
rr
):
i
=
base_method
.
moments
.
index
(
moment
)
return
moment
,
eq
/
sp
.
sqrt
(
sig_k
[
i
]),
rr
return
create_lb_method_from_existing
(
base_method
,
modification_rule
)
def
fluctuation_correction
(
method
,
rng_generator
,
variances
=
SymbolGen
(
"
variance
"
)):
def
fluctuation_correction
(
method
,
rng_generator
,
variances
=
SymbolGen
(
"
variance
"
)):
"""
Returns additive correction terms to be added to the the collided pdfs
"""
"""
Returns additive correction terms to be added to the the collided pdfs
"""
conserved_moments
=
{
sp
.
sympify
(
1
),
*
MOMENT_SYMBOLS
}
conserved_moments
=
{
sp
.
sympify
(
1
),
*
MOMENT_SYMBOLS
}
...
...
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