Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fluidsim
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
Container Registry
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
fluiddyn
fluidsim
Commits
8e3d68a5
Commit
8e3d68a5
authored
4 years ago
by
Pierre Augier
Browse files
Options
Downloads
Patches
Plain Diff
Fix transonic block in _get_phase_shift_random for 1d
parent
446db5ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!156
Topic/default/phaseshift3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fluidsim/base/time_stepping/pseudo_spect.py
+7
-7
7 additions, 7 deletions
fluidsim/base/time_stepping/pseudo_spect.py
fluidsim/solvers/nl1d/test_solver.py
+3
-1
3 additions, 1 deletion
fluidsim/solvers/nl1d/test_solver.py
with
10 additions
and
8 deletions
fluidsim/base/time_stepping/pseudo_spect.py
+
7
−
7
View file @
8e3d68a5
...
...
@@ -32,6 +32,5 @@
N
=
NDim
(
2
,
3
,
4
)
A
=
Array
[
np
.
complex128
,
N
,
"
C
"
]
Af
=
Array
[
np
.
float64
,
N
,
"
C
"
]
Am1
=
Array
[
np
.
complex128
,
N
-
1
,
"
C
"
]
...
...
@@ -36,5 +35,9 @@
Am1
=
Array
[
np
.
complex128
,
N
-
1
,
"
C
"
]
N123
=
NDim
(
1
,
2
,
3
)
A123c
=
Array
[
np
.
complex128
,
N123
,
"
C
"
]
A123f
=
Array
[
np
.
float64
,
N123
,
"
C
"
]
T
=
Type
(
np
.
float64
,
np
.
complex128
)
A1
=
Array
[
T
,
N
,
"
C
"
]
A2
=
Array
[
T
,
N
-
1
,
"
C
"
]
...
...
@@ -277,8 +280,8 @@
ts
.
use_block
(
"
phase_shift_random
"
)
else
:
# transonic block (
# A phase_shift_alpha, phase_shift_beta;
# Af phase_alpha, phase_beta;
# A
123c
phase_shift_alpha, phase_shift_beta;
# A
123
f phase_alpha, phase_beta;
# )
phase_shift_alpha
[:]
=
np
.
exp
(
1j
*
phase_alpha
)
phase_shift_beta
[:]
=
np
.
exp
(
1j
*
phase_beta
)
...
...
@@ -609,10 +612,7 @@
state_spect_1
=
self
.
_state_spect_tmp
step_Euler
(
state_spect
,
dt
,
tendencies_0
,
diss
,
output
=
state_spect_1
)
tendencies_1_shift
=
(
compute_tendencies
(
phase_shift_beta
*
state_spect_1
)
/
phase_shift_beta
)
tendencies_1_shift
=
compute_tendencies
(
phase_shift_beta
*
state_spect_1
)
tendencies_d
=
self
.
_state_spect_tmp
if
ts
.
is_transpiled
:
...
...
This diff is collapsed.
Click to expand it.
fluidsim/solvers/nl1d/test_solver.py
+
3
−
1
View file @
8e3d68a5
...
...
@@ -111,7 +111,9 @@
sim
.
time_stepping
.
main_loop
()
s_fft
=
sim
.
state
.
get_var
(
"
s_fft
"
)
assert
np
.
allclose
(
s_fft
,
self
.
s_exact2_fft
)
assert
np
.
allclose
(
s_fft
,
self
.
s_exact2_fft
),
abs
(
s_fft
-
self
.
s_exact2_fft
).
max
()
def
test_Euler
(
self
):
self
.
_test_type_time_scheme
(
"
Euler
"
)
...
...
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