Commit aa281398 authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

naming conventions, renamed e.g. lPhase, gPhase in wPhase, nPhase and

varios l in w and g in n; set old indices deprecated


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8173 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 86b76cb2
......@@ -44,8 +44,12 @@ namespace Dumux
struct TwoPTwoCFormulation
{
enum {
plSg,
pgSl
pwSn,
pnSw
};
enum { // DEPRECATED
plSg = pwSn,
pgSl = pnSw
};
};
......@@ -56,7 +60,7 @@ struct TwoPTwoCFormulation
* \tparam PVOffset The first index in a primary variable vector.
*/
template <class TypeTag,
int formulation = TwoPTwoCFormulation::plSg,
int formulation = TwoPTwoCFormulation::pwSn,
int PVOffset = 0>
class TwoPTwoCIndices
{
......@@ -64,29 +68,41 @@ class TwoPTwoCIndices
public:
// Phase indices
static const int lPhaseIdx = FluidSystem::lPhaseIdx; //!< Index of the liquid phase
static const int gPhaseIdx = FluidSystem::gPhaseIdx; //!< Index of the gas phase
static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase
static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase
static const int DUMUX_DEPRECATED_MSG("use wPhaseIdx instead") lPhaseIdx = wPhaseIdx; //!< Index of the liquid phase
static const int DUMUX_DEPRECATED_MSG("use nPhaseIdx instead") gPhaseIdx = nPhaseIdx; //!< Index of the gas phase
// Component indices
static const int lCompIdx = 0; //!< Index of the liquid's primary component
static const int gCompIdx = 1; //!< Index of the gas' primary component
static const int wCompIdx = 0; //!< Index of the primary component of the wetting phase
static const int nCompIdx = 1; //!< Index of the primary component of the non-wetting phase
static const int DUMUX_DEPRECATED_MSG("use wCompIdx instead") lCompIdx = wCompIdx; //!< Index of the liquid's primary component
static const int DUMUX_DEPRECATED_MSG("use nCompIdx instead") gCompIdx = nCompIdx; //!< Index of the gas' primary component
// present phases (-> 'pseudo' primary variable)
static const int lPhaseOnly = 1; //!< Only the non-wetting phase is present
static const int gPhaseOnly = 0; //!< Only the wetting phase is present
static const int wPhaseOnly = 1; //!< Only the wetting phase is present
static const int nPhaseOnly = 0; //!< Only the non-wetting phase is present
static const int bothPhases = 2; //!< Both phases are present
static const int DUMUX_DEPRECATED_MSG("use wPhaseOnly instead") lPhaseOnly = wPhaseOnly; //!< Only the wetting phase is present
static const int DUMUX_DEPRECATED_MSG("use nPhaseOnly instead") gPhaseOnly = nPhaseOnly; //!< Only the non-wetting phase is present
// Primary variable indices
static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector
static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase
static const int plIdx = pressureIdx; //!< Index for liquid phase pressure in a solution vector
static const int SgOrXIdx = switchIdx; //!< Index of the either the saturation of the gas phase or the mass fraction secondary component in the only phase
static const int pwIdx = pressureIdx; //!< Index for wetting phase pressure in a solution vector
static const int SnOrXIdx = switchIdx; //!< Index of the either the saturation of the non-wetting phase or the mass fraction secondary component in the only phase
static const int DUMUX_DEPRECATED_MSG("use pwIdx instead") plIdx = pwIdx; //!< Index for liquid phase pressure in a solution vector
static const int DUMUX_DEPRECATED_MSG("use SnOrXIdx instead") SgOrXIdx = SnOrXIdx; //!< Index of the either the saturation of the gas phase or the mass fraction of the secondary component in the only phase
// equation indices
static const int conti0EqIdx = PVOffset; //!< Index of the mass conservation equation for the first component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiLEqIdx = conti0EqIdx + lCompIdx; //!< Index of the mass conservation equation for the liquid's primary component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiGEqIdx = conti0EqIdx + gCompIdx; //!< Index of the mass conservation equation for the gas' primary component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiLEqIdx = conti0EqIdx + wCompIdx; //!< Index of the mass conservation equation for the liquid's primary component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiGEqIdx = conti0EqIdx + nCompIdx; //!< Index of the mass conservation equation for the gas' primary component
};
/*!
......@@ -96,34 +112,47 @@ public:
* \tparam PVOffset The first index in a primary variable vector.
*/
template <class TypeTag, int PVOffset>
class TwoPTwoCIndices<TypeTag, TwoPTwoCFormulation::pgSl, PVOffset>
class TwoPTwoCIndices<TypeTag, TwoPTwoCFormulation::pnSw, PVOffset>
{
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
public:
// Phase indices
static const int lPhaseIdx = FluidSystem::lPhaseIdx; //!< Index of the liquid phase
static const int gPhaseIdx = FluidSystem::gPhaseIdx; //!< Index of the gas phase
static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase
static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase
static const int DUMUX_DEPRECATED_MSG("use wPhaseIdx instead") lPhaseIdx = wPhaseIdx; //!< Index of the liquid phase
static const int DUMUX_DEPRECATED_MSG("use nPhaseIdx instead") gPhaseIdx = nPhaseIdx; //!< Index of the gas phase
// Component indices
static const int lCompIdx = 0; //!< Index of the liquid's primary component
static const int gCompIdx = 1; //!< Index of the gas' primary component
static const int wCompIdx = 0; //!< Index of the primary component of the wetting phase
static const int nCompIdx = 1; //!< Index of the primary component of the non-wetting phase
static const int DUMUX_DEPRECATED_MSG("use wCompIdx instead") lCompIdx = wCompIdx; //!< Index of the liquid's primary component
static const int DUMUX_DEPRECATED_MSG("use nCompIdx instead") gCompIdx = nCompIdx; //!< Index of the gas' primary component
// present phases (-> 'pseudo' primary variable)
static const int lPhaseOnly = 1; //!< Only the non-wetting phase is present
static const int gPhaseOnly = 2; //!< Only the wetting phase is present
static const int wPhaseOnly = 1; //!< Only the wetting phase is present
static const int nPhaseOnly = 2; //!< Only the non-wetting phase is present
static const int bothPhases = 3; //!< Both phases are present
static const int DUMUX_DEPRECATED_MSG("use wPhaseOnly instead") lPhaseOnly = wPhaseOnly; //!< Only the wetting phase is present
static const int DUMUX_DEPRECATED_MSG("use nPhaseOnly instead") gPhaseOnly = nPhaseOnly; //!< Only the non-wetting phase is present
// Primary variable indices
static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector
static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase
static const int pgIdx = pressureIdx; //!< Index for gas phase pressure in a solution vector
static const int SlOrXIdx = switchIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction secondary component in the only phase
static const int pnIdx = pressureIdx; //!< Index for non-wetting phase pressure in a solution vector
static const int SwOrXIdx = switchIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction of the secondary component in the only phase
static const int DUMUX_DEPRECATED_MSG("use pnIdx instead") pgIdx = pnIdx; //!< Index for gas phase pressure in a solution vector
static const int DUMUX_DEPRECATED_MSG("use SwOrXIdx instead") SlOrXIdx = SwOrXIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction secondary component in the only phase
// Equation indices
static const int contiLEqIdx = PVOffset + lCompIdx; //!< Index of the mass conservation equation for the liquid's primary component
static const int contiGEqIdx = PVOffset + gCompIdx; //!< Index of the mass conservation equation for the gas' primary component
static const int conti0EqIdx = PVOffset; //!< Index of the mass conservation equation for the first component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiLEqIdx = conti0EqIdx + wCompIdx; //!< Index of the mass conservation equation for the liquid's primary component
static const int DUMUX_DEPRECATED_MSG("use conti0EqIdx + componentIdx instead") contiGEqIdx = conti0EqIdx + nCompIdx; //!< Index of the mass conservation equation for the gas' primary component
};
// \}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment