diff --git a/scripts/tcd/Mesh.py b/scripts/tcd/Mesh.py index ca15ed8ae2b055a637d61f92be882b6bf0fd047b..36abe12bcfa38981127fd5f9ef13210c6e572c3e 100644 --- a/scripts/tcd/Mesh.py +++ b/scripts/tcd/Mesh.py @@ -23,6 +23,8 @@ class Mesh: num_cells : int Number of cells in the mesh (ghost cells notwithstanding). Usually exponential of 2. + num_ghost_cells : int + Number of ghost cells on both sides of the mesh, respectively. bounds : Tuple[float, float] Left and right boundary of the mesh interval. interval_len : float @@ -87,6 +89,11 @@ class Mesh: """Return number of mesh cells.""" return self._num_cells + @property + def num_ghost_cells(self) -> int: + """Return number of ghost mesh cells.""" + return self._num_ghost_cells + @property def bounds(self) -> Tuple[float, float]: """Return left and right boundary of the mesh interval.""" @@ -149,4 +156,4 @@ class Mesh: return Mesh(left_bound=point - stencil_len/2 * mesh_spacing, right_bound=point + stencil_len/2 * mesh_spacing, num_cells=stencil_len, num_ghost_cells=2, - training_data_mode=True) \ No newline at end of file + training_data_mode=True)