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
b5eb2134
Commit
b5eb2134
authored
Sep 21, 2021
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Added 'is_smooth()' to 'DiscontiuousConstant' class.
parent
0ecbed3b
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
-14
9 additions, 14 deletions
Initial_Condition.py
with
9 additions
and
14 deletions
Initial_Condition.py
+
9
−
14
View file @
b5eb2134
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"""
"""
@author: Laura C. Kühle
@author: Laura C. Kühle
TODO: Add is_smooth() to DiscontinuousConstant class
TODO: Add is_smooth() to DiscontinuousConstant class
-> Done
"""
"""
import
numpy
as
np
import
numpy
as
np
...
@@ -195,6 +195,10 @@ class Box(InitialCondition):
...
@@ -195,6 +195,10 @@ class Box(InitialCondition):
Returns flag whether function is smooth.
Returns flag whether function is smooth.
"""
"""
def
is_smooth
(
self
):
"""
Returns flag that function is not smooth.
"""
return
False
def
_get_point
(
self
,
x
):
def
_get_point
(
self
,
x
):
"""
Evaluates function at given x-value.
"""
Evaluates function at given x-value.
...
@@ -218,10 +222,6 @@ class Box(InitialCondition):
...
@@ -218,10 +222,6 @@ class Box(InitialCondition):
else
:
else
:
return
0
return
0
def
is_smooth
(
self
):
"""
Returns flag that function is not smooth.
"""
return
False
class
FourPeakWave
(
InitialCondition
):
class
FourPeakWave
(
InitialCondition
):
"""
Class for a function with four peaks.
"""
Class for a function with four peaks.
...
@@ -352,15 +352,6 @@ class Linear(InitialCondition):
...
@@ -352,15 +352,6 @@ class Linear(InitialCondition):
def
_reset
(
self
,
config
):
def
_reset
(
self
,
config
):
"""
Resets instance variables.
"""
Resets instance variables.
Parameters
----------
config : dict
Additional parameters for initial condition.
"""
def
_reset
(
self
,
config
):
"""
Resets instance variables.
Parameters
Parameters
----------
----------
config : dict
config : dict
...
@@ -500,6 +491,10 @@ class DiscontinuousConstant(InitialCondition):
...
@@ -500,6 +491,10 @@ class DiscontinuousConstant(InitialCondition):
self
.
_left_factor
=
config
.
pop
(
'
left_factor
'
,
1
)
self
.
_left_factor
=
config
.
pop
(
'
left_factor
'
,
1
)
self
.
_right_factor
=
config
.
pop
(
'
right_factor
'
,
0.5
)
self
.
_right_factor
=
config
.
pop
(
'
right_factor
'
,
0.5
)
def
is_smooth
(
self
):
"""
Returns flag that function is not smooth.
"""
return
False
def
_get_point
(
self
,
x
):
def
_get_point
(
self
,
x
):
"""
Evaluates function at given x-value.
"""
Evaluates function at given x-value.
...
...
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