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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
4e671346
Commit
4e671346
authored
2 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Renamed stiffness matrix to volume integral matrix.
parent
856b70fa
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Snakefile
+1
-1
1 addition, 1 deletion
Snakefile
scripts/tcd/Equation.py
+6
-6
6 additions, 6 deletions
scripts/tcd/Equation.py
with
7 additions
and
7 deletions
Snakefile
+
1
−
1
View file @
4e671346
...
@@ -23,7 +23,7 @@ TODO: Contemplate allowing vector input for ICs
...
@@ -23,7 +23,7 @@ TODO: Contemplate allowing vector input for ICs
TODO: Discuss how wavelet details should be plotted
TODO: Discuss how wavelet details should be plotted
Urgent:
Urgent:
TODO: Rename stiffness matrix to volume integral matrix
TODO: Rename stiffness matrix to volume integral matrix
-> Done
TODO: Rename boundary matrix to flux matrix
TODO: Rename boundary matrix to flux matrix
TODO: Change num_ghost_cells to be 1 for calc and 0 for other
TODO: Change num_ghost_cells to be 1 for calc and 0 for other
TODO: Move boundary condition to Mesh class
TODO: Move boundary condition to Mesh class
...
...
This diff is collapsed.
Click to expand it.
scripts/tcd/Equation.py
+
6
−
6
View file @
4e671346
...
@@ -179,8 +179,8 @@ class LinearAdvection(Equation):
...
@@ -179,8 +179,8 @@ class LinearAdvection(Equation):
Attributes
Attributes
----------
----------
stiffness
_matrix : ndarray
volume_integral
_matrix : ndarray
Stiffness
matrix.
Volume integral
matrix.
boundary_matrix : ndarray
boundary_matrix : ndarray
Boundary matrix.
Boundary matrix.
...
@@ -206,7 +206,7 @@ class LinearAdvection(Equation):
...
@@ -206,7 +206,7 @@ class LinearAdvection(Equation):
degree_matrix
=
np
.
matmul
(
root_vector
[:,
np
.
newaxis
],
degree_matrix
=
np
.
matmul
(
root_vector
[:,
np
.
newaxis
],
root_vector
[:,
np
.
newaxis
].
T
)
root_vector
[:,
np
.
newaxis
].
T
)
# Set
stiffness
matrix
# Set
volume integral
matrix
matrix
=
np
.
ones
(
matrix_shape
)
matrix
=
np
.
ones
(
matrix_shape
)
if
self
.
_wave_speed
>
0
:
if
self
.
_wave_speed
>
0
:
matrix
[
np
.
fromfunction
(
matrix
[
np
.
fromfunction
(
...
@@ -214,7 +214,7 @@ class LinearAdvection(Equation):
...
@@ -214,7 +214,7 @@ class LinearAdvection(Equation):
else
:
else
:
matrix
[
np
.
fromfunction
(
matrix
[
np
.
fromfunction
(
lambda
i
,
j
:
(
j
>
i
)
&
((
i
+
j
)
%
2
==
1
),
matrix_shape
)]
=
-
1.0
lambda
i
,
j
:
(
j
>
i
)
&
((
i
+
j
)
%
2
==
1
),
matrix_shape
)]
=
-
1.0
self
.
_
stiffness
_matrix
=
matrix
*
degree_matrix
self
.
_
volume_integral
_matrix
=
matrix
*
degree_matrix
# Set boundary matrix
# Set boundary matrix
matrix
=
np
.
fromfunction
(
lambda
i
,
j
:
(
-
1.0
)
**
i
,
matrix_shape
)
\
matrix
=
np
.
fromfunction
(
lambda
i
,
j
:
(
-
1.0
)
**
i
,
matrix_shape
)
\
...
@@ -326,7 +326,7 @@ class LinearAdvection(Equation):
...
@@ -326,7 +326,7 @@ class LinearAdvection(Equation):
2
*
(
self
.
_boundary_matrix
@
2
*
(
self
.
_boundary_matrix
@
projection
[:,
self
.
_mesh
.
num_ghost_cells
-
1
:
projection
[:,
self
.
_mesh
.
num_ghost_cells
-
1
:
-
self
.
_mesh
.
num_ghost_cells
-
1
]
+
-
self
.
_mesh
.
num_ghost_cells
-
1
]
+
self
.
_
stiffness
_matrix
@
self
.
_
volume_integral
_matrix
@
projection
[:,
self
.
_mesh
.
num_ghost_cells
:
projection
[:,
self
.
_mesh
.
num_ghost_cells
:
-
self
.
_mesh
.
num_ghost_cells
])
-
self
.
_mesh
.
num_ghost_cells
])
else
:
else
:
...
@@ -334,7 +334,7 @@ class LinearAdvection(Equation):
...
@@ -334,7 +334,7 @@ class LinearAdvection(Equation):
-
self
.
_mesh
.
num_ghost_cells
]
=
\
-
self
.
_mesh
.
num_ghost_cells
]
=
\
2
*
(
self
.
_boundary_matrix
@
2
*
(
self
.
_boundary_matrix
@
projection
[:,
self
.
_mesh
.
num_ghost_cells
+
1
:]
+
projection
[:,
self
.
_mesh
.
num_ghost_cells
+
1
:]
+
self
.
_
stiffness
_matrix
@
self
.
_
volume_integral
_matrix
@
projection
[:,
self
.
_mesh
.
num_ghost_cells
:
projection
[:,
self
.
_mesh
.
num_ghost_cells
:
-
self
.
_mesh
.
num_ghost_cells
])
-
self
.
_mesh
.
num_ghost_cells
])
...
...
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