Skip to content
Snippets Groups Projects
Commit 67094b28 authored by Timo Koch's avatar Timo Koch
Browse files

[richardsnc] assert that numPhases matches in model and fluidsystem

parent 8d6c8070
No related branches found
No related tags found
1 merge request!1125Fix/remove phase idx
...@@ -141,9 +141,6 @@ public: ...@@ -141,9 +141,6 @@ public:
using type = RichardsNCModelTraits<FluidSystem::numComponents, GET_PROP_VALUE(TypeTag, UseMoles), GET_PROP_VALUE(TypeTag, ReplaceCompEqIdx)>; using type = RichardsNCModelTraits<FluidSystem::numComponents, GET_PROP_VALUE(TypeTag, UseMoles), GET_PROP_VALUE(TypeTag, ReplaceCompEqIdx)>;
}; };
//! The default phase index to access the fluid system
SET_INT_PROP(RichardsNC, PhaseIdx, 0);
//! Define that per default mole fractions are used in the balance equations //! Define that per default mole fractions are used in the balance equations
SET_BOOL_PROP(RichardsNC, UseMoles, true); SET_BOOL_PROP(RichardsNC, UseMoles, true);
...@@ -166,6 +163,11 @@ private: ...@@ -166,6 +163,11 @@ private:
using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits);
using PT = typename GET_PROP_TYPE(TypeTag, SpatialParams)::PermeabilityType; 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 = RichardsVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT>; using Traits = RichardsVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT>;
public: public:
using type = RichardsNCVolumeVariables<Traits>; using type = RichardsNCVolumeVariables<Traits>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment