Commit eadc0f76 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

box common: remove unused typedefs and enums

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7302 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4a5b39bd
......@@ -49,30 +49,16 @@ class BoxAssembler
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianMatrix)) JacobianMatrix;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes;
enum{dim = GridView::dimension};
enum{ dim = GridView::dimension };
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::EntityPointer VertexPointer;
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef SolutionVector Vector;
typedef JacobianMatrix Matrix;
typedef Matrix RepresentationType;
enum {
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq))
};
enum { numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)) };
typedef Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock;
typedef Dune::FieldVector<Scalar, numEq> VectorBlock;
......@@ -545,7 +531,7 @@ public:
/*!
* \brief Return constant reference to global Jacobian matrix.
*/
const Matrix& matrix() const
const JacobianMatrix& matrix() const
{ return *matrix_; }
/*!
......@@ -566,7 +552,7 @@ private:
int nVerts = gridView_().size(dim);
// allocate raw matrix
matrix_ = new Matrix(nVerts, nVerts, Matrix::random);
matrix_ = new JacobianMatrix(nVerts, nVerts, JacobianMatrix::random);
// find out the global indices of the neighboring vertices of
// each vertex
......@@ -790,7 +776,7 @@ private:
// set main diagonal entries for the vertex
int vIdx = vertexMapper_().map(*vp);
typedef typename Matrix::block_type BlockType;
typedef typename JacobianMatrix::block_type BlockType;
BlockType &J = (*matrix_)[vIdx][vIdx];
for (int j = 0; j < BlockType::rows; ++j)
J[j][j] = 1.0;
......@@ -819,7 +805,7 @@ private:
Problem *problemPtr_;
// the jacobian matrix
Matrix *matrix_;
JacobianMatrix *matrix_;
// the right-hand side
SolutionVector residual_;
......
......@@ -49,18 +49,15 @@ class BoxElementBoundaryTypes : public std::vector<typename GET_PROP_TYPE(TypeTa
typedef std::vector<BoundaryTypes> 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(FVElementGeometry)) FVElementGeometry;
enum { dim = GridView::dimension };
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::EntityPointer VertexPointer;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::ctype CoordScalar;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
......
......@@ -42,10 +42,6 @@ namespace Dumux
template<class TypeTag>
class BoxElementVolumeVariables : public std::vector<typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) >
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables;
typedef std::vector<VolumeVariables> ParentType;
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(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector;
......@@ -54,7 +50,6 @@ class BoxElementVolumeVariables : public std::vector<typename GET_PROP_TYPE(Type
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::IntersectionIterator IntersectionIterator;
enum { dim = GridView::dimension };
enum { numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)) };
......
......@@ -39,7 +39,6 @@ namespace Dumux
{
namespace Properties
{
NEW_PROP_TAG(Grid);
NEW_PROP_TAG(GridView);
NEW_PROP_TAG(Scalar);
}
......@@ -302,25 +301,23 @@ public:
template<class TypeTag>
class BoxFVElementGeometry
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
enum{dim = GridView::dimension};
typedef BoxFVElementGeometry<TypeTag> ThisType;
/** \todo Please doc me! */
friend class _BoxFVElemGeomHelper<ThisType, Grid::dimension>;
friend class _BoxFVElemGeomHelper<ThisType, dim>;
typedef _BoxFVElemGeomHelper<ThisType, Grid::dimension> BoxFVElemGeomHelper;
typedef _BoxFVElemGeomHelper<ThisType, dim> BoxFVElemGeomHelper;
enum{dim = Grid::dimension};
enum{maxNC = (dim < 3 ? 4 : 8)};
enum{maxNE = (dim < 3 ? 4 : 12)};
enum{maxNF = (dim < 3 ? 1 : 6)};
enum{maxCOS = (dim < 3 ? 2 : 4)};
enum{maxBF = (dim < 3 ? 8 : 24)};
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename Grid::ctype CoordScalar;
//typedef Scalar CoordScalar;
typedef typename GridView::ctype CoordScalar;
typedef typename GridView::Traits::template Codim<0>::Entity Element;
typedef typename Element::Geometry Geometry;
typedef Dune::FieldVector<CoordScalar,dim> FV;
......@@ -345,14 +342,6 @@ class BoxFVElementGeometry
Scalar pyramidVolume (const FV& p0, const FV& p1, const FV& p2, const FV& p3, const FV& p4)
{
/*
FV a = p2 - p0;
FV b = p3 - p1;
FV h = p4 - p0;
FV n = crossProduct(a, b);
return 1.0/6.0*(n*h);
*/
FV a(p2); a -= p0;
FV b(p3); b -= p1;
......@@ -366,18 +355,6 @@ class BoxFVElementGeometry
Scalar prismVolume (const FV& p0, const FV& p1, const FV& p2, const FV& p3, const FV& p4, const FV& p5)
{
/*
FV a = p4 - p0;
FV b = p1 - p3;
FV c = p1 - p0;
FV d = p2 - p0;
FV e = p5 - p0;
FV m = crossProduct(a, b);
FV n = m + crossProduct(c, d);
return fabs(1.0/6.0*(n*e));
*/
FV a(p4); a -= p0;
FV b(p1); b -= p3;
FV m;
......
......@@ -69,43 +69,24 @@ template<class TypeTag>
class BoxLocalJacobian
{
private:
typedef BoxLocalJacobian<TypeTag> ThisType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalJacobian)) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalResidual)) LocalResidual;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianAssembler)) JacobianAssembler;
enum {
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
Red = JacobianAssembler::Red,
Yellow = JacobianAssembler::Yellow,
Green = JacobianAssembler::Green
};
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename GridView::Grid::ctype CoordScalar;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename Element::EntityPointer ElementPointer;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename Element::Geometry Geometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
......@@ -114,6 +95,7 @@ private:
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock;
typedef Dune::Matrix<MatrixBlock> LocalBlockMatrix;
......
......@@ -48,37 +48,26 @@ template<class TypeTag>
class BoxLocalResidual
{
private:
typedef BoxLocalResidual<TypeTag> ThisType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalResidual)) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
enum {
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
dim = GridView::dimension,
dimWorld = GridView::dimensionworld
dim = GridView::dimension
};
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename GridView::Grid::ctype CoordScalar;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::EntityPointer VertexPointer;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::Grid::ctype CoordScalar;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename Element::Geometry Geometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
......@@ -87,9 +76,6 @@ private:
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables;
typedef Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock;
typedef Dune::Matrix<MatrixBlock> LocalBlockMatrix;
// copying the local residual class is not a good idea
BoxLocalResidual(const BoxLocalResidual &);
......
......@@ -50,47 +50,35 @@ namespace Dumux
template<class TypeTag>
class BoxModel
{
typedef BoxModel<TypeTag> ThisType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Implementation;
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 GridView::Grid::ctype CoordScalar;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(DofMapper)) DofMapper;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianAssembler)) JacobianAssembler;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables;
enum {
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
dim = GridView::dimension
};
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalJacobian)) LocalJacobian;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalResidual)) LocalResidual;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(NewtonMethod)) NewtonMethod;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(NewtonController)) NewtonController;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
// copying a model is not a good idea
BoxModel(const BoxModel &);
......
......@@ -73,7 +73,6 @@ private:
};
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef typename GridView::Intersection Intersection;
......
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