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
a5ac986b
Commit
a5ac986b
authored
Jun 2, 2022
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Replaced 'eval_point' with mesh cells in 'do_initial_projection()'.
parent
8065c5c7
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
+6
-7
6 additions, 7 deletions
DG_Approximation.py
with
6 additions
and
7 deletions
DG_Approximation.py
+
6
−
7
View file @
a5ac986b
...
...
@@ -21,10 +21,8 @@ TODO: Contain number of grid cells in mesh -> Done
TODO: Create data dict for mesh separately -> Done
TODO: Create data dict for basis separately -> Done
TODO: Remove unnecessary instance variables from TCD -> Done
TODO: Re
factor
eval_points in do_initial_projection()
TODO: Re
place
eval_points
with mesh
in do_initial_projection()
-> Done
TODO: Replace getter with property attributes for quadrature
TODO: Check whether ghost cells are handled/set correctly
TODO: Ensure uniform use of mesh and grid
TODO: Remove use of DGScheme from ANN_Data_Generator
TODO: Find error in centering for ANN training
TODO: Adapt TCD from Soraya
...
...
@@ -34,6 +32,8 @@ TODO: Add TC condition to only flag cell if left-adjacent one is flagged as
TODO: Move plot_approximation_results() into plotting script
TODO: Add verbose output
TODO: Improve file naming (e.g. use
'
.
'
instead of
'
__
'
)
TODO: Check whether ghost cells are handled/set correctly
TODO: Ensure uniform use of mesh and grid
Critical, but not urgent:
TODO: Combine ANN workflows
...
...
@@ -51,6 +51,7 @@ TODO: Use cfl_number for updating, not just time
Currently not critical:
TODO: Unify use of
'
length
'
and
'
len
'
in naming
TODO: Replace loops with list comprehension if feasible
TODO: Replace loops/list comprehension with vectorization if feasible
TODO: Check whether
'
projection
'
is always a ndarray
TODO: Check whether all instance variables are sensible
TODO: Rename files according to standard
...
...
@@ -357,17 +358,15 @@ def do_initial_projection(initial_condition, mesh, basis, quadrature,
"""
# Initialize matrix and set first entry to accommodate for ghost cell
output_matrix
=
[
0
]
basis_vector
=
basis
.
basis
for
cell
in
range
(
mesh
.
num_grid
_cells
)
:
for
eval_point
in
mesh
.
non_ghost
_cells
:
new_row
=
[]
eval_point
=
mesh
.
bounds
[
0
]
+
(
cell
+
0.5
)
*
mesh
.
cell_len
for
degree
in
range
(
basis
.
polynomial_degree
+
1
):
new_row
.
append
(
np
.
float64
(
sum
(
initial_condition
.
calculate
(
mesh
,
eval_point
+
mesh
.
cell_len
/
2
*
quadrature
.
get_eval_points
()[
point
]
-
adjustment
)
*
basis
_vector
[
degree
].
subs
(
*
basis
.
basis
[
degree
].
subs
(
x
,
quadrature
.
get_eval_points
()[
point
])
*
quadrature
.
get_weights
()[
point
]
for
point
in
range
(
quadrature
.
get_num_points
()))))
...
...
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