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
cc781fa9
Commit
cc781fa9
authored
4 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Renamed all initial conditions.
parent
2313d35d
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
Initial_Condition.py
+9
-9
9 additions, 9 deletions
Initial_Condition.py
with
9 additions
and
9 deletions
Initial_Condition.py
+
9
−
9
View file @
cc781fa9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"""
"""
@author: Laura C. Kühle
@author: Laura C. Kühle
TODO: Rename initial conditions ->
Renamed returned names
TODO: Rename initial conditions ->
Done
"""
"""
import
numpy
as
np
import
numpy
as
np
...
@@ -31,7 +31,7 @@ class InitialCondition(object):
...
@@ -31,7 +31,7 @@ class InitialCondition(object):
pass
pass
class
InitialCondition1
(
InitialCondition
):
class
Sine
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
# Set name of function
# Set name of function
...
@@ -44,7 +44,7 @@ class InitialCondition1(InitialCondition):
...
@@ -44,7 +44,7 @@ class InitialCondition1(InitialCondition):
return
np
.
sin
(
self
.
factor
*
np
.
pi
*
x
)
return
np
.
sin
(
self
.
factor
*
np
.
pi
*
x
)
class
InitialCondition2
(
InitialCondition
):
class
Box
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
# Set name of function
# Set name of function
...
@@ -62,12 +62,12 @@ class InitialCondition2(InitialCondition):
...
@@ -62,12 +62,12 @@ class InitialCondition2(InitialCondition):
return
0
return
0
class
InitialCondition3
(
InitialCondition
):
class
FourPeakWave
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
# Set name of function
# Set name of function
self
.
function_name
=
'
Four
MixedTypes
'
self
.
function_name
=
'
Four
PeakWave
'
self
.
alpha
=
10
self
.
alpha
=
10
self
.
delta
=
0.005
self
.
delta
=
0.005
...
@@ -98,7 +98,7 @@ class InitialCondition3(InitialCondition):
...
@@ -98,7 +98,7 @@ class InitialCondition3(InitialCondition):
return
np
.
sqrt
(
max
(
1
-
self
.
alpha
**
2
*
(
x
-
a
)
**
2
,
0
))
return
np
.
sqrt
(
max
(
1
-
self
.
alpha
**
2
*
(
x
-
a
)
**
2
,
0
))
class
InitialCondition4
(
InitialCondition
):
class
Linear
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
...
@@ -112,7 +112,7 @@ class InitialCondition4(InitialCondition):
...
@@ -112,7 +112,7 @@ class InitialCondition4(InitialCondition):
return
self
.
factor
*
x
return
self
.
factor
*
x
class
InitialCondition5
(
InitialCondition
):
class
LinearAbsolut
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
...
@@ -126,12 +126,12 @@ class InitialCondition5(InitialCondition):
...
@@ -126,12 +126,12 @@ class InitialCondition5(InitialCondition):
return
self
.
factor
*
abs
(
x
)
return
self
.
factor
*
abs
(
x
)
class
InitialCondition6
(
InitialCondition
):
class
DiscontinuousConstant
(
InitialCondition
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
def
__init__
(
self
,
left_bound
,
right_bound
,
config
):
super
().
__init__
(
left_bound
,
right_bound
,
config
)
super
().
__init__
(
left_bound
,
right_bound
,
config
)
# Set name of function
# Set name of function
self
.
function_name
=
'
ConstantWithDiscontinuity
'
self
.
function_name
=
'
DiscontinuousConstant
'
self
.
x0
=
config
.
pop
(
'
x0
'
,
0
)
self
.
x0
=
config
.
pop
(
'
x0
'
,
0
)
self
.
left_factor
=
config
.
pop
(
'
left_factor
'
,
1
)
self
.
left_factor
=
config
.
pop
(
'
left_factor
'
,
1
)
...
...
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