Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Troubled Cell Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
77309782
Commit
77309782
authored
Sep 23, 2020
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Replaced symbol 'x' with 'z' for Alpert's wavelet.
parent
020dfa8f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
DG_Approximation.py
+9
-5
9 additions, 5 deletions
DG_Approximation.py
with
9 additions
and
5 deletions
DG_Approximation.py
+
9
−
5
View file @
77309782
...
@@ -8,7 +8,8 @@ TODO: Contemplate using Seaborn instead of matplotlib
...
@@ -8,7 +8,8 @@ TODO: Contemplate using Seaborn instead of matplotlib
TODO: Double-check everything!
TODO: Double-check everything!
TODO: Replace loops with list comprehension if feasible
TODO: Replace loops with list comprehension if feasible
TODO: Combine initial projection and approx solution somehow
TODO: Combine initial projection and approx solution somehow
TODO: Contemplate erasing inv_mass-matrix as it is identity -> Discuss
TODO: Contemplate erasing inv_mass-matrix as it is identity
-> Done (No, because could be problematic for other functions)
TODO: Investigate why we need inverse mass matrix for initial projection,
\
TODO: Investigate why we need inverse mass matrix for initial projection,
\
but not A and B
but not A and B
TODO: Investigate why there are no weights in approx calc
TODO: Investigate why there are no weights in approx calc
...
@@ -28,6 +29,8 @@ TODO: Make sure instance variables are only set in __init__()
...
@@ -28,6 +29,8 @@ TODO: Make sure instance variables are only set in __init__()
TODO: Contemplate moving plots to pertaining files
TODO: Contemplate moving plots to pertaining files
TODO: Discuss details plot!
TODO: Discuss details plot!
TODO: Fix typo in Vectors_of_Polynomials -> Done
TODO: Fix typo in Vectors_of_Polynomials -> Done
TODO: Replace symbol
'
x
'
with
'
z
'
for Alpert
'
s wavelet -> Done
TODO: Check time efficiency of details plot
"""
"""
import
numpy
as
np
import
numpy
as
np
...
@@ -379,9 +382,9 @@ class DGScheme(object):
...
@@ -379,9 +382,9 @@ class DGScheme(object):
for
degree
in
range
(
self
.
polynom_degree
+
1
)]
for
degree
in
range
(
self
.
polynom_degree
+
1
)]
multiwavelet_coeffs
=
self
.
detector
.
_calculate_wavelet_coeffs
(
projection
)
multiwavelet_coeffs
=
self
.
detector
.
_calculate_wavelet_coeffs
(
projection
)
wavelet
=
AlpertsWavelet
(
self
.
polynom_degree
).
get_vector
(
x
)
wavelet
=
AlpertsWavelet
(
self
.
polynom_degree
).
get_vector
(
x
i
)
wavelet_projection
=
[[
multiwavelet_coeffs
[
degree
][
cell
]
*
wavelet
[
degree
].
subs
(
x
,
0.5
)
*
value
wavelet_projection
=
[[
multiwavelet_coeffs
[
degree
][
cell
]
*
wavelet
[
degree
].
subs
(
x
i
,
0.5
)
*
value
for
cell
in
range
(
len
(
coarse_projection
[
0
]))
for
cell
in
range
(
len
(
coarse_projection
[
0
]))
for
value
in
[(
-
1
)
**
(
self
.
polynom_degree
+
degree
+
1
),
1
]]
for
value
in
[(
-
1
)
**
(
self
.
polynom_degree
+
degree
+
1
),
1
]]
for
degree
in
range
(
self
.
polynom_degree
+
1
)]
for
degree
in
range
(
self
.
polynom_degree
+
1
)]
...
@@ -391,8 +394,8 @@ class DGScheme(object):
...
@@ -391,8 +394,8 @@ class DGScheme(object):
for
degree
in
range
(
self
.
polynom_degree
+
1
):
for
degree
in
range
(
self
.
polynom_degree
+
1
):
leftMesh
=
coarse_projection
[
degree
]
*
self
.
basis
[
degree
].
subs
(
x
,
-
1
/
2
)
leftMesh
=
coarse_projection
[
degree
]
*
self
.
basis
[
degree
].
subs
(
x
,
-
1
/
2
)
rightMesh
=
coarse_projection
[
degree
]
*
self
.
basis
[
degree
].
subs
(
x
,
1
/
2
)
rightMesh
=
coarse_projection
[
degree
]
*
self
.
basis
[
degree
].
subs
(
x
,
1
/
2
)
leftTest
=
multiwavelet_coeffs
[
degree
]
*
wavelet
[
degree
].
subs
(
x
,
1
/
2
)
*
(
-
1
)
**
(
self
.
polynom_degree
+
1
+
degree
)
leftTest
=
multiwavelet_coeffs
[
degree
]
*
wavelet
[
degree
].
subs
(
x
i
,
1
/
2
)
*
(
-
1
)
**
(
self
.
polynom_degree
+
1
+
degree
)
rightTest
=
multiwavelet_coeffs
[
degree
]
*
wavelet
[
degree
].
subs
(
x
,
1
/
2
)
rightTest
=
multiwavelet_coeffs
[
degree
]
*
wavelet
[
degree
].
subs
(
x
i
,
1
/
2
)
newRowMesh
=
[]
newRowMesh
=
[]
newRowTest
=
[]
newRowTest
=
[]
for
i
in
range
(
len
(
coarse_projection
[
0
])):
for
i
in
range
(
len
(
coarse_projection
[
0
])):
...
@@ -431,6 +434,7 @@ class DGScheme(object):
...
@@ -431,6 +434,7 @@ class DGScheme(object):
plt
.
xlabel
(
'
X
'
)
plt
.
xlabel
(
'
X
'
)
plt
.
ylabel
(
'
Detail Coefficients
'
)
plt
.
ylabel
(
'
Detail Coefficients
'
)
plt
.
title
(
'
Wavelet Coefficients
'
)
plt
.
title
(
'
Wavelet Coefficients
'
)
plt
.
show
()
def
_plot_shock_tube
(
self
):
def
_plot_shock_tube
(
self
):
time_history
=
self
.
update_scheme
.
get_time_history
()
time_history
=
self
.
update_scheme
.
get_time_history
()
...
...
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