From 50117b37c40b10a7e1296b158754d55de212ed27 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Fri, 20 Jul 2018 18:23:59 +0200 Subject: [PATCH] [1pncmin] assert that numPhases matches in model and fluidsystem --- dumux/porousmediumflow/1pncmin/model.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dumux/porousmediumflow/1pncmin/model.hh b/dumux/porousmediumflow/1pncmin/model.hh index 149202319b..a66415fef3 100644 --- a/dumux/porousmediumflow/1pncmin/model.hh +++ b/dumux/porousmediumflow/1pncmin/model.hh @@ -82,10 +82,8 @@ v = - \frac{k_{r}}{\mu} \mbox{\bf K} #include <dumux/porousmediumflow/nonisothermal/vtkoutputfields.hh> #include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -namespace Dumux -{ -namespace Properties -{ +namespace Dumux { +namespace Properties { ////////////////////////////////////////////////////////////////// // Type tags ////////////////////////////////////////////////////////////////// @@ -108,6 +106,11 @@ private: using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); using PT = typename GET_PROP_TYPE(TypeTag, SpatialParams)::PermeabilityType; + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = OnePNCVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT>; using NonMinVolVars = OnePNCVolumeVariables<Traits>; public: -- GitLab