From 8a10ceebe72909fa2a66e399edcfeb02ac6044a2 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Wed, 4 Jan 2012 08:29:18 +0000 Subject: [PATCH] box 2pni: remove unused typedefs and enums, beautify git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7289 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2pni/2pnifluxvariables.hh | 22 ++++++--------------- dumux/boxmodels/2pni/2pnilocalresidual.hh | 21 ++++++-------------- dumux/boxmodels/2pni/2pnivolumevariables.hh | 22 ++++++--------------- 3 files changed, 18 insertions(+), 47 deletions(-) diff --git a/dumux/boxmodels/2pni/2pnifluxvariables.hh b/dumux/boxmodels/2pni/2pnifluxvariables.hh index f541b9da80..dbb1a9388a 100644 --- a/dumux/boxmodels/2pni/2pnifluxvariables.hh +++ b/dumux/boxmodels/2pni/2pnifluxvariables.hh @@ -53,27 +53,17 @@ template <class TypeTag> class TwoPNIFluxVariables : public TwoPFluxVariables<TypeTag> { typedef TwoPFluxVariables<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; - - typedef typename GridView::ctype CoordScalar; - typedef typename GridView::template Codim<0>::Entity Element; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; - - enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, - - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) - }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename FVElementGeometry::SubControlVolume SCV; - typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + typedef typename GridView::template Codim<0>::Entity Element; + enum { dimWorld = GridView::dimensionworld }; + + typedef typename GridView::ctype CoordScalar; typedef Dune::FieldVector<CoordScalar, dimWorld> Vector; public: diff --git a/dumux/boxmodels/2pni/2pnilocalresidual.hh b/dumux/boxmodels/2pni/2pnilocalresidual.hh index 0dafdb62d6..ec572a0dc1 100644 --- a/dumux/boxmodels/2pni/2pnilocalresidual.hh +++ b/dumux/boxmodels/2pni/2pnilocalresidual.hh @@ -52,35 +52,26 @@ namespace Dumux template<class TypeTag> class TwoPNILocalResidual : public TwoPLocalResidual<TypeTag> { - typedef TwoPNILocalResidual<TypeTag> ThisType; typedef TwoPLocalResidual<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; - enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), temperatureIdx = Indices::temperatureIdx, energyEqIdx = Indices::energyEqIdx, - wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx }; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + enum { dimWorld = GridView::dimensionworld }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef Dune::FieldVector<Scalar, dimWorld> Vector; public: diff --git a/dumux/boxmodels/2pni/2pnivolumevariables.hh b/dumux/boxmodels/2pni/2pnivolumevariables.hh index 98887d3515..4ca3437e69 100644 --- a/dumux/boxmodels/2pni/2pnivolumevariables.hh +++ b/dumux/boxmodels/2pni/2pnivolumevariables.hh @@ -42,29 +42,19 @@ namespace Dumux template <class TypeTag> class TwoPNIVolumeVariables : public TwoPVolumeVariables<TypeTag> { - typedef TwoPVolumeVariables<TypeTag> ParentType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - - typedef typename GridView::template Codim<0>::Entity Element; - - enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, - - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) - }; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; + enum { numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; enum { temperatureIdx = Indices::temperatureIdx }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; - typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + typedef typename GridView::template Codim<0>::Entity Element; public: /*! -- GitLab