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
b0e2d724
Commit
b0e2d724
authored
2 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Vectorized '_update_right_hand_side()' for SSPRK3.
parent
d8a414fc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Snakefile
+17
-4
17 additions, 4 deletions
Snakefile
scripts/tcd/Update_Scheme.py
+12
-17
12 additions, 17 deletions
scripts/tcd/Update_Scheme.py
with
29 additions
and
21 deletions
Snakefile
+
17
−
4
View file @
b0e2d724
...
@@ -21,13 +21,24 @@ TODO: Discuss descriptions (matrices, cfl number, right-hand side,
...
@@ -21,13 +21,24 @@ TODO: Discuss descriptions (matrices, cfl number, right-hand side,
TODO: Discuss referencing info on SSPRK3
TODO: Discuss referencing info on SSPRK3
TODO: Discuss name for quadrature mesh (now: grid)
TODO: Discuss name for quadrature mesh (now: grid)
TODO: Contemplate using lambdify for basis
TODO: Contemplate using lambdify for basis
TODO: Ask why MinMod slope is only calculated from degree 1, not 0
TODO: Ask why MinMod slope is only calculated from degree 1, not 0
-> Done (degree 0 is avg, not included in slope)
TODO: Ask whether cell indexing for limiter is correct as was or is now
-> Done (old was wrong)
Urgent:
Urgent:
TODO: Vectorize '_determine_modification()' in ModifiedMinMod
TODO: Rework ModifiedMinMod limiter for efficiency -> Done
TODO: Vectorize '_set_cell_slope()' in MinMod
TODO: Vectorize '_set_cell_slope()' in MinMod -> Done
TODO: Vectorize '_determine_modification()' in MinMod
TODO: Vectorize '_determine_modification()' in MinMod -> Done
TODO: Vectorize 'apply()' in MinMod
TODO: Rework limit masking to apply over array instead of cell -> Done
TODO: Vectorize 'apply()' in MinMod -> Done
TODO: Vectorize 'get_cells()' in ANN detector -> Done
TODO: Vectorize '_calculate_wavelet_coeffs()' for wavelet detectors -> Done
TODO: Vectorize '_calculate_coarse_projection()' for wavelet detectors -> Done
TODO: Vectorize '_update_right_hand_side()' for SSPRK3 -> Done
TODO: Vectorize '_reset()' for update scheme
TODO: Vectorize 'plot_details()'
TODO: Replace loops/list comprehension with vectorization if feasible
TODO: Replace loops/list comprehension with vectorization if feasible
TODO: Replace loops with list comprehension if feasible
TODO: Replace loops with list comprehension if feasible
TODO: Rework ICs to allow vector input
TODO: Rework ICs to allow vector input
...
@@ -39,6 +50,8 @@ TODO: Investigate g-mesh(?)
...
@@ -39,6 +50,8 @@ TODO: Investigate g-mesh(?)
TODO: Create g-mesh with Mesh class
TODO: Create g-mesh with Mesh class
TODO: Combine ANN workflows if feasible
TODO: Combine ANN workflows if feasible
TODO: Investigate profiling for speed up
TODO: Investigate profiling for speed up
TODO: Make sure that the cell indices are the same over all TCDs
TODO: Make sure TCs are reported as ndarray
Critical, but not urgent:
Critical, but not urgent:
TODO: Check whether all ValueError are set (correctly)
TODO: Check whether all ValueError are set (correctly)
...
...
This diff is collapsed.
Click to expand it.
scripts/tcd/Update_Scheme.py
+
12
−
17
View file @
b0e2d724
...
@@ -318,23 +318,18 @@ class SSPRK3(UpdateScheme):
...
@@ -318,23 +318,18 @@ class SSPRK3(UpdateScheme):
Matrix of right-hand side.
Matrix of right-hand side.
"""
"""
# Initialize vector and set first entry to accommodate for ghost cell
right_hand_side
=
np
.
zeros_like
(
current_projection
)
right_hand_side
=
[
0
]
for
j
in
range
(
self
.
_num_cells
):
if
self
.
_wave_speed
>
0
:
if
self
.
_wave_speed
>
0
:
right_hand_side
.
append
(
2
*
(
self
.
_stiffness_matrix
right_hand_side
[:,
1
:
-
1
]
=
2
*
(
@
current_projection
[:,
j
+
1
]
self
.
_boundary_matrix
@
current_projection
[:,
:
-
2
]
+
+
self
.
_boundary_matrix
self
.
_stiffness_matrix
@
current_projection
[:,
1
:
-
1
])
@
current_projection
[:,
j
]))
else
:
else
:
right_hand_side
.
append
(
2
*
(
self
.
_stiffness_matrix
right_hand_side
[:,
1
:
-
1
]
=
2
*
(
@
current_projection
[:,
j
+
1
]
self
.
_boundary_matrix
@
current_projection
[:,
2
:]
+
+
self
.
_boundary_matrix
self
.
_stiffness_matrix
@
current_projection
[:,
1
:
-
1
])
@
current_projection
[:,
j
+
2
]))
# Set ghost cells to respective value
# Set ghost cells to respective value
right_hand_side
[
0
]
=
right_hand_side
[
self
.
_num_cells
]
right_hand_side
[
:,
0
]
=
right_hand_side
[
:,
-
2
]
right_hand_side
.
append
(
right_hand_side
[
1
]
)
right_hand_side
[:,
-
1
]
=
right_hand_side
[
:,
1
]
return
np
.
transpose
(
right_hand_side
)
return
right_hand_side
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