Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pycodegen
lbmpy
Commits
8e777304
Commit
8e777304
authored
Aug 14, 2019
by
Michael Kuron
Browse files
remove obsolete fluctuatinglb.method_with_rescaled_equilibrium_values
parent
4cd1c355
Pipeline
#17219
passed with stage
in 5 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lbmpy/creationfunctions.py
View file @
8e777304
...
...
@@ -177,7 +177,7 @@ from lbmpy.fieldaccess import (
AAEvenTimeStepAccessor
,
AAOddTimeStepAccessor
,
CollideOnlyInplaceAccessor
,
EsoTwistEvenTimeStepAccessor
,
EsoTwistOddTimeStepAccessor
,
PdfFieldAccessor
,
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
(
create_mrt3
,
create_mrt_orthogonal
,
create_mrt_raw
,
create_srt
,
create_trt
,
create_trt_kbc
)
from
lbmpy.methods.creationfunctions
import
create_generic_mrt
...
...
@@ -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
):
rho_in
=
rho_in
.
center
if
params
[
'fluctuating'
]:
lb_method
=
method_with_rescaled_equilibrium_values
(
lb_method
)
if
u_in
is
not
None
:
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
)]
...
...
lbmpy/fluctuatinglb.py
View file @
8e777304
...
...
@@ -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
)]
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"
)):
"""Returns additive correction terms to be added to the the collided pdfs"""
conserved_moments
=
{
sp
.
sympify
(
1
),
*
MOMENT_SYMBOLS
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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