Commit 3bb14e46 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

2p2c,cleanup: Fix deprecation warning.

Re-arrange weired if clauses.
Remove empty destructors.
(reviewed by fetzer)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14192 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 10addd30
......@@ -25,6 +25,8 @@
#ifndef DUMUX_2P2C_VOLUME_VARIABLES_HH
#define DUMUX_2P2C_VOLUME_VARIABLES_HH
#include <dune/common/version.hh>
#include <dumux/implicit/common/implicitmodel.hh>
#include <dumux/material/fluidstates/compositionalfluidstate.hh>
#include <dumux/material/constraintsolvers/computefromreferencephase.hh>
......@@ -183,9 +185,11 @@ public:
Scalar t = Implementation::temperature_(priVars, problem, element,
fvGeometry, scvIdx);
fluidState.setTemperature(t);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim);
#else
int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
#endif
int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
/////////////
......
......@@ -86,8 +86,8 @@ SET_BOOL_PROP(InjectionProblem, VtkAddVelocity, false);
* This problem uses the \ref TwoPTwoCModel.
*
* To run the simulation execute the following line in shell:
* <tt>./test_box2p2c -parameterFile ./test_box2p2c.input</tt> or
* <tt>./test_cc2p2c -parameterFile ./test_cc2p2c.input</tt>
* <tt>./test_box2p2c</tt> or
* <tt>./test_cc2p2c</tt>
*/
template <class TypeTag>
class InjectionProblem : public ImplicitPorousMediaProblem<TypeTag>
......@@ -192,13 +192,13 @@ public:
/*np=*/nPressure_);
//stateing in the console whether mole or mass fractions are used
if(!useMoles)
if(useMoles)
{
std::cout<<"problem uses mass-fractions"<<std::endl;
std::cout<<"problem uses mole-fractions"<<std::endl;
}
else
{
std::cout<<"problem uses mole-fractions"<<std::endl;
std::cout<<"problem uses mass-fractions"<<std::endl;
}
}
......@@ -387,14 +387,16 @@ private:
Scalar meanM =
FluidSystem::molarMass(wCompIdx)*moleFracLiquidH2O +
FluidSystem::molarMass(nCompIdx)*moleFracLiquidN2;
if(!useMoles) //mass fraction formulation
if(useMoles)
{
Scalar massFracLiquidN2 = moleFracLiquidN2*FluidSystem::molarMass(nCompIdx)/meanM;
values[Indices::switchIdx] = massFracLiquidN2;
//mole-fraction formulation
values[Indices::switchIdx] = moleFracLiquidN2;
}
else //mole-fraction formulation
else
{
values[Indices::switchIdx] = moleFracLiquidN2;
//mass fraction formulation
Scalar massFracLiquidN2 = moleFracLiquidN2*FluidSystem::molarMass(nCompIdx)/meanM;
values[Indices::switchIdx] = massFracLiquidN2;
}
values[Indices::pressureIdx] = pl;
}
......@@ -410,8 +412,6 @@ private:
Scalar pressureLow_, pressureHigh_;
Scalar temperatureLow_, temperatureHigh_;
};
} //end namespace
......
......@@ -119,12 +119,6 @@ public:
coarseMaterialParams_.setLambda(2.0);
}
/*!
* \brief The destructor
*/
~InjectionSpatialParams()
{}
/*!
* \brief Returns the intrinsic permeability tensor \f$[m^2]\f$
*
......
......@@ -101,8 +101,8 @@ SET_BOOL_PROP(WaterAirProblem, UseMoles, true);
* This problem uses the \ref TwoPTwoCModel and \ref NIModel model.
*
* To run the simulation execute the following line in shell:
* <tt>./test_box2p2cni -parameterFile test_box2p2cni.input</tt> or
* <tt>./test_cc2p2cni -parameterFile test_cc2p2cni.input</tt>
* <tt>./test_box2p2cni</tt> or
* <tt>./test_cc2p2cni</tt>
* */
template <class TypeTag >
class WaterAirProblem : public ImplicitPorousMediaProblem<TypeTag>
......@@ -117,7 +117,6 @@ class WaterAirProblem : public ImplicitPorousMediaProblem<TypeTag>
// copy some indices for convenience
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
enum {
pressureIdx = Indices::pressureIdx,
switchIdx = Indices::switchIdx,
......@@ -138,10 +137,8 @@ class WaterAirProblem : public ImplicitPorousMediaProblem<TypeTag>
conti0EqIdx = Indices::conti0EqIdx,
contiNEqIdx = conti0EqIdx + Indices::nCompIdx
};
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
......@@ -177,13 +174,13 @@ public:
name_ = GET_RUNTIME_PARAM(TypeTag, std::string, Problem.Name);
//stating in the console whether mole or mass fractions are used
if(!useMoles)
if(useMoles)
{
std::cout<<"problem uses mass-fractions"<<std::endl;
std::cout<<"problem uses mole-fractions"<<std::endl;
}
else
{
std::cout<<"problem uses mole-fractions"<<std::endl;
std::cout<<"problem uses mass-fractions"<<std::endl;
}
}
......
......@@ -114,9 +114,6 @@ public:
coarseMaterialParams_.setLambda(2.0);
}
~WaterAirSpatialParams()
{}
/*!
* \brief Apply the intrinsic permeability tensor to a pressure
* potential gradient.
......
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