diff --git a/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh b/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh
index 9b1d60deebdcc70d80a0cfe86a7f1ed3ee2ea4b2..4d90f5fe868d2df0cb704821e089603e40541448 100644
--- a/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh
+++ b/test/porousmediumflow/2p/implicit/nonisothermal/problem.hh
@@ -40,6 +40,10 @@
 // use the spatial parameters as the injection problem of the 2p2c test program
 #include <test/porousmediumflow/2p2c/implicit/injectionspatialparams.hh>
 
+#ifndef GRIDTYPE // default to yasp grid if not provided by CMake
+#define GRIDTYPE Dune::YaspGrid<2>
+#endif
+
 namespace Dumux {
 
 //! Forward declaration of the problem class