From ab48cf179332c0cdb83762a1ae36db066a933e65 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Mon, 19 Dec 2022 20:15:59 +0100
Subject: [PATCH] [ff][test][navierstokes] Add box to error evaluation

---
 test/freeflow/navierstokes/analyticalsolutionvectors.hh | 3 ++-
 test/freeflow/navierstokes/errors.hh                    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/freeflow/navierstokes/analyticalsolutionvectors.hh b/test/freeflow/navierstokes/analyticalsolutionvectors.hh
index 9c1756ae9e..d67b86d059 100644
--- a/test/freeflow/navierstokes/analyticalsolutionvectors.hh
+++ b/test/freeflow/navierstokes/analyticalsolutionvectors.hh
@@ -186,7 +186,8 @@ public:
                             = momentumProblem_->analyticalSolution(scv.center(), time)[MomIndices::velocity(scv.dofAxis())];
 
                 else if constexpr (MomentumGridGeometry::discMethod == DiscretizationMethods::fcdiamond
-                                   || MomentumGridGeometry::discMethod == DiscretizationMethods::pq1bubble)
+                                   || MomentumGridGeometry::discMethod == DiscretizationMethods::pq1bubble
+                                   || MomentumGridGeometry::discMethod == DiscretizationMethods::box)
                     for (const auto& scv : scvs(fvGeometry))
                         for (int dirIdx = 0; dirIdx < dimWorld; ++dirIdx)
                             analyticalVelocityAtDofs_[scv.dofIndex()][dirIdx]
diff --git a/test/freeflow/navierstokes/errors.hh b/test/freeflow/navierstokes/errors.hh
index ac49f58b9c..0eacc3294c 100644
--- a/test/freeflow/navierstokes/errors.hh
+++ b/test/freeflow/navierstokes/errors.hh
@@ -412,7 +412,8 @@ private:
                         sumError[velIdx] += vError * vError * Extrusion::volume(fvGeometry, scv);
                         sumReference[velIdx] += vReference * vReference * Extrusion::volume(fvGeometry, scv);
                     }
-                    else if constexpr (GridGeometry::discMethod == DiscretizationMethods::fcdiamond)
+                    else if constexpr (GridGeometry::discMethod == DiscretizationMethods::fcdiamond
+                                       || GridGeometry::discMethod == DiscretizationMethods::box)
                     {
                         totalVolume_ += Extrusion::volume(fvGeometry, scv);
                         for (int dirIdx = 0; dirIdx < dim; ++dirIdx)
-- 
GitLab