diff --git a/projection_utils.py b/projection_utils.py index 39fe4c7e465f95eca3cf76f5df634b9375e0e4a8..20b18a81fa1e35b97b1893aeec22d9ee85f1a478 100644 --- a/projection_utils.py +++ b/projection_utils.py @@ -4,6 +4,7 @@ """ +from __future__ import annotations from functools import cache from typing import Tuple import numpy as np @@ -100,7 +101,7 @@ class Mesh: 'right_bound': self._right_bound, 'num_ghost_cells': self._num_ghost_cells} - def random_stencil(self, stencil_length: int) -> 'Mesh': + def random_stencil(self, stencil_length: int) -> Mesh: """Return random stencil. Build mesh with given number of cell centers around a random point @@ -116,7 +117,6 @@ class Mesh: point = np.random.uniform(self._left_bound, self._right_bound) # Adjust grid spacing to be within interval if necessary - # creation grid_spacing = self.cell_len while point - stencil_length/2 * grid_spacing < self._left_bound \ or point + stencil_length/2 * grid_spacing > self._right_bound: