From 6a6db0d61d86933324b4d311beaff81021b763da Mon Sep 17 00:00:00 2001 From: Julian Litz <91479202+julianlitz@users.noreply.github.com> Date: Sun, 2 Aug 2026 22:26:33 +0200 Subject: [PATCH 1/3] Update grid and level_cache to be references Change member variables to references for efficiency. --- include/Smoother/smoother.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Smoother/smoother.h b/include/Smoother/smoother.h index 3c659563..9d4d7a43 100644 --- a/include/Smoother/smoother.h +++ b/include/Smoother/smoother.h @@ -39,8 +39,8 @@ class Smoother virtual void smoothing(Vector x, ConstVector rhs, Vector temp) = 0; protected: - const PolarGrid grid_; - const LevelCacheType level_cache_; + const PolarGrid& grid_; + const LevelCacheType& level_cache_; const bool DirBC_Interior_; }; } // namespace gmgpolar From f637d8656991fae7d3114f4c4b4037c150c09311 Mon Sep 17 00:00:00 2001 From: Julian Litz <91479202+julianlitz@users.noreply.github.com> Date: Sun, 2 Aug 2026 22:27:15 +0200 Subject: [PATCH 2/3] Change grid and level_cache to references in residual.h --- include/Residual/residual.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Residual/residual.h b/include/Residual/residual.h index c39824d2..19dcc46a 100644 --- a/include/Residual/residual.h +++ b/include/Residual/residual.h @@ -30,8 +30,8 @@ class Residual protected: /* ------------------- */ /* Constructor members */ - const PolarGrid grid_; - const LevelCacheType level_cache_; + const PolarGrid& grid_; + const LevelCacheType& level_cache_; const bool DirBC_Interior_; }; } // namespace gmgpolar From 0f450bd7d76462de30e2b83bdec014553273fe42 Mon Sep 17 00:00:00 2001 From: Julian Litz <91479202+julianlitz@users.noreply.github.com> Date: Sun, 2 Aug 2026 22:34:41 +0200 Subject: [PATCH 3/3] Remove default constructor and keep virtual destructor --- include/Smoother/smoother.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/Smoother/smoother.h b/include/Smoother/smoother.h index 9d4d7a43..a2ca435d 100644 --- a/include/Smoother/smoother.h +++ b/include/Smoother/smoother.h @@ -33,8 +33,7 @@ class Smoother , DirBC_Interior_(DirBC_Interior) { } - KOKKOS_DEFAULTED_FUNCTION Smoother(const Smoother&) = default; - virtual ~Smoother() = default; + virtual ~Smoother() = default; virtual void smoothing(Vector x, ConstVector rhs, Vector temp) = 0;