diff --git a/dumux/assembly/fvassembler.hh b/dumux/assembly/fvassembler.hh
index 885bb40e3522a200ac2a0876649ad7886195e130..171b92eb0339e56d624808a5963aec7650b96be7 100644
--- a/dumux/assembly/fvassembler.hh
+++ b/dumux/assembly/fvassembler.hh
@@ -60,8 +60,6 @@ class FVAssembler
 
     static constexpr int dim = GridView::dimension;
     static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
-    static constexpr int dofCodim = isBox ? dim : 0;
-
     using LocalAssembler = std::conditional_t<isBox, BoxLocalAssembler<TypeTag, diffMethod, isImplicit>,
                                                      CCLocalAssembler<TypeTag, diffMethod, isImplicit>>;
 
@@ -323,7 +321,7 @@ public:
 
     //! cell-centered schemes have one dof per cell
     std::size_t numDofs() const
-    { return gridView().size(dofCodim); }
+    { return fvGridGeometry_->numDofs(); }
 
     const Problem& problem() const
     { return *problem_; }