Commit 0f70a035 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

everything in dumux stable compiles except 1p2c and richards since the old...

everything in dumux stable compiles except 1p2c and richards since the old material system is used there

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@3837 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 0fd50e1c
......@@ -3,7 +3,7 @@
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
SUBDIRS = src m4 dune doc
SUBDIRS = doc dumux m4 test tutorial
if BUILD_DOCS
# TODO: set up documentation tree automatically
......
......@@ -69,9 +69,9 @@ fi
SET_PARDISO
# implicitly set the Dune-flags everywhere
AC_SUBST(AM_CPPFLAGS, $DUNE_CPPFLAGS)
AC_SUBST(AM_LDFLAGS, $DUNE_LDFLAGS)
LIBS="$DUNE_LIBS"
AC_SUBST(AM_CPPFLAGS, "$ALL_PKG_CPPFLAGS" )
AC_SUBST(AM_LDFLAGS, "$ALL_PKG_LDFLAGS" )
LIBS="$DUNE_LIBS $ALL_PKG_LIBS $PARDISO_LIBS"
AC_CONFIG_FILES([dumux.pc
Makefile
......@@ -85,7 +85,6 @@ AC_CONFIG_FILES([dumux.pc
dumux/boxmodels/2p/Makefile
dumux/boxmodels/2p2c/Makefile
dumux/boxmodels/2p2cni/Makefile
dumux/boxmodels/2pNc/Makefile
dumux/boxmodels/2pni/Makefile
dumux/boxmodels/boxscheme/Makefile
dumux/boxmodels/pdelab/Makefile
......@@ -101,6 +100,7 @@ AC_CONFIG_FILES([dumux.pc
dumux/decoupled/2p/transport/Makefile
dumux/decoupled/2p/transport/fv/Makefile
dumux/decoupled/common/Makefile
dumux/io/Makefile
dumux/material/Makefile
dumux/material/binarycoefficients/Makefile
dumux/material/components/Makefile
......@@ -108,7 +108,6 @@ AC_CONFIG_FILES([dumux.pc
dumux/material/fluidsystems/Makefile
dumux/material/spatialparameters/Makefile
dumux/nonlinear/Makefile
lib/Makefile
m4/Makefile
test/Makefile
test/boxmodels/Makefile
......@@ -118,7 +117,6 @@ AC_CONFIG_FILES([dumux.pc
test/boxmodels/1p2c/Makefile
test/boxmodels/2p2c/Makefile
test/boxmodels/2p2cni/Makefile
test/boxmodels/2pNc/Makefile
test/boxmodels/richards/Makefile
test/common/Makefile
test/common/pardiso/Makefile
......
# $id: $
#if BUILD_HANDBOOK
#EPS_FILES = EPS/tutorial-problemconfiguration.eps
DOCSOURCE = dumux-handbook.tex intro.tex navigation.html css.html
MAINDOCS = dumux-handbook.dvi dumux-handbook.pdf dumux-handbook.ps
if WML
WMLDOCS = index.html
endif
#if TEX4HT
HTDOCS = navigation.html css.html dumux-handbook.html
#endif
EXTRA_DIST = dumux-handbook.pdf
#Makefile.dist.in Makefile.dist.am
if BUILD_DOCS
#if CONVERT
DOCS = $(HTDOCS) $(MAINDOCS) $(WMLDOCS)
#endif
endif
# setting like in dune-web
BASEDIR=../..
CURDIR=doc/handbook
handbookdir=$(docdir)/handbook
handbook_DATA = dumux-handbook.pdf
CLEANFILES = *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
CLEANFILES += *.4ct *.4tc *.css *.idv *.idx *.lg *.tid *.tmp *.tms *.xref
CLEANFILES += dumux-handbook*.html dumux-handbook*.png
CLEANFILES += $(DOCS)
#if CONVERT
CLEANFILES += $(EPS_FILES)
%.eps: $(srcdir)/%.jpg
convert $< $@
dumux-handbook.tex: $(EPS_FILES)
#endif
#dumux-handbook.html: $(DOCSOURCE) dune.cfg tex4ht.env
# $(MAKE) dumux-handbook.dvi
# $(MK4HT) htlatex dumux-handbook.tex "dune"; \
# $(MK4HT) htlatex dumux-handbook.tex "dune"; \
# $(T4HT) dumux-handbook.tex
# $(TEX) dumux-handbook.tex
dumux-handbook.pdf:
# mkdir ModelDescriptions
cat ../doxygen/latex/classDune_1_1OnePBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/1pboxmodel.tex
cat ../doxygen/latex/classDune_1_1OnePTwoCBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/1p2cboxmodel.tex
cat ../doxygen/latex/classDune_1_1RichardsBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/richardsboxmodel.tex
cat ../doxygen/latex/classDune_1_1TwoPBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/2pboxmodel.tex
cat ../doxygen/latex/classDune_1_1TwoPNIBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/2pniboxmodel.tex
cat ../doxygen/latex/classDune_1_1TwoPTwoCBoxModelBase.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/2p2cboxmodel.tex
cat ../doxygen/latex/classDune_1_1TwoPTwoCNIBoxModel.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/2p2cniboxmodel.tex
cat ../doxygen/latex/classDune_1_1IMPES.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/2pdecoupledmodel.tex
cat ../doxygen/latex/classDune_1_1Decoupled2p2c.tex | ../../util/scripts/extractDetailedDescription.py >ModelDescriptions/decoupled2p2c.tex
latex dumux-handbook.tex
bibtex dumux-handbook
latex dumux-handbook.tex
latex dumux-handbook.tex
dvipdf dumux-handbook
#dist-hook:
# sed $(srcdir)/Makefile.dist.am -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.am
# sed $(srcdir)/Makefile.dist.in -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.in
EXTRA_TEXINPUTS=$(top_srcdir)
include $(top_srcdir)/am/global-rules
include $(top_srcdir)/am/latex
#endif
SUBDIRS = boxmodels common decoupled io material nonlinear
dumuxdir = $(includedir)/dune/dumux
include $(top_srcdir)/am/global-rules
// $Id: 1pboxjacobian.hh 3738 2010-06-15 14:01:09Z lauser $
/*****************************************************************************
* Copyright (C) 2007 by Peter Bastian *
* Institute of Parallel and Distributed System *
* Department Simulation of Large Systems *
* University of Stuttgart, Germany *
* *
* Copyright (C) 2009 by Andreas Lauser *
* Copyright (C) 2009 by Onur Dogan *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version, as long as this copyright notice *
* is included in its original form. *
* *
* This program is distributed WITHOUT ANY WARRANTY. *
*****************************************************************************/
#ifndef DUMUX_1P_BOX_JACOBIAN_HH
#define DUMUX_1P_BOX_JACOBIAN_HH
#include <dumux/boxmodels/boxscheme/boxjacobian.hh>
#include "1pvertexdata.hh"
#include "1pelementdata.hh"
#include "1pfluxdata.hh"
namespace Dumux
{
/*!
* \ingroup OnePBoxModel
* \brief Element-wise calculation of the Jacobian matrix for problems
* using the one-phase box model.
*/
template<class TypeTag>
class OnePBoxJacobian : public BoxJacobian<TypeTag>
{
typedef OnePBoxJacobian<TypeTag> ThisType;
typedef BoxJacobian<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 GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GET_PROP(TypeTag, PTAG(SolutionTypes)) SolutionTypes;
typedef typename SolutionTypes::SolutionVector SolutionVector;
typedef typename SolutionTypes::SolutionOnElement SolutionOnElement;
typedef typename SolutionTypes::PrimaryVarVector PrimaryVarVector;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices;
enum {
dim = GridView::dimension,
dimWorld = GridView::dimensionworld,
pressureIdx = Indices::pressureIdx,
};
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexData)) VertexData;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxData)) FluxData;
typedef std::vector<VertexData> VertexDataArray;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
OnePBoxJacobian(Problem &problem)
: ParentType(problem)
{};
/*!
* \brief Evaluate the rate of change of all conservation
* quantites (e.g. phase mass) within a sub control
* volume of a finite volume element for the OneP
* model.
*
* This function should not include the source and sink terms.
*/
void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const
{
// if flag usePrevSol is set, the solution from the previous
// time step is used, otherwise the current solution is
// used. The secondary variables are used accordingly. This
// is required to compute the derivative of the storage term
// using the implicit euler method.
const VertexDataArray &elemDat = usePrevSol ? this->prevElemDat_ : this->curElemDat_;
const VertexData &vertDat = elemDat[scvIdx];
// partial time derivative of the wetting phase mass
result[pressureIdx] = vertDat.density * vertDat.porosity;
}
/*!
* \brief Evaluates the mass flux over a face of a subcontrol
* volume.
*/
void computeFlux(PrimaryVarVector &flux, int faceId) const
{
FluxData vars(this->problem_,
this->curElement_(),
this->curElementGeom_,
faceId,
this->curElemDat_);
flux[pressureIdx] = vars.densityAtIP * vars.vDarcyNormal / vars.viscosityAtIP;
}
/*!
* \brief Calculate the source term of the equation
*/
void computeSource(PrimaryVarVector &q, int localVertexIdx)
{
this->problem_.source(q,
this->curElement_(),
this->curElementGeom_,
localVertexIdx);
}
/*!
* \brief Return the temperature given the solution vector of a
* finite volume.
*/
template <class PrimaryVarVector>
Scalar temperature(const PrimaryVarVector &sol)
{ return this->problem_.temperature(); /* constant temperature */ }
/*!
* \brief All relevant primary and secondary of a given
* solution to an ouput writer.
*/
template <class MultiWriter>
void addOutputVtkFields(MultiWriter &writer, const SolutionVector &globalSol)
{
typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField;
// create the required scalar fields
unsigned numVertices = this->gridView_.size(dim);
ScalarField *p = writer.template createField<Scalar, 1>(numVertices);
unsigned numElements = this->gridView_.size(0);
ScalarField *rank = writer.template createField<Scalar, 1>(numElements);
SolutionOnElement tmpSol;
ElementIterator elementIt = this->gridView_.template begin<0>();
const ElementIterator &endit = this->gridView_.template end<0>();;
for (; elementIt != endit; ++elementIt)
{
int idx = this->problem_.model().elementMapper().map(*elementIt);
(*rank)[idx] = this->gridView_.comm().rank();
setCurrentElement(*elementIt);
this->restrictToElement(tmpSol, globalSol);
this->setCurrentSolution(tmpSol);
int numVerts = elementIt->template count<dim>();
for (int i = 0; i < numVerts; ++i)
{
int globalIdx = this->problem_.model().vertexMapper().map(*elementIt, i, dim);
(*p)[globalIdx] = this->curElemDat_[i].pressure;
};
}
writer.addVertexData(p, "p");
writer.addCellData(rank, "process rank");
}
private:
ThisType &asImp_()
{ return *static_cast<ThisType *>(this); }
const ThisType &asImp_() const
{ return *static_cast<const ThisType *>(this); }
};
};
#endif
// $Id: 1pboxmodel.hh 3738 2010-06-15 14:01:09Z lauser $
/*****************************************************************************
* Copyright (C) 2009 by Andreas Lauser *
* Copyright (C) 2009 by Onur Dogan *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version, as long as this copyright notice *
* is included in its original form. *
* *
* This program is distributed WITHOUT ANY WARRANTY. *
*****************************************************************************/
#ifndef DUMUX_1P_BOX_MODEL_HH
#define DUMUX_1P_BOX_MODEL_HH
#include <dumux/boxmodels/boxscheme/boxscheme.hh>
#include "1pboxjacobian.hh"
#include "1pboxproblem.hh"
namespace Dumux
{
/*!
* \ingroup BoxProblems
* \defgroup OnePBoxProblems One-phase box problems
*/
/*!
* \ingroup BoxModels
* \defgroup OnePBoxModel One-phase box model
*/
/*!
* \ingroup OnePBoxModel
* \brief Adaption of the BOX scheme to the single phase isothermal flow model.
*
* Single phase compressible isothermal flow model,
* \f{align*}
* \phi \frac{\partial \varrho}{\partial t} + \vec{\nabla} \cdot (- \varrho \frac{\bar{\bar{K}}}{\mu} ( \nabla p -\varrho \vec{g})) = q,
* \f}
* discretized using a vertex
* centered finite volume (box) scheme as spatial and
* the implicit Euler method as time discretization.
* Of course, the model can also be used for incompressible
* single phase flow modeling, if in the problem file a fluid with constant density is chosen.
*/
template<class TypeTag >
class OnePBoxModel : public BoxScheme<TypeTag, OnePBoxModel<TypeTag> >
{
typedef OnePBoxModel<TypeTag> ThisType;
typedef BoxScheme<TypeTag, ThisType> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalJacobian)) LocalJacobian;
public:
OnePBoxModel(Problem &prob)
: ParentType(prob)
{
}
/*!
* \brief All relevant primary and secondary of the current
* solution to an ouput writer.
*/
template <class MultiWriter>
void addOutputVtkFields(MultiWriter &writer)
{
this->localJacobian().addOutputVtkFields(writer, this->curSol());
}
};
}
#endif
// $Id: 1pboxproblem.hh 3759 2010-06-21 16:59:10Z bernd $
/*****************************************************************************
* Copyright (C) 2009 by Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version, as long as this copyright notice *
* is included in its original form. *
* *
* This program is distributed WITHOUT ANY WARRANTY. *
*****************************************************************************/
/*!
* \file
*
* \brief Base class for all problems which use the single-phase box
* model
*/
#ifndef DUMUX_1P_BOX_PROBLEM_HH
#define DUMUX_1P_BOX_PROBLEM_HH
#include <dumux/boxmodels/boxscheme/boxproblem.hh>
namespace Dumux
{
/*!
* \ingroup OnePProblems
* \brief Base class for all problems which use the single-phase box model
*
* \todo Please doc me more!
*/
template<class TypeTag, class Implementation>
class OnePBoxProblem : public BoxProblem<TypeTag, Implementation>
{
typedef BoxProblem<TypeTag, Implementation> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
typedef typename GridView::Grid Grid;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
// material properties
typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters;
enum {
dim = Grid::dimension,
dimWorld = Grid::dimensionworld
};
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
OnePBoxProblem(const GridView &gridView)
: ParentType(gridView),
gravity_(0)
{
spatialParameters_ = new SpatialParameters(gridView);
if (GET_PROP_VALUE(TypeTag, PTAG(EnableGravity)))
gravity_[dim-1] = -9.81;
}
/*!
* \name Problem parameters
*/
// \{
/*!
* \brief Returns the temperature within the domain.
*
* This method MUST be overwritten by the actual problem.
*/
Scalar temperature() const
{ return asImp_()->temperature(); };
/*!
* \brief Returns the acceleration due to gravity.
*
* If the <tt>EnableGravity</tt> property is true, this means
* \f$\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \f$, else \f$\boldsymbol{g} = ( 0,\dots, 0)^T \f$
*/
const GlobalPosition &gravity() const
{ return gravity_; }
/*!
* \brief Returns the spatial parameters object.
*/
SpatialParameters &spatialParameters()
{ return *spatialParameters_; }
/*!
* \copydoc spatialParameters()
*/
const SpatialParameters &spatialParameters() const
{ return *spatialParameters_; }
private:
//! Returns the implementation of the problem (i.e. static polymorphism)
Implementation *asImp_()
{ return static_cast<Implementation *>(this); }
//! \copydoc asImp_()
const Implementation *asImp_() const
{ return static_cast<const Implementation *>(this); }
SpatialParameters* spatialParameters_;
GlobalPosition gravity_;
};
}
#endif
// $Id: 1pelementdata.hh 3357 2010-03-25 13:02:05Z lauser $
/*****************************************************************************
* Copyright (C) 2008-2009 by Onur Dogan *
* Copyright (C) 2008-2009 by Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version, as long as this copyright notice *
* is included in its original form. *
* *
* This program is distributed WITHOUT ANY WARRANTY. *
*****************************************************************************/
/*!
* \file
*
* \brief Contains the quantities which are are constant within a
* finite element in the one-phase model.
*
* For the plain one-phase model everything is given on the finite
* volumes, so this class is empty.
*/
#ifndef DUMUX_1P_ELEMENT_DATA_HH
#define DUMUX_1P_ELEMENT_DATA_HH
namespace Dumux
{
/*!
* \ingroup OnePBoxModel
* \brief This template class contains the quantities which are are
* constant within a finite element in the singe-phase model.
*
* For the plain single-phase model everything is given on the finite
* volumes, so this class is empty.
*/
template <class TypeTag>
class OnePElementData
{
};
} // end namepace
#endif
// $Id: 1pfluxdata.hh 3759 2010-06-21 16:59:10Z bernd $
/*****************************************************************************
* Copyright (C) 2008-2009 by Onur Dogan *
* Copyright (C) 2008-2009 by Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version, as long as this copyright notice *
* is included in its original form. *
* *
* This program is distributed WITHOUT ANY WARRANTY. *
*****************************************************************************/
/*!
* \file
*
* \brief This file contains the data which is required to calculate
* the flux of the fluid over a face of a finite volume.
*/
#ifndef DUMUX_1P_FLUX_DATA_HH
#define DUMUX_1P_FLUX_DATA_HH
#include <dumux/common/math.hh>
namespace Dumux
{
/*!
* \ingroup OnePBoxModel
* \brief This template class contains the data which is required to
* calculate the flux of the fluid over a face of a
* finite volume for the one-phase model.
*/
template <class TypeTag>
class OnePFluxData
{
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(Problem)) Problem;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexData)) VertexData;
typedef typename GridView::template Codim<0>::Entity Element;
typedef std::vector<VertexData> VertexDataArray;