From 2d9a44b967ef65d7875a7038e4dc5d62772d2c6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=BChle=2C=20Laura=20Christine=20=28lakue103=29?=
 <laura.kuehle@uni-duesseldorf.de>
Date: Thu, 24 Nov 2022 18:10:57 +0100
Subject: [PATCH] Added property attribute for 'num_ghost_cells'.

---
 scripts/tcd/Mesh.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/tcd/Mesh.py b/scripts/tcd/Mesh.py
index ca15ed8..36abe12 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)
-- 
GitLab