diff --git a/scripts/tcd/Limiter.py b/scripts/tcd/Limiter.py index bc3b6c04e208ebfe9582c05c1b72713f7b142609..ab2be32c620c7a433c2ba55fe1309a6d9239b18b 100644 --- a/scripts/tcd/Limiter.py +++ b/scripts/tcd/Limiter.py @@ -218,11 +218,8 @@ class ModifiedMinMod(MinMod): Attributes ---------- - cell_len : float - Length of a cell in mesh. - mod_factor : float - Factor determining whether cell slope is significantly high enough for - modification. + threshold : float + Threshold up to which a cell slope does not require limiting. Methods ------- @@ -247,11 +244,9 @@ class ModifiedMinMod(MinMod): super()._reset(config) # Unpack necessary configurations - # cell_len = config.pop('cell_len') - # mod_factor = config.pop('mod_factor', 0) - # self._threshold = mod_factor * cell_len**2 - self._cell_len = config.pop('cell_len') - self._mod_factor = config.pop('mod_factor', 0) + cell_len = config.pop('cell_len') + mod_factor = config.pop('mod_factor', 0) + self._threshold = mod_factor * cell_len**2 def get_name(self): """Returns string of class name concatenated with the erase-degree.""" @@ -275,8 +270,7 @@ class ModifiedMinMod(MinMod): Flag whether cell should be adjusted. """ - # if abs(cell_slope) <= self._threshold: - if abs(cell_slope) <= self._mod_factor*self._cell_len**2: + if abs(cell_slope) <= self._threshold: return True return super()._determine_modification(projection, cell, cell_slope)