Commit 6137af93 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

box models: remove unnecessary typedefs and enums

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7552 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 44be4784
......@@ -62,8 +62,6 @@ class OnePTwoCFluxVariables
typedef typename GET_PROP_TYPE(TypeTag, OnePTwoCIndices) Indices;
enum {
phaseIdx = Indices::phaseIdx,
comp0Idx = Indices::comp0Idx,
comp1Idx = Indices::comp1Idx
};
......
......@@ -74,16 +74,10 @@ protected:
enum
{
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numEq = GET_PROP_VALUE(TypeTag, NumEq),
// indices of the primary variables
pressureIdx = Indices::pressureIdx,
x1Idx = Indices::x1Idx,
phaseIdx = Indices::phaseIdx,
comp0Idx = Indices::comp0Idx,
comp1Idx = Indices::comp1Idx,
// indices of the equations
......
......@@ -62,10 +62,7 @@ class OnePTwoCVolumeVariables : public BoxVolumeVariables<TypeTag>
comp1Idx = Indices::comp1Idx,
pressureIdx = Indices::pressureIdx,
x1Idx = Indices::x1Idx,
contiEqIdx = Indices::contiEqIdx,
transEqIdx = Indices::transEqIdx
x1Idx = Indices::x1Idx
};
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
......
......@@ -56,7 +56,6 @@ class TwoPTwoCNILocalResidual : public TwoPTwoCLocalResidual<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, TwoPTwoCIndices) Indices;
enum {
......
......@@ -73,7 +73,6 @@ class ThreePThreeCFluxVariables
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, SpatialParameters) SpatialParameters;
typedef typename FVElementGeometry::SubControlVolume SCV;
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
typedef Dune::FieldVector<CoordScalar, dimWorld> Vector;
......
......@@ -57,35 +57,21 @@ template<class TypeTag>
class ThreePThreeCLocalResidual: public BoxLocalResidual<TypeTag>
{
protected:
typedef ThreePThreeCLocalResidual<TypeTag> ThisType;
typedef typename GET_PROP_TYPE(TypeTag, LocalResidual) Implementation;
typedef BoxLocalResidual<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, ElementSolutionVector) ElementSolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, ThreePThreeCIndices) Indices;
enum
{
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numEq = GET_PROP_VALUE(TypeTag, NumEq),
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
pressureIdx = Indices::pressureIdx,
switch1Idx = Indices::switch1Idx,
switch2Idx = Indices::switch2Idx,
contiWEqIdx = Indices::contiWEqIdx,
contiCEqIdx = Indices::contiCEqIdx,
......@@ -97,29 +83,15 @@ protected:
wCompIdx = Indices::wCompIdx,
cCompIdx = Indices::cCompIdx,
aCompIdx = Indices::aCompIdx,
threePhases = Indices::threePhases,
wPhaseOnly = Indices::wPhaseOnly,
gnPhaseOnly = Indices::gnPhaseOnly,
wnPhaseOnly = Indices::wnPhaseOnly,
gPhaseOnly = Indices::gPhaseOnly,
wgPhaseOnly = Indices::wgPhaseOnly
aCompIdx = Indices::aCompIdx
};
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes) ElementBoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::ctype CoordScalar;
typedef Dune::FieldVector<Scalar, numPhases> PhasesVector;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> Tensor;
public:
/*!
......
......@@ -97,7 +97,6 @@ namespace Dumux
template<class TypeTag>
class ThreePThreeCModel: public BoxModel<TypeTag>
{
typedef ThreePThreeCModel<TypeTag> ThisType;
typedef BoxModel<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
......@@ -108,11 +107,6 @@ class ThreePThreeCModel: public BoxModel<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes) ElementBoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
typedef typename GET_PROP_TYPE(TypeTag, VertexMapper) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, ElementMapper) ElementMapper;
typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, ThreePThreeCIndices) Indices;
......@@ -120,7 +114,6 @@ class ThreePThreeCModel: public BoxModel<TypeTag>
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numEq = GET_PROP_VALUE(TypeTag, NumEq),
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
......@@ -128,9 +121,6 @@ class ThreePThreeCModel: public BoxModel<TypeTag>
switch1Idx = Indices::switch1Idx,
switch2Idx = Indices::switch2Idx,
contiWEqIdx = Indices::contiWEqIdx,
contiCEqIdx = Indices::contiCEqIdx,
contiAEqIdx = Indices::contiAEqIdx,
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx,
......@@ -149,14 +139,12 @@ class ThreePThreeCModel: public BoxModel<TypeTag>
};
typedef Dumux::CompositionalFluidState<Scalar, FluidSystem> FluidState;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
/*!
......@@ -294,7 +282,6 @@ public:
MultiWriter &writer)
{
typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField;
typedef Dune::BlockVector<Dune::FieldVector<Scalar, dim> > VectorField;
// create the required scalar fields
unsigned numVertices = this->problem_().gridView().size(dim);
......
......@@ -49,25 +49,9 @@ template <class TypeTag>
class ThreePThreeCNewtonController : public NewtonController<TypeTag>
{
typedef NewtonController<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, NewtonController) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GET_PROP_TYPE(TypeTag, NewtonMethod) NewtonMethod;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, ThreePThreeCIndices) Indices;
enum {
pressureIdx = Indices::pressureIdx,
switch1Idx = Indices::switch1Idx,
switch2Idx = Indices::switch2Idx
};
enum { enablePartialReassemble = GET_PROP_VALUE(TypeTag, EnablePartialReassemble) };
public:
ThreePThreeCNewtonController(const Problem &problem)
: ParentType(problem)
......
......@@ -75,7 +75,6 @@ class ThreePThreeCVolumeVariables : public BoxVolumeVariables<TypeTag>
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
formulation = GET_PROP_VALUE(TypeTag, Formulation),
wCompIdx = Indices::wCompIdx,
aCompIdx = Indices::aCompIdx,
......
......@@ -57,7 +57,6 @@ class ThreePThreeCNIFluxVariables : public ThreePThreeCFluxVariables<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GridView::ctype CoordScalar;
typedef typename GridView::template Codim<0>::Entity Element;
......@@ -65,14 +64,10 @@ class ThreePThreeCNIFluxVariables : public ThreePThreeCFluxVariables<TypeTag>
enum {
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numPhases = GET_PROP_VALUE(TypeTag, NumPhases)
dimWorld = GridView::dimensionworld
};
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename FVElementGeometry::SubControlVolume SCV;
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
typedef Dune::FieldVector<CoordScalar, dimWorld> Vector;
......
......@@ -51,11 +51,8 @@ namespace Dumux
template<class TypeTag>
class ThreePThreeCNILocalResidual : public ThreePThreeCLocalResidual<TypeTag>
{
typedef ThreePThreeCNILocalResidual<TypeTag> ThisType;
typedef ThreePThreeCLocalResidual<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
......@@ -64,8 +61,6 @@ class ThreePThreeCNILocalResidual : public ThreePThreeCLocalResidual<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, ThreePThreeCIndices) Indices;
enum {
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
......@@ -82,8 +77,6 @@ class ThreePThreeCNILocalResidual : public ThreePThreeCLocalResidual<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, FluxVariables) FluxVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
static constexpr Scalar massUpwindWeight = GET_PROP_VALUE(TypeTag, MassUpwindWeight);
......
......@@ -58,18 +58,14 @@ class ThreePThreeCNIVolumeVariables : public ThreePThreeCVolumeVariables<TypeTag
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
enum {
dim = GridView::dimension,
dimWorld = GridView::dimensionworld
};
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, ThreePThreeCIndices) Indices;
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
enum { temperatureIdx = Indices::temperatureIdx };
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef Dune::FieldVector<Scalar, numPhases> PhasesVector;
//! \endcond
public:
......
......@@ -65,7 +65,6 @@ class MPNCFluxVariables
enum {
dimWorld = GridView::dimensionworld,
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
enableDiffusion = GET_PROP_VALUE(TypeTag, EnableDiffusion),
enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy),
......
......@@ -56,19 +56,13 @@ protected:
enum {
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
numEq = GET_PROP_VALUE(TypeTag, NumEq),
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy),
enableKineticEnergy = GET_PROP_VALUE(TypeTag, EnableKineticEnergy),
enableDiffusion = GET_PROP_VALUE(TypeTag, EnableDiffusion),
enableKinetic = GET_PROP_VALUE(TypeTag, EnableKinetic),
enableSmoothUpwinding = GET_PROP_VALUE(TypeTag, EnableSmoothUpwinding),
phase0NcpIdx = Indices::phase0NcpIdx
};
......
......@@ -138,9 +138,7 @@ class MPNCModel : public BoxModel<TypeTag>
numDiffMethod = GET_PROP_VALUE(TypeTag, NumericDifferenceMethod),
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
numEq = GET_PROP_VALUE(TypeTag, NumEq),
dimWorld = GridView::dimensionworld,
dim = GridView::dimension
numEq = GET_PROP_VALUE(TypeTag, NumEq)
};
public:
......
......@@ -174,9 +174,7 @@ class MPNCNewtonController : public NewtonController<TypeTag>
enum {
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy),
enableKinetic = GET_PROP_VALUE(TypeTag, EnableKinetic),
numEq = GET_PROP_VALUE(TypeTag, NumEq),
p0Idx = Indices::p0Idx,
S0Idx = Indices::S0Idx
......
......@@ -70,14 +70,12 @@ class MPNCVolumeVariables
enum {
numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
dimWorld = GridView::dimensionworld,
enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy),
enableKinetic = GET_PROP_VALUE(TypeTag, EnableKinetic),
enableKineticEnergy = GET_PROP_VALUE(TypeTag, EnableKineticEnergy),
enableDiffusion = GET_PROP_VALUE(TypeTag, EnableDiffusion) || enableKinetic,
numEnergyEqs = Indices::NumPrimaryEnergyVars,
S0Idx = Indices::S0Idx,
p0Idx = Indices::p0Idx
......
......@@ -82,8 +82,6 @@ private:
numEq = GET_PROP_VALUE(TypeTag, NumEq),
dim = GridView::dimension,
Red = JacobianAssembler::Red,
Yellow = JacobianAssembler::Yellow,
Green = JacobianAssembler::Green
};
......
......@@ -50,8 +50,7 @@ class RichardsFluxVariables
typedef typename GET_PROP_TYPE(TypeTag, RichardsIndices) Indices;
enum {
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx
wPhaseIdx = Indices::wPhaseIdx
};
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
......
......@@ -51,8 +51,7 @@ class RichardsLocalResidual : public BoxLocalResidual<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, RichardsIndices) Indices;
enum {
contiEqIdx = Indices::contiEqIdx,
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx
wPhaseIdx = Indices::wPhaseIdx
};
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
......
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