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
d1a477c5
Commit
d1a477c5
authored
3 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Changed code to create data dict for basis separately.
parent
73abd042
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
Basis_Function.py
+6
-0
6 additions, 0 deletions
Basis_Function.py
Troubled_Cell_Detector.py
+3
-1
3 additions, 1 deletion
Troubled_Cell_Detector.py
with
9 additions
and
1 deletion
Basis_Function.py
+
6
−
0
View file @
d1a477c5
...
@@ -44,6 +44,8 @@ class Basis(ABC):
...
@@ -44,6 +44,8 @@ class Basis(ABC):
-------
-------
calculate_cell_average(projection, stencil_length, add_reconstructions)
calculate_cell_average(projection, stencil_length, add_reconstructions)
Calculate cell averages for a given projection.
Calculate cell averages for a given projection.
create_data_dict()
Return dictionary with data necessary to construct basis.
"""
"""
...
@@ -207,6 +209,10 @@ class Basis(ABC):
...
@@ -207,6 +209,10 @@ class Basis(ABC):
self
.
basis
)
self
.
basis
)
return
left_reconstructions
,
right_reconstructions
return
left_reconstructions
,
right_reconstructions
def
create_data_dict
(
self
):
"""
Return dictionary with data necessary to construct basis.
"""
return
{
'
polynomial_degree
'
:
self
.
polynomial_degree
}
class
Legendre
(
Basis
):
class
Legendre
(
Basis
):
"""
Class for Legendre basis.
"""
"""
Class for Legendre basis.
"""
...
...
This diff is collapsed.
Click to expand it.
Troubled_Cell_Detector.py
+
3
−
1
View file @
d1a477c5
...
@@ -27,6 +27,8 @@ class TroubledCellDetector(ABC):
...
@@ -27,6 +27,8 @@ class TroubledCellDetector(ABC):
Returns string of class name.
Returns string of class name.
get_cells(projection)
get_cells(projection)
Calculates troubled cells in a given projection.
Calculates troubled cells in a given projection.
create_data_dict(projection)
Return dictionary with data necessary to plot troubled cells.
"""
"""
def
__init__
(
self
,
config
,
init_cond
,
quadrature
,
basis
,
mesh
,
def
__init__
(
self
,
config
,
init_cond
,
quadrature
,
basis
,
mesh
,
...
@@ -91,7 +93,7 @@ class TroubledCellDetector(ABC):
...
@@ -91,7 +93,7 @@ class TroubledCellDetector(ABC):
"""
Return dictionary with data necessary to plot troubled cells.
"""
"""
Return dictionary with data necessary to plot troubled cells.
"""
return
{
'
projection
'
:
projection
,
'
wave_speed
'
:
self
.
_wave_speed
,
return
{
'
projection
'
:
projection
,
'
wave_speed
'
:
self
.
_wave_speed
,
'
final_time
'
:
self
.
_final_time
,
'
final_time
'
:
self
.
_final_time
,
'
basis
'
:
{
'
polynomial_degree
'
:
self
.
_basis
.
polynomial_degree
}
,
'
basis
'
:
self
.
_basis
.
create_data_dict
()
,
'
mesh
'
:
self
.
_mesh
.
create_data_dict
()
'
mesh
'
:
self
.
_mesh
.
create_data_dict
()
}
}
...
...
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