diff --git a/Initial_Condition.py b/Initial_Condition.py index 2fb972e30681907b37ec9c8a851685a6b57d2e1c..4015d2af17c32cf66ba2e149364a7fc97749b4d3 100644 --- a/Initial_Condition.py +++ b/Initial_Condition.py @@ -2,7 +2,7 @@ """ @author: Laura C. Kühle -TODO: Add is_smooth() to DiscontinuousConstant class +TODO: Add is_smooth() to DiscontinuousConstant class -> Done """ import numpy as np @@ -195,6 +195,10 @@ class Box(InitialCondition): Returns flag whether function is smooth. """ + def is_smooth(self): + """Returns flag that function is not smooth.""" + return False + def _get_point(self, x): """Evaluates function at given x-value. @@ -218,10 +222,6 @@ class Box(InitialCondition): else: return 0 - def is_smooth(self): - """Returns flag that function is not smooth.""" - return False - class FourPeakWave(InitialCondition): """Class for a function with four peaks. @@ -352,15 +352,6 @@ class Linear(InitialCondition): def _reset(self, config): """Resets instance variables. - Parameters - ---------- - config : dict - Additional parameters for initial condition. - - """ - def _reset(self, config): - """Resets instance variables. - Parameters ---------- config : dict @@ -500,6 +491,10 @@ class DiscontinuousConstant(InitialCondition): self._left_factor = config.pop('left_factor', 1) 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): """Evaluates function at given x-value.