diff --git a/test/freeflow/rans/problem.hh b/test/freeflow/rans/problem.hh
index f4ef334132212d957be10c86fc8e335f3c3d0d77..9f1ff50c567abf6577e764ffec09d937bf26a357 100644
--- a/test/freeflow/rans/problem.hh
+++ b/test/freeflow/rans/problem.hh
@@ -268,7 +268,7 @@ public:
      * \param scv the sub control volume
      * \note used for cell-centered discretization schemes
      */
-    PrimaryVariables dirichlet(const Element& element, const SubControlVolume& scv) const
+    PrimaryVariables dirichlet([[maybe_unused]] const Element& element, const SubControlVolume& scv) const
     {
         if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon
                    || ModelTraits::turbulenceModel() == TurbulenceModel::komega)
@@ -320,7 +320,8 @@ private:
     { return globalPos[0] > this->gridGeometry().bBoxMax()[0] - eps_; }
 
     //! Initial conditions for the komega, kepsilon and lowrekepsilon turbulence models
-    void setInitialAtPos_(PrimaryVariables& values, const GlobalPosition &globalPos) const
+    void setInitialAtPos_([[maybe_unused]] PrimaryVariables& values,
+                          [[maybe_unused]] const GlobalPosition &globalPos) const
     {
         if constexpr (numTurbulenceEq(ModelTraits::turbulenceModel()) == 0) // zero equation models
             return;
@@ -344,7 +345,8 @@ private:
     }
 
     //! Boundary condition types for the one-eq turbulence model
-    void setBcTypes_(BoundaryTypes& values, const GlobalPosition& pos) const
+    void setBcTypes_([[maybe_unused]] BoundaryTypes& values,
+                     [[maybe_unused]] const GlobalPosition& pos) const
     {
         if constexpr (numTurbulenceEq(ModelTraits::turbulenceModel()) == 0) // zero equation models
             return;
@@ -373,14 +375,14 @@ private:
     }
 
     template<class Element, class FVElementGeometry, class SubControlVolume>
-    bool isDirichletCell_(const Element& element,
+    bool isDirichletCell_([[maybe_unused]] const Element& element,
                           const FVElementGeometry& fvGeometry,
-                          const SubControlVolume& scv,
+                          [[maybe_unused]] const SubControlVolume& scv,
                           const int& pvIdx) const
     {
         if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon)
         {
-            const auto eIdx = this->gridGeometry().elementMapper().index(element);
+            const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(element);
             // For the kepsilon model we set fixed values within the matching point and at the wall
             if (this->inNearWallRegion(eIdx))
                 return pvIdx == Indices::turbulentKineticEnergyEqIdx || pvIdx == Indices::dissipationEqIdx;
diff --git a/test/freeflow/ransnc/problem.hh b/test/freeflow/ransnc/problem.hh
index b7f657915bf31d18571f5899eac1eb62af1c0799..e5eb177b1910ba6dda8a3e6b9089407c3ca6df81 100644
--- a/test/freeflow/ransnc/problem.hh
+++ b/test/freeflow/ransnc/problem.hh
@@ -288,7 +288,7 @@ public:
      * \param scv the sub control volume
      * \note used for cell-centered discretization schemes
      */
-    PrimaryVariables dirichlet(const Element& element, const SubControlVolume& scv) const
+    PrimaryVariables dirichlet([[maybe_unused]] const Element& element, const SubControlVolume& scv) const
     {
         if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon
                    || ModelTraits::turbulenceModel() == TurbulenceModel::komega)
@@ -341,7 +341,8 @@ private:
     { return globalPos[0] > this->gridGeometry().bBoxMax()[0] - eps_; }
 
     //! Initial conditions for the komega, kepsilon and lowrekepsilon turbulence models
-    void setInitialAtPos_(PrimaryVariables& values, const GlobalPosition &globalPos) const
+    void setInitialAtPos_([[maybe_unused]] PrimaryVariables& values,
+                          [[maybe_unused]] const GlobalPosition &globalPos) const
     {
         if constexpr (numTurbulenceEq(ModelTraits::turbulenceModel()) == 0) // zero equation models
             return;
@@ -365,7 +366,8 @@ private:
     }
 
     //! Boundary condition types for the one-eq turbulence model
-    void setBcTypes_(BoundaryTypes& values, const GlobalPosition& pos) const
+    void setBcTypes_([[maybe_unused]] BoundaryTypes& values,
+                     [[maybe_unused]] const GlobalPosition& pos) const
     {
         if constexpr (numTurbulenceEq(ModelTraits::turbulenceModel()) == 0) // zero equation models
             return;
@@ -394,14 +396,14 @@ private:
     }
 
     template<class Element, class FVElementGeometry, class SubControlVolume>
-    bool isDirichletCell_(const Element& element,
+    bool isDirichletCell_([[maybe_unused]] const Element& element,
                           const FVElementGeometry& fvGeometry,
-                          const SubControlVolume& scv,
+                          [[maybe_unused]] const SubControlVolume& scv,
                           const int& pvIdx) const
     {
         if constexpr (ModelTraits::turbulenceModel() == TurbulenceModel::kepsilon)
         {
-            const auto eIdx = this->gridGeometry().elementMapper().index(element);
+            const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(element);
             // For the kepsilon model we set fixed values within the matching point and at the wall
             if (this->inNearWallRegion(eIdx))
                 return pvIdx == Indices::turbulentKineticEnergyEqIdx || pvIdx == Indices::dissipationEqIdx;