Commit 3b0cf4d2 authored by Markus Wolff's avatar Markus Wolff
Browse files

improved doxygen documentation



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7834 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 68baab63
...@@ -32,17 +32,19 @@ ...@@ -32,17 +32,19 @@
*/ */
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup FVSaturation2p
* @brief Class for defining the diffusive capillary pressure term of a saturation equation * \brief Class for defining the diffusive capillary pressure term of a saturation equation
* *
* Defines the diffusive capillary pressure term of the form * Defines the diffusive capillary pressure term of the form
* *
* \f[\bar \lambda \boldsymbol{K} \text{grad} \, p_c,\f] * \f[
* \bar \lambda \boldsymbol K \text{grad} \, p_c,
* \f]
* *
* where \f$\bar \lambda = \lambda_w f_n = \lambda_n f_w\f$ and \f$\lambda\f$ is a phase mobility and \f$f\f$ a phase fractional flow function, * where \f$ \bar \lambda = \lambda_w f_n = \lambda_n f_w \f$ and \f$ \lambda \f$ is a phase mobility and \f$ f \f$ a phase fractional flow function,
* \f$\boldsymbol{K}\f$ is the intrinsic permeability and \f$p_c = p_c(S_w) \f$ the capillary pressure. * \f$ \boldsymbol K \f$ is the intrinsic permeability and \f$ p_c = p_c(S_w) \f$ the capillary pressure.
* *
* @tparam TypeTag The Type Tag * \tparam TypeTag The Type Tag
*/ */
template<class TypeTag> template<class TypeTag>
class CapillaryDiffusion: public DiffusivePart<TypeTag> class CapillaryDiffusion: public DiffusivePart<TypeTag>
...@@ -81,12 +83,11 @@ private: ...@@ -81,12 +83,11 @@ private:
public: public:
//! Returns capillary diffusion term //! Returns capillary diffusion term
/*! Returns capillary diffusion term for current element face /*! Returns capillary diffusion term for current element face
* @param[in] element entity of codim 0 * \param flux Flux vector (gets the flux from the function)
* @param[in] indexInInside face index in reference element * \param intersection Intersection of two grid elements/global boundary
* @param[in] satI saturation of current element * \param satI saturation of current element
* @param[in] satJ saturation of neighbor element * \param satJ saturation of neighbor element
* @param[in] pcGradient gradient of capillary pressure between element I and J * \param pcGradient gradient of capillary pressure between element I and J
* \return capillary pressure term of the saturation equation
*/ */
void getFlux (FieldVector& flux, const Intersection& intersection, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const void getFlux (FieldVector& flux, const Intersection& intersection, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const
{ {
...@@ -209,9 +210,9 @@ public: ...@@ -209,9 +210,9 @@ public:
flux *= mobBar; flux *= mobBar;
} }
/*! @brief Constructs a CapillaryDiffusion object /*! \brief Constructs a CapillaryDiffusion object
* @param problem an object of class Dumux::TransportProblem or derived *
* @param preComput if preCompute = true previous calculated mobilities are taken, if preCompute = false new mobilities will be computed (for implicit Scheme) * \param problem A problem class object
*/ */
CapillaryDiffusion (Problem& problem) CapillaryDiffusion (Problem& problem)
: DiffusivePart<TypeTag>(problem), problem_(problem), preComput_(GET_PROP_VALUE(TypeTag, PrecomputedConstRels)) : DiffusivePart<TypeTag>(problem), problem_(problem), preComput_(GET_PROP_VALUE(TypeTag, PrecomputedConstRels))
......
...@@ -25,20 +25,19 @@ ...@@ -25,20 +25,19 @@
#include <dumux/decoupled/2p/2pproperties.hh> #include <dumux/decoupled/2p/2pproperties.hh>
/** /**
* @file * \file
* @brief Base class for defining a convective part of an advection-diffusion equation * \brief Base class for defining a convective part of the saturation transport equation
* @author Markus Wolff * \author Markus Wolff
*/ */
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup FVSaturation2p
* @brief Base class for defining the convective part of an advection-diffusion equation * \brief Base class for defining a convective part of the saturation transport equation
* *
* @tparam TypeTag The Type Tag * \tparam TypeTag The problem TypeTag
*/ */
template<class TypeTag> template<class TypeTag>
class ConvectivePart class ConvectivePart
{ {
...@@ -53,38 +52,33 @@ private: ...@@ -53,38 +52,33 @@ private:
typedef Dune::FieldVector<Scalar, dimWorld> FieldVector; typedef Dune::FieldVector<Scalar, dimWorld> FieldVector;
public: public:
//! Returns convective term /*! \brief Returns convective term for current element face
/*! Returns convective term for current element face * \param intersection Intersection of two grid elements/global boundary
* @param[in] element entity of codim 0 * \param sat Saturation of current element
* @param[in] indexInInside face index in reference element * \return Convective flux
* @param[in] sat saturation of current element
* \return convective term of an advection-diffusion equation
*/ */
Scalar getFlux(const Intersection& intersection, const Scalar sat) const Scalar getFlux(const Intersection& intersection, const Scalar sat) const
{ {
return 0.0; return 0.0;
} }
//! Returns convective term
/*! Returns convective term for current element face /*! \brief Returns convective term for current intersection
* @param[in] element entity of codim 0 *
* @param[in] indexInInside face index in reference element * \param flux Flux vector (gets the flux from the function)
* @param[in] satI saturation of current element * \param intersection Intersection of two grid elements/global boundary
* @param[in] satJ saturation of neighbor element * \param satI Saturation of current element
* \return convective term of an advection-diffusion equation * \param satJ Saturation of neighbor element
*/ */
void getFlux(FieldVector& flux, const Intersection& intersection, const Scalar satI, const Scalar satJ) const void getFlux(FieldVector& flux, const Intersection& intersection, const Scalar satI, const Scalar satJ) const
{} {}
//! The constructor //! Constructs a ConvectivePart object
/* /*
* \param problem object including the problem definition * \param problem A problem class object
*/ */
ConvectivePart(Problem& problem) ConvectivePart(Problem& problem)
{} {}
//! always define virtual destructor in abstract base class
virtual ~ConvectivePart()
{ }
}; };
} }
......
...@@ -26,16 +26,16 @@ ...@@ -26,16 +26,16 @@
#include <dumux/decoupled/2p/transport/transportproperties2p.hh> #include <dumux/decoupled/2p/transport/transportproperties2p.hh>
/** /**
* @file * \file
* @brief Base class for defining the diffusive part of an advection-diffusion equation * \brief Base class for defining a diffusive part of the saturation transport equation
* @author Bernd Flemisch, Markus Wolff * \author Bernd Flemisch, Markus Wolff
*/ */
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup FVSaturation2p
* @brief Base class for defining the diffusive part of an advection-diffusion equation * \brief Base class for defining the diffusive part of the saturation transport equation
* *
* @tparam TypeTag The Type Tag * \tparam TypeTag The problem TypeTag
*/ */
template<class TypeTag> template<class TypeTag>
class DiffusivePart class DiffusivePart
...@@ -51,41 +51,38 @@ private: ...@@ -51,41 +51,38 @@ private:
typedef Dune::FieldVector<Scalar, dim> FieldVector; typedef Dune::FieldVector<Scalar, dim> FieldVector;
public: public:
//! Returns diffusive term /*! \brief Returns diffusive term for current element face
/*! Returns diffusive term for current element face *
* @param[in] element entity of codim 0 * \param flux Flux vector (gets the flux from the function)
* @param[in] indexInInside face index in reference element * \param intersection Intersection of two grid elements/global boundary
* @param[in] satI saturation of current element * \param satI saturation of current element
* @param[in] satJ saturation of neighbor element * \param satJ saturation of neighbor element
* @param[in] pcGradient gradient of capillary pressure between element I and J * \param pcGradient gradient of capillary pressure between element I and J
* \return diffusive term of an advection-diffusion equation
*/ */
void getFlux(FieldVector& flux, const Intersection& intersection, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const void getFlux(FieldVector& flux, const Intersection& intersection, Scalar satI, Scalar satJ, const FieldVector& pcGradient) const
{} {}
//! Returns diffusive term /*! \brief Returns diffusive term for current element face
/*! Returns diffusive term for current element face *
* @param[in] element entity of codim 0 * \param flux Flux vector (gets the flux from the function)
* @param[in] indexInInside face index in reference element * \param intersection Intersection of two grid elements/global boundary
* @param[in] satIntersection saturation at the face between element I and J * \param satIntersection saturation at the face between element I and J
* @param[in] satGradient gradient of saturation between element I and J * \param satGradient gradient of saturation between element I and J
* @param[in] time time * \param time time
* \return diffusive term of an advection-diffusion equation
*/ */
void getFlux(FieldVector& flux, const Intersection& intersection, void getFlux(FieldVector& flux, const Intersection& intersection,
const Scalar satIntersection, const FieldVector& satGradient, const Scalar time) const const Scalar satIntersection, const FieldVector& satGradient, const Scalar time) const
{} {}
//! Returns diffusive term /*! \brief Returns diffusive term for current element face
/*! Returns diffusive term for current element face *
* @param[in] element entity of codim 0 * \param flux Flux vector (gets the flux from the function)
* @param[in] indexInInside face index in reference element * \param intersection Intersection of two grid elements/global boundary
* @param[in] satIntersection saturation at the face between element I and J * \param satIntersection saturation at the face between element I and J
* @param[in] satGradient gradient of saturation between element I and J * \param satGradient gradient of saturation between element I and J
* @param[in] time time * \param time time
* @param[in] satI saturation of current element * \param satI saturation of current element
* @param[in] satJ saturation of neighbor element * \param satJ saturation of neighbor element
* \return diffusive term of an advection-diffusion equation
*/ */
void getFlux(FieldVector& flux, const Intersection& intersection, void getFlux(FieldVector& flux, const Intersection& intersection,
const Scalar satIntersection, const FieldVector& satGradient, const Scalar time, const Scalar satIntersection, const FieldVector& satGradient, const Scalar time,
...@@ -93,15 +90,13 @@ public: ...@@ -93,15 +90,13 @@ public:
{} {}
//! The constructor //! Constructs a DiffusivePart object
/* /*
* \param problem object including the problem definition * \param A problem class object
*/ */
DiffusivePart(Problem& problem) DiffusivePart(Problem& problem)
{} {}
//! always define virtual destructor in abstract base class
~DiffusivePart()
{ }
}; };
} }
......
...@@ -31,22 +31,25 @@ ...@@ -31,22 +31,25 @@
*/ */
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup IMPES
* \ingroup Saturation2p
* @brief Base class for implementations of different kinds of fluxes to evaluate a CFL-Condition * @brief Base class for implementations of different kinds of fluxes to evaluate a CFL-Condition
* *
* Base class for implementations of different kinds of fluxes to evaluate a CFL-Condition of the form * Base class for implementations of different kinds of fluxes to evaluate a CFL-Condition of the form
* *
* \f[\frac{F_i \Delta t}{V_{p_i}} < 1\f] * \f[
* \frac{F_i \Delta t}{V_{p_i}} < 1
* \f]
* *
* where \f$ V_{p_i} \f$ is the pore volume of cell i and * where \f$ V_{p_i} \f$ is the pore volume of cell i and
* *
* \f[F_i = \sum f_{ij}\f] * \f[
* F_i = \sum f_{ij}
* \f]
* *
* with \f$f_{ij}\f$ being the CFL-flux over edge \f$ij\f$. * with \f$ f_{ij} \f$ being the CFL-flux over edge \f$ ij \f$.
* *
* Template parameters are: * \tparam TypeTag The problem TypeTag
- TypeTag PropertyTag of the problem implementation
*/ */
template<class TypeTag> template<class TypeTag>
class EvalCflFlux class EvalCflFlux
...@@ -65,8 +68,9 @@ private: ...@@ -65,8 +68,9 @@ private:
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public: public:
//! adds a flux to the cfl-criterion evaluation
/*! /*! \brief adds a flux to the cfl-criterion evaluation
*
* \param lambdaW wetting phase mobility * \param lambdaW wetting phase mobility
* \param lambdaNW non-wetting phase mobility * \param lambdaNW non-wetting phase mobility
* \param viscosityW wetting phase viscosity * \param viscosityW wetting phase viscosity
...@@ -78,8 +82,8 @@ public: ...@@ -78,8 +82,8 @@ public:
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Intersection& intersection, int phaseIdx) void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Intersection& intersection, int phaseIdx)
{} {}
//! adds a flux to the cfl-criterion evaluation /*! \brief adds a flux to the cfl-criterion evaluation
/*! *
* \param lambdaW wetting phase mobility * \param lambdaW wetting phase mobility
* \param lambdaNW non-wetting phase mobility * \param lambdaNW non-wetting phase mobility
* \param viscosityW wetting phase viscosity * \param viscosityW wetting phase viscosity
...@@ -91,22 +95,20 @@ public: ...@@ -91,22 +95,20 @@ public:
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Element& element, int phaseIdx) void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Element& element, int phaseIdx)
{} {}
//! adds a flux to the cfl-criterion evaluation /*! \brief Returns the CFL flux-function
/*! *
* \param globalPos global position
* \param element element on which the CFL-criterion is evaluated * \param element element on which the CFL-criterion is evaluated
* \return fluxFunction for the calculation of the CFL-time step (\f$ 1/F_i\f$) * \return fluxFunction for the calculation of the CFL time-step (\f$ 1/F_i \f$)
*/ */
Scalar getCFLFluxFunction(const Element& element) Scalar getCFLFluxFunction(const Element& element)
{ {
return 0.0; return 0.0;
} }
//! adds a flux to the cfl-criterion evaluation /*! \brief Returns the CFL time-step
/*! *
* \param globalPos global position
* \param element element on which the CFL-criterion is evaluated * \param element element on which the CFL-criterion is evaluated
* \return fluxFunction for the calculation of the CFL-time step (\f$ 1/F_i\f$) * \return CFL time-step
*/ */
Scalar getDt(const Element& element) Scalar getDt(const Element& element)
{ {
......
...@@ -32,13 +32,10 @@ ...@@ -32,13 +32,10 @@
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup IMPES
* @brief CFL-flux-function to evaluate a CFL-Condition after Coats 2003 * @brief CFL-flux-function to evaluate a CFL-Condition after Coats 2003
* *
* * tparam TypeTag The problem TypeTag
* Template parameters are:
- TypeTag PropertyTag of the problem implementation
*/ */
template<class TypeTag> template<class TypeTag>
class EvalCflFluxCoats: public EvalCflFluxDefault<TypeTag> class EvalCflFluxCoats: public EvalCflFluxDefault<TypeTag>
...@@ -92,6 +89,10 @@ private: ...@@ -92,6 +89,10 @@ private:
public: public:
/*! \brief adds a flux to the cfl-criterion evaluation
*
* \copydetails EvalCflFlux::addFlux(Scalar&,Scalar&,Scalar&,Scalar&,Scalar,const Element&,int)
*/
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux,
const Element& element, int phaseIdx = -1) const Element& element, int phaseIdx = -1)
{ {
...@@ -103,6 +104,10 @@ public: ...@@ -103,6 +104,10 @@ public:
ParentType::addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, element, phaseIdx); ParentType::addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, element, phaseIdx);
} }
/*! \brief adds a flux to the cfl-criterion evaluation
*
* \copydetails EvalCflFlux::addFlux(Scalar&,Scalar&,Scalar&,Scalar&,Scalar,const Intersection&,int)
*/
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux,
const Intersection& intersection, int phaseIdx = -1) const Intersection& intersection, int phaseIdx = -1)
{ {
...@@ -426,9 +431,13 @@ public: ...@@ -426,9 +431,13 @@ public:
} }
} }
Scalar getCflFluxFunction(const Element& element) /*! \brief Returns the CFL flux-function
*
* \copydetails EvalCflFlux::getCFLFluxFunction(const Element&)
*/
Scalar getCFLFluxFunction(const Element& element)
{ {
Scalar cflFluxDefault = 1 / ParentType::getCflFluxFunction(element); Scalar cflFluxDefault = 1 / ParentType::getCFLFluxFunction(element);
if (std::isnan(cflFluxFunction_) || std::isinf(cflFluxFunction_) || cflFluxFunction_ > 100 * cflFluxDefault) if (std::isnan(cflFluxFunction_) || std::isinf(cflFluxFunction_) || cflFluxFunction_ > 100 * cflFluxDefault)
{ {
...@@ -452,11 +461,27 @@ public: ...@@ -452,11 +461,27 @@ public:
return 1e100; return 1e100;
} }
/*! \brief Returns the CFL time-step
*
* \copydetails EvalCflFlux::getDt(const Element&)
*/
Scalar getDt(const Element& element) Scalar getDt(const Element& element)
{ {
return getCflFluxFunction(element) * problem_.spatialParameters().porosity(element) * element.geometry().volume(); return getCFLFluxFunction(element) * problem_.spatialParameters().porosity(element) * element.geometry().volume();
}
/*! \brief Constructs an EvalCflFluxDefault object
*
* \param problem A problem type object
*/
EvalCflFluxCoats(Problem& problem) :
ParentType(problem), problem_(problem), eps_(5e-3)
{
reset();
} }
protected:
//! resets the accumulated CFL-fluxes to zero
void reset() void reset()
{ {
ParentType::reset(); ParentType::reset();
...@@ -464,12 +489,6 @@ public: ...@@ -464,12 +489,6 @@ public:
hasHangingNode_ = false; hasHangingNode_ = false;
} }
EvalCflFluxCoats(Problem& problem) :
ParentType(problem), problem_(problem), eps_(5e-3)
{
reset();
}
private: private:
......
...@@ -32,14 +32,12 @@ ...@@ -32,14 +32,12 @@
namespace Dumux namespace Dumux
{ {
/*!\ingroup Saturation2p /*!\ingroup IMPES
* @brief Default implementation of cfl-fluxes to evaluate a CFL-Condition * @brief Default implementation of cfl-fluxes to evaluate a CFL-Condition
* *
* Compares the maximum of inflow and outflow to the element volume weighted by relative permeability and viscosity ratios. * Compares the maximum of inflow and outflow to the element volume weighted by relative permeability and viscosity ratios.
* *
* Template parameters are: * \tparam TypeTag The problem TypeTag
- TypeTag PropertyTag of the problem implementation
*/ */
template<class TypeTag> template<class TypeTag>
class EvalCflFluxDefault: public EvalCflFlux<TypeTag> class EvalCflFluxDefault: public EvalCflFlux<TypeTag>
...@@ -80,23 +78,43 @@ private: ...@@ -80,23 +78,43 @@ private:
public: public:
/*! \brief adds a flux to the cfl-criterion evaluation
*
* \copydetails EvalCflFlux::addFlux(Scalar&,Scalar&,Scalar&,Scalar&,Scalar,const Element&,int)
*/
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Element& element, int phaseIdx = -1) void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Element& element, int phaseIdx = -1)
{ {
addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, phaseIdx); addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, phaseIdx);
} }
/*! \brief adds a flux to the cfl-criterion evaluation
*
* \copydetails EvalCflFlux::addFlux(Scalar&,Scalar&,Scalar&,Scalar&,Scalar,const Intersection&,int)
*/
void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Intersection& intersection, int phaseIdx = -1) void addFlux(Scalar& lambdaW, Scalar& lambdaNW, Scalar& viscosityW, Scalar& viscosityNW, Scalar flux, const Intersection& intersection, int phaseIdx = -1)
{ {
addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, phaseIdx); addFlux(lambdaW, lambdaNW, viscosityW, viscosityNW, flux, phaseIdx);
} }
Scalar getCflFluxFunction(const Element& element); /*! \brief Returns the CFL flux-function
*