diff --git a/dumux/porousmediumflow/velocityoutput.hh b/dumux/porousmediumflow/velocityoutput.hh
index 930157ecd9de696f5b799a4b3322eacc784d415e..ecd8fb3ed6c4c2fbf9a77321254c570ad87af46a 100644
--- a/dumux/porousmediumflow/velocityoutput.hh
+++ b/dumux/porousmediumflow/velocityoutput.hh
@@ -57,11 +57,6 @@ class PorousMediumFlowVelocityOutput : public VelocityOutput<GridVariables>
     using FluidSystem = typename VolumeVariables::FluidSystem;
     using Scalar = typename GridVariables::Scalar;
 
-    // TODO should be possible to get this
-    using Problem = typename std::decay_t<decltype(std::declval<GridVolumeVariables>().problem())>;
-    using BoundaryTypes = typename std::decay_t<decltype(std::declval<GridVolumeVariables>().problem()
-                                                         .boundaryTypes(std::declval<Element>(), std::declval<SubControlVolumeFace>()))>;
-
     static constexpr int dim = GridView::dimension;
     static constexpr int dimWorld = GridView::dimensionworld;
     static constexpr bool isBox = FVGridGeometry::discMethod == DiscretizationMethod::box;
@@ -70,6 +65,9 @@ class PorousMediumFlowVelocityOutput : public VelocityOutput<GridVariables>
     using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
     using ReferenceElements = Dune::ReferenceElements<typename GridView::ctype, dim>;
 
+    using Problem = typename GridVolumeVariables::Problem;
+    using BoundaryTypes = typename Problem::Traits::BoundaryTypes;
+
 public:
     using VelocityVector = typename ParentType::VelocityVector;