00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00031 #ifndef OPM_MATERIAL_TRAITS_HPP
00032 #define OPM_MATERIAL_TRAITS_HPP
00033
00034 namespace Opm {
00042 template <class ScalarT, int numPhasesV>
00043 class NullMaterialTraits
00044 {
00045 public:
00047 typedef ScalarT Scalar;
00048
00050 static const int numPhases = numPhasesV;
00051 };
00052
00058 template <class ScalarT, int wettingPhaseIdxV, int nonWettingPhaseIdxV>
00059 class TwoPhaseMaterialTraits
00060 {
00061 public:
00063 typedef ScalarT Scalar;
00064
00066 static const int numPhases = 2;
00067
00069 static const int wettingPhaseIdx = wettingPhaseIdxV;
00070
00072 static const int nonWettingPhaseIdx = nonWettingPhaseIdxV;
00073
00074
00075 static_assert(wettingPhaseIdx != nonWettingPhaseIdx,
00076 "wettingPhaseIdx and nonWettingPhaseIdx must be different");
00077 };
00078
00084 template <class ScalarT, int wettingPhaseIdxV, int nonWettingasPhaseIdxV, int gasPhaseIdxV>
00085 class ThreePhaseMaterialTraits
00086 {
00087 public:
00089 typedef ScalarT Scalar;
00090
00092 static const int numPhases = 3;
00093
00095 static const int wettingPhaseIdx = wettingPhaseIdxV;
00096
00098 static const int nonWettingPhaseIdx = nonWettingasPhaseIdxV;
00099
00101 static const int gasPhaseIdx = gasPhaseIdxV;
00102
00103
00104 static_assert(0 <= wettingPhaseIdx && wettingPhaseIdx < numPhases,
00105 "wettingPhaseIdx is out of range");
00106 static_assert(0 <= nonWettingPhaseIdx && nonWettingPhaseIdx < numPhases,
00107 "nonWettingPhaseIdx is out of range");
00108 static_assert(0 <= gasPhaseIdx && gasPhaseIdx < numPhases,
00109 "gasPhaseIdx is out of range");
00110
00111 static_assert(wettingPhaseIdx != nonWettingPhaseIdx,
00112 "wettingPhaseIdx and nonWettingPhaseIdx must be different");
00113 static_assert(wettingPhaseIdx != gasPhaseIdx,
00114 "wettingPhaseIdx and gasPhaseIdx must be different");
00115 static_assert(nonWettingPhaseIdx != gasPhaseIdx,
00116 "nonWettingPhaseIdx and gasPhaseIdx must be different");
00117 };
00118 }
00119
00120 #endif