Commit 1b79d624 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

doc: (almost) finish the design patterns chapter in the handbook

also remove the ReferenceElements property because changing to the old
DUNE entity numbering would not work anyways...

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4617 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 7bc731eb
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -866,8 +866,23 @@
key = {DUNE}
}
@MISC{FENICS-HP,
title = {The {FEniCS} Project: \url{http://www.fenicsproject.org/}},
key = {FENICS}
}
@MISC{STL-REF-HP,
title = {A {STL} Reference: \url{http://www.cplusplus.com/reference/stl/}},
key = {STL}
}
@MISC{BOOST-HP,
title = {The {Boost} Homepage: \url{http://www.boost.org/}},
key = {BOOST}
}
@MISC{UG-HP,
title = {The {UG} Homepage: \url{http://sit.iwr.uni-heidelberg.de/~ug/}},
title = {The {UG} Homepage: \url{http://atlas.gcsc.uni-frankfurt.de/~ug/}},
key = {UG}
}
......@@ -19,6 +19,7 @@
\usepackage{lscape}
\usepackage{enumerate}
\usepackage{rotating}
\usepackage{subfig}
\DeclareGraphicsExtensions{.eps, .jpg}
......
This diff is collapsed.
......@@ -52,10 +52,6 @@ class OnePVolumeVariables : public BoxVolumeVariables<TypeTag>
dimWorld = GridView::dimensionworld,
};
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Fluid)) Fluid;
......
......@@ -31,9 +31,6 @@
#include "2pproperties.hh"
namespace Dumux
{
/*!
......@@ -115,7 +112,6 @@ public:
// non-wetting phase mass
result[contiNEqIdx] = vertDat.density(nPhaseIdx) * vertDat.porosity()
* vertDat.saturation(nPhaseIdx);
;
}
/*!
......
......@@ -60,8 +60,6 @@ class TwoPTwoCNIVolumeVariables : public TwoPTwoCVolumeVariables<TypeTag>
enum { numComponents = GET_PROP_VALUE(TypeTag, PTAG(NumComponents)) };
enum { temperatureIdx = Indices::temperatureIdx };
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements))::Container ReferenceElements;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef Dune::FieldVector<Scalar, numPhases> PhasesVector;
//! \endcond
......
......@@ -55,10 +55,6 @@ class TwoPNIVolumeVariables : public TwoPVolumeVariables<TypeTag>
enum { temperatureIdx = Indices::temperatureIdx };
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem;
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef Dune::FieldVector<Scalar, numPhases> PhasesVector;
......
......@@ -44,11 +44,6 @@ class BoxElementBoundaryTypes : public std::vector<typename GET_PROP_TYPE(TypeTa
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename RefElemProp::ReferenceElement ReferenceElement;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
enum { dim = GridView::dimension };
......@@ -58,6 +53,10 @@ class BoxElementBoundaryTypes : public std::vector<typename GET_PROP_TYPE(TypeTa
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;
public:
/*!
* \brief Copy constructor.
......
......@@ -69,9 +69,8 @@ private:
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename Element::EntityPointer ElementPointer;
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename RefElemProp::ReferenceElement ReferenceElement;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename Element::Geometry Geometry;
......
......@@ -70,9 +70,8 @@ private:
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::template Codim<dim>::EntityPointer VertexPointer;
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename RefElemProp::ReferenceElement ReferenceElement;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename Element::Geometry Geometry;
......
......@@ -71,10 +71,6 @@ class BoxModel
dim = GridView::dimension
};
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename RefElemProp::ReferenceElement ReferenceElement;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalJacobian)) LocalJacobian;
......@@ -89,6 +85,9 @@ class BoxModel
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;
enum { enablePartialReassemble = GET_PROP_VALUE(TypeTag, PTAG(EnablePartialReassemble)) };
// copying a model is not a good idea
......
......@@ -51,7 +51,6 @@ NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(Grid); //!< The type of the DUNE grid
NEW_PROP_TAG(GridView); //!< The type of the grid view
NEW_PROP_TAG(ReferenceElements); //!< DUNE reference elements to be used
NEW_PROP_TAG(FVElementGeometry); //! The type of the finite-volume geometry in the box scheme
NEW_PROP_TAG(Problem); //!< The type of the problem
......
......@@ -50,36 +50,10 @@ namespace Properties {
//////////////////////////////////////////////////////////////////
//! Set the default type for scalar values to double
SET_PROP_DEFAULT(Scalar)
{ typedef double type; };
SET_TYPE_PROP(BoxModel, Scalar, double);
//! Set the default type for the time manager
SET_PROP_DEFAULT(TimeManager)
{ typedef Dumux::TimeManager<TypeTag> type; };
/*!
* \brief Specify the reference elements which we ought to use.
*
* We use Dune::ReferenceElements by default (-> old entity
* numbering).
*
* \todo Some specialization if the grid only supports one kind of
* cells would be nice. this would be better fixed inside DUNE,
* though. something like:
* Dune::GenericReferenceElements<Dune::GeometryType<cube, dim> >
*/
SET_PROP_DEFAULT(ReferenceElements)
{
private:
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid;
typedef typename Grid::ctype CoordScalar;
static const int dim = Grid::dimension;
public:
typedef Dune::GenericReferenceElements<CoordScalar, dim> Container;
typedef Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
};
SET_TYPE_PROP(BoxModel, TimeManager, Dumux::TimeManager<TypeTag>);
//////////////////////////////////////////////////////////////////
// Properties
......
......@@ -130,7 +130,6 @@ public:
cn_ = new Constraints();
scalarGridFunctionSpace_ = new ScalarGridFunctionSpace(problemPtr_->gridView(), *fem_, *cn_);
gridFunctionSpace_ = new GridFunctionSpace(*scalarGridFunctionSpace_);
//cn_->compute_ghosts(*gridFunctionSpace_);
//typedef BoundaryIndexHelper<TypeTag> BoundaryFunction;
......
......@@ -53,7 +53,7 @@ namespace Dumux
\frac{\partial\;\phi S_\alpha \rho_\alpha}{\partial t}
-
\mathbf{div} \left\{
\frac{k_{r\alpha}}{\mu_\alpha}\;K
\rho_\alpha \frac{k_{r\alpha}}{\mu_\alpha}\;K
\mathbf{grad}\left[
p_\alpha - g\rho_\alpha
\right]
......
......@@ -61,9 +61,10 @@ class Exchanger
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef typename Grid::Traits::GlobalIdSet IDS;
typedef typename IDS::IdType IdType;
typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp;
typedef typename RefElemProp::Container ReferenceElements;
typedef typename RefElemProp::ReferenceElement ReferenceElement;
typedef typename GridView::ctype CoordScalar;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
public:
Exchanger(const Problem& problem)
......
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